Guide

MCP Server

Query telemetry data from AI agents via the Model Context Protocol

The module exposes a built-in MCP server at /__nuxt-otel-mcp for querying OpenTelemetry data over the Model Context Protocol.

The MCP integration is development-only. The OTEL tools query in-memory trace and log stores that are populated during development. In production builds, the OTEL-specific tools are not available.

Connect an MCP client

Once the dev server is running, connect any MCP client to the endpoint:

http://localhost:3000/__nuxt-otel-mcp

For example, in Cursor or VS Code:

.vscode/mcp.json
{
  "mcpServers": {
    "nuxt-otel": {
      "url": "http://localhost:3000/__nuxt-otel-mcp"
    }
  }
}

Available tools

ToolDescription
get_tracesRetrieve all collected OpenTelemetry traces, with optional limit
get_traceRetrieve a single trace and its spans by trace_id
get_spansRetrieve collected spans, optionally filtered by trace_id and limit
get_logsRetrieve all collected OpenTelemetry logs, with optional limit

Next steps

Copyright © 2026