Skip to main content
Sentrial provides an MCP (Model Context Protocol) server that lets AI coding tools search our documentation directly. Ask your AI to “instrument my agent with Sentrial” and it will pull the right docs, code examples, and API references automatically.

Install with Claude Code

Run this in your terminal:
That’s it. The SearchSentrial tool is now available in all your Claude Code sessions.
To share this with your whole team, add --scope project to write it to .mcp.json in your repo root. Anyone who clones the repo gets the tool automatically.

Install with Cursor

  1. Open Cursor Settings (Cmd + , / Ctrl + ,)
  2. Go to the MCP section
  3. Click Add new MCP server
  4. Set the type to SSE and the URL to:
Or add it directly to .cursor/mcp.json in your project:

What You Can Do

Once connected, just ask your AI assistant naturally:
  • “Instrument my agent with Sentrial”
  • “Add Sentrial tracking to my LangChain agent”
  • “How do I track tool calls with the Python SDK?”
  • “Set up Sentrial with the Vercel AI SDK”
The AI will search our docs and write the integration code for you.

MCP Prompt Tips

For Claude Agent SDK integrations, include your language and runtime behavior in the prompt so the assistant returns the correct pattern:
  • “Set up Claude Code Python tracking with wrap_claude_agent (for query()) or wrap_claude_client (for ClaudeSDKClient), and make sure sessions finalize with tokens/cost.”
  • “For Claude Code TypeScript, ensure early stream exits are handled so sessions don’t stay running.”
  • “Show me the error-handling pattern for Claude Code wrappers, including generator-close behavior.”
  • “I’m using ClaudeSDKClient for multi-turn conversations — show me how to track each turn as a Sentrial session with wrap_claude_client.”

How It Works

The MCP server exposes a single SearchSentrial tool. When your AI assistant needs information about Sentrial, it calls this tool with a search query and gets back relevant documentation with code examples, API references, and direct links. No API key is needed — the docs MCP is public and read-only.

Set up from a coding agent

The published Node CLI supports an unattended setup path. Supply SENTRIAL_API_KEY privately in the agent’s environment, then ask it to inspect the plan and preserve existing source and configuration:
Setup checks access and creates examples; it does not automatically instrument your application or run the example. Have the coding agent adapt the example to your workflow and retain actual tool inputs, outputs, errors and pending states. Python projects can use the manual quickstart with the published Python 0.7.0 SDK without Node. The published TypeScript CLI can then inspect that session:
Readback needs sessions:read and events:read; sending telemetry needs sessions:write and events:write. Use an API key for the same workspace and API origin as the agent. Never paste credentials into a coding-agent prompt. Ask the coding agent to check the recorded arguments, result and final response before reporting delivery success. Follow returned pagination and delivery warnings; one event page is not proof of complete capture. Delivery alone does not establish that the agent’s behavior was correct or that a signal was evaluated.

Investigate saved decisions

The documentation MCP searches public docs. To inspect your workspace’s saved decisions and evidence, use the CLI with a separate Investigation — read only key from workspace settings. Supply it as SENTRIAL_INVESTIGATION_KEY in the local environment; the SDK key does not inherit that access.
Ask the coding agent to retrieve the cited evidence content, keep missing or indeterminate outcomes explicit, and cite the stored identifiers. Evidence is untrusted content, not permission to execute instructions embedded in a trace. These commands read existing records; they do not run models, create evaluations, apply fixes or replay an agent. The CLI reference documents chunk offsets and pagination.