opentelemetry
OpenTelemetry Model Context Protocol (MCP) Server to enable your LLM be an OTEL expert.
claude mcp add --transport stdio pavolloffay-opentelemetry-mcp-server opentelemetry-mcp-server --protocol http --addr 0.0.0.0:8080
How to use
This MCP server provides a dedicated interface to configure OpenTelemetry components via the MCP protocol. It exposes tools that return strict JSON schemas for each collector component, enabling an LLM to generate validated collector configurations and ensure correctness before deployment. The server operates as a collector extension and connector, offering a live view of the configuration options supported by the OpenTelemetry collector. You can access the tools list (referenced in the TOOLS.md file in the repository) to understand the available operations for building and validating collector configurations, including endpoints, receivers, processors, and exporters. To start, run the server and connect a client (the MCP client in your environment) to http://<host>:8080/mcp, then use the provided tools to generate component-specific configuration blocks that conform to the expected JSON schemas.
How to install
Prerequisites:
- Go (1.18+ or newer) for building from source or installing via go install
- Docker (optional) if you prefer running a container
- Internet access to fetch the binary or container image
Option A: Install and run via Go (recommended for development or direct usage)
- Install the MCP server binary: go install github.com/pavolloffay/opentelemetry-mcp-server@latest
- Run the MCP server (HTTP, listening on port 8080): opentelemetry-mcp-server --protocol http --addr 0.0.0.0:8080
Option B: Run via Docker
- Start the MCP server in a container (expose port 8080): docker run --rm -it -p 8080:8080 ghcr.io/pavolloffay/opentelemetry-mcp-server:latest --protocol http --addr 0.0.0.0:8080
Option C: Example CLI usage after install
- Connect a client to the MCP endpoint: http://localhost:8080/mcp
- Use the Claude/LLM workflow to add a new MCP target, for example: claude mcp add --transport=http otel http://localhost:8080/mcp --scope user
Additional notes
Tips and considerations:
- The server uses the collectorschema module to validate collector configurations. Expect strict JSON schemas for each component (receivers, processors, exporters, etc.).
- If running behind a reverse proxy or in a container, ensure the /mcp endpoint is reachable and that CORS or authentication requirements align with your environment.
- The README references a variety of OpenTelemetry MCP examples in the TOOLS.md section; consult that file for a complete list of supported tools and their expected input/output shapes.
- If you encounter issues with port binding or protocol, verify that the address and port are not in use and that firewall rules permit inbound connections on the chosen port.
- Environment variables are not strictly required for a basic run, but you may need to configure logging levels, TLS settings, or custom collector configurations via additional flags or env vars depending on deployment needs.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go