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
| Tool | Description |
|---|---|
get_traces | Retrieve all collected OpenTelemetry traces, with optional limit |
get_trace | Retrieve a single trace and its spans by trace_id |
get_spans | Retrieve collected spans, optionally filtered by trace_id and limit |
get_logs | Retrieve all collected OpenTelemetry logs, with optional limit |