Skip to main content
Glama
ryu1maniwa

OpenTelemetry Documentation MCP Server

by ryu1maniwa
README.md
# 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](https://github.com/awslabs/mcp/tree/main/src/aws-documentation-mcp-server) by Amazon Web Services, licensed under the Apache License 2.0.

## 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`):

```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 .`:

```json
{
  "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.

```python
read_documentation(url: str) -> str
```

### search_documentation

Searches OpenTelemetry documentation using Google Custom Search.

```python
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

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 issues