# rail-score

A hosted MCP server that scores content across eight RAIL dimensions, catches prompt injection, and checks for Indian personal data under DPDP.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Responsible-AI-Labs
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Responsible-AI-Labs/rail-score-mcp
- Updated: 2026-06-22
- HTML: https://affpapa.org/en/nevibecode/mcp/rail-score

## What it does

rail-score plugs into an agent through a single URL and sits in front of the REST API at `api.responsibleailabs.ai/railscore/v1/`. It holds no scoring logic of its own: the gateway validates the caller, reshapes requests and responses for agent use, then forwards them to the engine. Credits, tenancy and rate limits match what you get from the REST API directly.

Nine tools ship with the `rail_` prefix. `rail_evaluate` scores text across eight RAIL dimensions and can enforce a policy of per-dimension thresholds; `rail_check_compliance` checks against gdpr, ccpa, hipaa, eu_ai_act, india_dpdp and india_ai_gov; `rail_detect_injection` looks for injection in untrusted text; `rail_evaluate_tool_call` decides whether a tool call should pass, warn or be blocked; `rail_scan_tool_result` strips PII from a tool's output and hands back masked text; `rail_safe_regenerate` rewrites an answer until it passes; three `rail_dpdp_*` tools cover DPDP work. Three read-only resources come free: `rail://framework/dimensions`, `rail://account/capabilities` and `rail://framework/policy-schema`.

You need a `rail_...` key from the dashboard — without it the server rejects requests. Transport is Streamable HTTP only, one `/mcp` endpoint, no SSE. If your application has a dashboard policy enforced, it wins over the policy sent in a request: `policy_outcome.source` reads `application`, not `request`.

## Requirements
- Remote server: `https://mcp.responsibleailabs.ai/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http rail-score https://mcp.responsibleailabs.ai/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add rail-score --url https://mcp.responsibleailabs.ai/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "rail-score": {
            "url": "https://mcp.responsibleailabs.ai/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "rail-score": {
            "type": "http",
            "url": "https://mcp.responsibleailabs.ai/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http rail-score https://mcp.responsibleailabs.ai/mcp
```

## When to use it
- score a draft answer for safety before it reaches the user
- stop a tool call that breaks your policy thresholds
- strip personal data out of a tool's output
- spot an injection attempt in untrusted text
- check content against DPDP rules before it leaves your boundary

## Example prompts
- Score this draft answer across all RAIL dimensions and show where safety drops
- Check this text for prompt injection before I hand it to the agent
- Run the tool output through `rail_scan_tool_result` and give me the masked version

## Similar
- [shellward](https://affpapa.org/en/nevibecode/mcp/shellward.md) — MCP server · ★ 139
- [prompt-injection-defense](https://affpapa.org/en/nevibecode/skills/prompt-injection-defense.md) — skill · 372 installs
- [LLMVerify](https://affpapa.org/en/nevibecode/mcp/llmverify.md) — MCP server · ★ 18
- [configuring-guardrails](https://affpapa.org/en/nevibecode/skills/configuring-guardrails.md) — skill · 2900 installs
- [ai-security-hardening](https://affpapa.org/en/nevibecode/skills/ai-security-hardening.md) — skill · 326 installs
- [MCP-Bastion](https://affpapa.org/en/nevibecode/mcp/vaquarkhan-mcp-bastion.md) — MCP server · ★ 7

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
