Skip to main content
Glama
OpenTelemetry Documentation MCP Server

OpenTelemetry Documentation MCP Server

by ryu1maniwa

OpenTelemetry Documentation MCP Server

Model Context Protocol (MCP) server for OpenTelemetry Documentation

This MCP server provides tools to access OpenTelemetry documentation and search for content using Google Custom Search.

Acknowledgements

This project is based on aws-documentation-mcp-server by Amazon Web Services, licensed under the Apache License 2.0.

Related MCP server: DocumentSearch MCP

Features

  • Read Documentation: Fetch and convert OpenTelemetry documentation pages to markdown format

  • Search Documentation: Search OpenTelemetry documentation using Google Custom Search

Prerequisites

Required Components

  • Docker installed on your system

  • Internet access to pull dependencies and access OpenTelemetry documentation

Google API Key Setup

To use the search functionality, you must obtain a Google API key:

  1. Visit the Google Cloud Console (https://console.cloud.google.com/apis/credentials)

  2. Create a new API key for the Custom Search API

  3. Add this API key to your MCP configuration as shown in the installation section

Without a valid Google API key, the search_documentation tool will not function properly.

Installation

Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit ~/.aws/amazonq/mcp.json):

{
  "mcpServers": {
    "opentelemetry-documentation-mcp-server": {
      "command": "uvx",
      "args": ["git+https://github.com/ryu1maniwa/opentelemetry-documentation-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

or docker after a successful docker build -t opentelemetry-documentation-mcp-server .:

{
  "mcpServers": {
    "opentelemetry-documentation-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "--interactive",
        "--env",
        "FASTMCP_LOG_LEVEL=ERROR",
        "--env",
        "GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY",
        "opentelemetry-documentation-mcp-server:latest"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

Basic Usage

Example:

  • "look up documentation on OpenTelemetry tracing concepts. cite your sources"

  • "search OpenTelemetry documentation for information about metrics and instrumentation"

  • "find documentation about OpenTelemetry SDK configuration"

Tools

read_documentation

Fetches a OpenTelemetry documentation page and converts it to markdown format.

read_documentation(url: str) -> str

search_documentation

Searches OpenTelemetry documentation using Google Custom Search.

search_documentation(search_phrase: str, limit: int) -> list[dict]

Google Custom Search Integration

This server uses Google Custom Search to provide search functionality for OpenTelemetry documentation. The Custom Search Engine ID (cx) used is the one used by opentelemetry.io itself:

  • Custom Search Engine ID: 015faf7de29c34606

API Limits

The Google Custom Search API has the following limits:

  • Free tier: 100 queries per day

  • $5 per 1000 queries after that

  • Maximum of 10 results per query

Available Tools

2 tools
read_documentationA

Fetch and convert a OpenTelemetry documentation page to markdown format.

Usage

This tool retrieves the content of a OpenTelemetry documentation page and converts it to markdown format. For long documents, you can make multiple calls with different start_index values to retrieve the entire content in chunks.

URL Requirements

  • Must be from the opentelemetry.io domain

  • Must be a documentation page

Example URLs

Output Format

The output is formatted as markdown text with:

  • Preserved headings and structure

  • Code blocks for examples

  • Lists and tables converted to markdown format

Handling Long Documents

If the response indicates the document was truncated, you have several options:

  1. Continue Reading: Make another call with start_index set to the end of the previous response

  2. Stop Early: For very long documents (>30,000 characters), if you've already found the specific information needed, you can stop reading

Args: ctx: MCP context for logging and error handling url: URL of the OpenTelemetry documentation page to read max_length: Maximum number of characters to return start_index: On return output starting at this character index

Returns: Markdown content of the OpenTelemetry documentation

Inputs: url (required), max_length, start_index. Returns: result

search_documentationA

Search OpenTelemetry documentation using Google Custom Search.

Usage

This tool searches across OpenTelemetry documentation for pages matching your search phrase. Use it to find relevant documentation when you don't have a specific URL.

Search Tips

  • Use specific technical terms rather than general phrases

  • Include OpenTelemetry concepts to narrow results (e.g., "tracing instrumentation" instead of just "tracing")

  • Use quotes for exact phrase matching (e.g., "SDK configuration")

  • Include abbreviations and alternative terms to improve results (e.g., "OTEL collector")

API Limits

The search uses Google's Custom Search API which has usage limits:

  • Free tier: 100 queries per day

  • Results are limited to 10 per page

Result Interpretation

Each result includes:

  • rank_order: The relevance ranking (lower is more relevant)

  • url: The documentation page URL

  • title: The page title

  • context: A brief excerpt or summary (if available)

Args: ctx: MCP context for logging and error handling search_phrase: Search phrase to use limit: Maximum number of results to return (will be capped at 10 due to API limitations)

Returns: List of search results with URLs, titles, and context snippets

Inputs: search_phrase (required), limit. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: 'read_documentation' fetches and converts specific documentation pages to markdown, while 'search_documentation' searches across documentation for relevant pages. There is no overlap in functionality, and an agent can easily differentiate between retrieving known content and discovering unknown content.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern with snake_case naming: 'read_documentation' and 'search_documentation'. The verbs ('read' and 'search') are distinct and appropriate for their functions, and the naming scheme is predictable and readable throughout the set.

    Tool Count2/5

    With only 2 tools, the server feels thin for its purpose of providing OpenTelemetry documentation access. While the tools cover basic retrieval and search, the scope suggests potential for more operations (e.g., listing documentation categories, filtering by version, or handling API interactions), making the count insufficient for a comprehensive documentation server.

    Completeness3/5

    The server covers core documentation access with read and search functions, but there are notable gaps. It lacks tools for browsing documentation structure (e.g., listing sections or topics), handling updates or version-specific content, or integrating with other OpenTelemetry resources, which limits agent workflows to basic lookup tasks without broader context.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers