alanzha2 avatar

Observe Instrument Mcp

alanzha2/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 tools

Public 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_KEYsecret

API key for Anthropic Claude (default LLM provider)

LLM_MODEL

LLM model to use (default: claude-sonnet-4-6). Supports Anthropic, OpenAI, Gemini, Groq, Ollama via LiteLLM.

OPENAI_API_KEYsecret

API key for OpenAI models

GEMINI_API_KEYsecret

API key for Google Gemini models

GROQ_API_KEYsecret

API 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:


View the full README on GitHub

Details

Repository
github.com/alanzha2/observe-instrument-mcp
Category
AI & LLM Tools
Package
observe-instrument-mcp
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related AI & LLM Tools MCP servers

View all
1apilocker avatarAPI Lockerapilocker/apilockerEncrypted credential vault: LLM, service & OAuth keys. 21-tool MCP server for your AI agent.0stars
2ariekogan avatarAteam Mcpariekogan/ateam-mcpBuild, validate, and deploy multi-agent AI solutions from any AI environment.0stars
3bch1212 avatarInjectshieldbch1212/injectshieldPrompt-injection firewall for AI agents — scan untrusted text before LLM calls.0stars
4bitofacoder avatarOmni Mcp Serverbitofacoder/omni-mcp-serverAll-in-one MCP server: GitHub, Git, Slack, web fetch, memory, and filesystem. Agent Mode opt-in.0stars
5brunosrz avatarVectorabrunosrz/vectoraAI assistant with RAG, web search, filesystem and memory. MCP sub-agent for Claude Code.0stars
6caffeine avatarCaffeinecaffeineCaffeine's MCP server lets you build full-stack apps from inside Claude, ChatGPT, Cursor, or other agents. Send a build prompt, get progress updates, and have y0stars