Get the FREE Ultimate OpenClaw Setup Guide →

opentelemetry

OpenTelemetry Model Context Protocol (MCP) Server to enable your LLM be an OTEL expert.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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)

  1. Install the MCP server binary: go install github.com/pavolloffay/opentelemetry-mcp-server@latest
  2. 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

  1. 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

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

Sponsor this space

Reach thousands of developers