When to use MCP vs the SDK
Use the MCP server
Inside an agent runtime that supports remote MCP. The agent discovers and
calls RAIL tools automatically as part of its loop.
Use the SDK
Inside your own application code. The
Python and JavaScript
SDKs remain the right tool for direct, programmatic calls.
Authentication
Phase 1 uses your existing RAIL API key as a bearer token:Tools and resources
Ninerail_-prefixed tools and two free, read-only resources. See the full
reference on Tools, connection guides on
Connect, and the safety posture on Security.
The guarded agent loop
rail_detect_injectionon untrusted input before acting on it.rail_evaluate_tool_callbefore executing a tool call — ablockverdict is a hard stop.rail_scan_tool_resulton the tool’s output, and prefer the redacted text.rail_evaluate(deep) on the draft answer, orrail_safe_regenerateto fix it server-side.rail_dpdp_scan(mask) on anything leaving your boundary, for India deployments.