
Python MCP 服务器为 AI 编码助手提供 OpenTelemetry 文档、示例和仪器指导
概览
一个模型上下文协议(MCP)服务器,连接了人工智能编码助手(如ClaudeCode、OpenCode、Windsurf和Cursor)与OpenTelemetry生态系统。它提供对OpenTelemetry仓库、文档、示例、语义约定以及仪器评分规范的实时访问,帮助工程师在其应用中实现高质量的可观测性。 OpenTelemetry 拥有详尽的文档和多种实现模式。该 MCP 服务器帮助 AI 助手: - 应对OpenTelemetry文档的复杂性 - 提供准确、最新的仪器代码 - 遵循最佳实践和语义规范 - 生成具有定性高分的仪器 - 避免常见陷阱和反模式 MCP服务器为AI助手完成OpenTelemetry任务提供了工具和提示: - - 浏览OpenTelemetry仓库和搜索问题 - - 语言特定的示例和文档 - - 访问标准化属性......
概述(AI 翻译)
OpenTelemetry MCP 服务器
一个模型上下文协议(MCP)服务器,桥接AI编码助手(如 ClaudeCode、OpenCode、Windsurf 和 Cursor)与 OpenTelemetry 生态系统共同应用。它 提供对OpenTelemetry仓库的实时访问,提供文档, 示例、语义惯例及仪器评分规范为 帮助工程师在其应用中实现高质量的可观察性。
为什么要用这个?
OpenTelemetry 拥有详尽的文档和多种实现模式。这点 MCP服务器帮助AI助手:
- 应对OpenTelemetry文档的复杂性
- 提供准确、最新的仪器代码
- 遵循最佳实践和语义规范
- 生成具有高质量评分的仪器
- 避免常见的陷阱和反模式
特色
MCP 服务器提供工具和提示,帮助 AI 助手 OpenTelemetry 任务:
- 仓库与问题访问 - 浏览OpenTelemetry仓库并搜索 问题
- 示例与文档 - 语言特定的示例和文档
- 语义约定 - 访问标准化属性定义
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
OpenTelemetry MCP Server
A Model Context Protocol (MCP) server that bridges AI coding assistants (like ClaudeCode, OpenCode, Windsurf, and Cursor) with the OpenTelemetry ecosystem. It provides real-time access to OpenTelemetry repositories, documentation, examples, semantic conventions, and the instrumentation score specification to help engineers implement high-quality observability in their applications.
Why use this?
OpenTelemetry has extensive documentation and many implementation patterns. This MCP server helps AI assistants:
- Navigate the complexity of OpenTelemetry documentation
- Provide accurate, up-to-date instrumentation code
- Follow best practices and semantic conventions
- Generate instrumentation that scores qualitatively high
- Avoid common pitfalls and anti-patterns
Features
The MCP server provides tools and prompts to help AI assistants with OpenTelemetry tasks:
- Repository & Issue Access - Browse OpenTelemetry repositories and search issues
- Examples & Documentation - Language-specific examples and documentation
- Semantic Conventions - Access to standardized attribute definitions
- Instrumentation Scoring - Evaluate telemetry quality based on best practices
- AI Prompts - Analyze code and generate instrumentation suggestions
Additional capabilities:
- Self-Instrumented - Full distributed tracing with OpenTelemetry
- Multi-Transport - Supports stdio (local), HTTP, and SSE protocols
- Production Ready - Kubernetes manifests, health checks, graceful shutdown
- GitHub Integration - Authenticated API access via GitHub App or Personal Access Token
Security Notice
Currently supported authentication methods:
- GitHub Personal Access Token (PAT) - For individual, local use.
- GitHub App - For hosted deployments.
IMPORTANT: OAuth support is planned for future implementations. Ensure your
安装
npx @modelcontextprotocol/inspector uv run otel-instrumentation-mcp配置
{
"mcpServers": {
"otel-instrumentation-mcp": {
"command": "uv",
"args": ["run", "otel-instrumentation-mcp"],
"cwd": "/path/to/otel-instrumentation-mcp",
"env": {
"GITHUB_TOKEN": "your_github_token"
}
}
}
}