Documentation Index
Fetch the complete documentation index at: https://docs.sedata-ai.tech/llms.txt
Use this file to discover all available pages before exploring further.
@sedata-ai/mcp is a drop-in instrumentation package for Model Context Protocol
servers. It captures every tool call as an OpenTelemetry
span, ships it to a backend you control, and runs an inline safety check on tool
inputs — all in one wrapper.
What you get
Zero-config tracing
Every
registerTool call is auto-wrapped with OpenTelemetry spans, durations, and counters.Inline safety checks
safetyCheck() blocks malicious or sensitive content before your handler runs.OTLP-native
Ship to Sedata Cloud, your own collector, or any OTLP/HTTP backend.
Custom instrumentation
Drop into the underlying tracer and meter for your own spans, histograms, and counters.
How it fits
You wrap your MCP server
One call to
instrumentServer(server, config) patches registerTool so every
tool invocation runs inside an OTel span.Tool calls produce spans + metrics
Each call records duration, status, request id, session id, client address,
tool metadata, and (optionally) safety-check verdicts.
Two pieces, one package
instrumentServer()
The single entry point. Returns an
ObservabilityInstance with helpers for
custom spans, histograms, counters, and graceful shutdown.safetyCheck()
A handler wrapper that runs your tool input through Sedata’s safety API
before the handler is called.
Quick links
Quickstart
Get a server emitting traces in five minutes.
API reference
Every function, class, and type exported from the package.
Examples
Working servers you can run end-to-end.
The Python and Go packages mirror the TypeScript SDK. This documentation covers
the TypeScript surface; tracking issues for the other runtimes live on
GitHub.