Let AI tools like Cursor and Claude Code search Sentrial docs to instrument your agents automatically.
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.
claude mcp add --transport http Sentrial https://www.sentrial.com/docs/mcp
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.
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.”
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.
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:
npx --yes --package @sentrial/sdk@0.6.0 sentrial doctor --session <session-id> --workspace <organization-uuid> --jsonnpx --yes --package @sentrial/sdk@0.6.0 sentrial sessions get <session-id> --jsonnpx --yes --package @sentrial/sdk@0.6.0 sentrial events list <session-id> --json
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.
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.
Assistant
Responses are generated using AI and may contain mistakes.