
Observe Instrument Mcp
This server automatically adds OpenTelemetry instrumentation to your Python AI agents without manual code changes. It exposes two tools: instrument_agent reads your agent file, applies the ioa-observe-sdk tracing, and writes it back with a backup, while check_instrumentation audits what's missing. It works with LangGraph, LlamaIndex, CrewAI, and raw OpenAI SDK code. Under the hood it uses an LLM (Claude by default, but supports OpenAI, Gemini, Groq, or local Ollama) to intelligently insert the instrumentation calls. After running it, you spin up the included OTel Collector and ClickHouse stack to query spans and trace your agent's execution. Reach for this when you need observability on existing agents but don't want to manually wire up tracing calls.
- tools
- 2
- auth
- Secret needed
- transport
- STDIO
- env vars
- 5
- last updated
- Mar 14, 2026
Tools
2 toolsPublic tool metadata for what this MCP can expose to an agent.
instrument_agentReads a Python agent file, applies full observe SDK instrumentation, writes it back, and returns a summary of changes.
Reads a Python agent file, applies full observe SDK instrumentation, writes it back, and returns a summary of changes.
No parameter schema in public metadata yet.
check_instrumentationAudits a file for missing instrumentation without modifying it.
Audits a file for missing instrumentation without modifying it.
No parameter schema in public metadata yet.
Sponsors
Configuration
ANTHROPIC_API_KEYsecretAPI key for Anthropic Claude (default LLM provider)
LLM_MODELLLM model to use (default: claude-sonnet-4-6). Supports Anthropic, OpenAI, Gemini, Groq, Ollama via LiteLLM.
OPENAI_API_KEYsecretAPI key for OpenAI models
GEMINI_API_KEYsecretAPI key for Google Gemini models
GROQ_API_KEYsecretAPI key for Groq models
Readme
observe-instrument-mcp
An MCP server that automatically instruments Python AI agents with the ioa-observe-sdk — adding OpenTelemetry-based tracing, metrics, and logs with zero manual effort.
Works with any MCP-compatible AI coding assistant: Claude Desktop, Cursor, Windsurf, and others.
What it does
Two tools:
instrument_agent — reads a Python agent file, applies full observe SDK instrumentation, writes it back, and returns a summary of changes. Creates a .bak backup before modifying.
check_instrumentation — audits a file for missing instrumentation without modifying it.
Supported frameworks: LlamaIndex, LangGraph, CrewAI, raw OpenAI SDK.
Installation
pip install observe-instrument-mcp
# or
uv add observe-instrument-mcp
Requires an API key for your chosen LLM provider. Defaults to Claude (ANTHROPIC_API_KEY). See supported providers below.
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Details
- Repository
- github.com/alanzha2/observe-instrument-mcp
- Category
- AI & LLM Tools
- Package
observe-instrument-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active