rail-score — Claude Code MCP server: content scoring and agent guardrails
A hosted MCP server that scores content across eight RAIL dimensions, catches prompt injection, and checks for Indian personal data under DPDP.
claude mcp add --transport http rail-score https://mcp.responsibleailabs.ai/mcpWhat rail-score 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.
What it helps with
- 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 for the agent
- 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_resultand give me the masked version
How to install rail-score
Platform CLI: remote server
claude mcp add --transport http rail-score https://mcp.responsibleailabs.ai/mcpPlatform CLI: remote server
codex mcp add rail-score --url https://mcp.responsibleailabs.ai/mcpConfig file
{
"mcpServers": {
"rail-score": {
"url": "https://mcp.responsibleailabs.ai/mcp"
}
}
}Config file
{
"servers": {
"rail-score": {
"type": "http",
"url": "https://mcp.responsibleailabs.ai/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http rail-score https://mcp.responsibleailabs.ai/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about rail-score
How do I install rail-score in Claude Code?
Run claude mcp add --transport http rail-score https://mcp.responsibleailabs.ai/mcp. Add your rail_... key in the authorization header.
What does rail-score do?
It gives an agent nine tools for content scoring, compliance checks, injection detection and personal-data handling. Scoring runs across eight RAIL dimensions, with policy set as per-dimension thresholds.
What do I need to run rail-score?
A rail_... key from the dashboard. Transport is Streamable HTTP only, with a single /mcp endpoint.