telemetry-mcp
Provides tools to query telemetry data stored in Google BigQuery, allowing listing sources, describing schemas, running bounded queries, and computing aggregates.
Allows emitting telemetry data (metrics, events, spans) via the OpenTelemetry protocol, supporting ad-hoc emission without managing context.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@telemetry-mcpwhat were the average error rates in the last hour?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
telemetry-mcp
telemetry-mcp is a small, read-only Model Context
Protocol server that exposes a configurable
metrics/telemetry backend as typed tools: list sources, describe a source's
schema, run a bounded query, and compute a single aggregate. It turns ad-hoc
"go read the numbers" scripts into constrained, structured tools an agent can
call.
The package also ships an opt-in, write-side sibling entrypoint,
telemetry-emit-mcp, for at-will OpenTelemetry emission. It is separate
from the default query server so telemetry-mcp stays read-only and
zero-dependency by default.
The server is schema-agnostic by design: it hard-codes no dataset, table, or metric. The shape of the available telemetry is supplied entirely by the injected backend, so the same server works against whatever dataset infra wires up.
Repo structure: this ships as a per-server repo, following the shipped convention (e.g.
reddit-mcp,dispatch-mcp). Whether the fleet's MCP servers consolidate into a singleagent-mcprepo is pending a consolidation decision; until that lands, this stays per-server.
Tools
Tool | Purpose |
| List the telemetry sources (datasets/tables/metrics) the backend exposes. |
| Describe one source: its description and |
| Bounded, read-only query over |
| A single aggregate ( |
Related MCP server: mcp-bauplan
At-will emit server
telemetry-emit-mcp is a separate MCP server for agents that need to record a
value or occurrence while they work without managing OpenTelemetry context by
hand. It exports vendor-neutral OTLP using the standard OpenTelemetry SDK and
honors the OTEL_EXPORTER_OTLP_* environment variables the runtime already
uses.
Tool | Signal | Purpose |
| Metric | Emit ad-hoc values such as equity, P&L, queue depth, and counters. This is the primary at-will path and does not require trace context. |
| Event/log | Emit occurrence markers. If a W3C |
| Span | Emit a bounded operation span only when it can be parented to an active trajectory span. Missing or invalid |
This routing follows the public otel-emit-at-will skill:
values are metrics;
occurrences are events;
spans are only for bounded operations that can be auto-parented.
The default read-only query server does not import the OpenTelemetry SDK. Install the write-side server explicitly:
pipx install "telemetry-mcp[emit] @ git+https://github.com/selamy-labs/telemetry-mcp@v0.2.0"MCP client config for the emit server:
{
"mcpServers": {
"telemetry-emit": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/selamy-labs/telemetry-mcp@v0.2.0#egg=telemetry-mcp[emit]",
"telemetry-emit-mcp"
],
"env": {
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector.example.internal",
"OTEL_SERVICE_NAME": "nash-agent"
}
}
}
}start / end are ISO-8601 instants. filters is an optional column -> value
mapping (keys are validated; values are bound as query parameters by the backend,
never string-interpolated). limit is capped by the core.
Security model
This server is built so that exposing it does not expose arbitrary data access or command execution. The properties below are enforced in code and covered by tests.
Read-only. The tools are list/describe/query/summary. There is no write, no DDL, and no
run_sql/ raw-query escape hatch — a caller cannot supply query text. The optionaltelemetry-emit-mcpentrypoint is a separate write-side server and does not register any query tools.Bounded. Every query is time-ranged and
limit-capped (MAX_LIMIT), so a call cannot pull an unbounded result set.No embedded credentials. Nothing in this package stores a token or key. Credentials are resolved at call time by an injected
CredentialProvider(backed by WIF/GSM/env in production) and handed to the backend per request; they never live in source, in the service, or in a returned payload (tests assert the sentinel credential never appears in output).Validated handles. Source / metric / filter-key names are restricted to a conservative identifier shape, so a rejected lookup cannot smuggle injection or path traversal into the backend (defence in depth; the backend's own allowlist is the real gate).
Schema-agnostic. No dataset/table/metric is hard-coded; the backend defines what exists, so the server cannot leak the existence of anything the backend does not expose.
Deliberate omissions
No tool lets the caller supply or override executed query text.
No tool returns or accepts credentials.
No mutation/DDL capability — if you need to change data, that is out of scope here by design.
Configuration (environment, resolved at call time)
Variable | Effect |
| BigQuery project the production backend targets (consumed once infra wires it). |
| BigQuery dataset whose tables/views become the available sources. |
No credentials are read from the environment by this server; identity is resolved per call from the runtime (WIF/GSM) by the credential provider.
What infra must wire (the build split)
This repo is the offline-testable scaffold. The core, the MCP wrapper, the backend interface, and a full offline test suite (fake in-memory backend) are complete here. The live BigQuery adapter + credentials are intentionally not wired — that is the infra half:
Backend implementation. Complete
BigQueryBackendinsrc/telemetry_mcp/backend.py(currently fails fast with "not wired up"). It must implement the read-only, parameterised path:list_sources/describefrom the dataset's tables/views andINFORMATION_SCHEMA.query/summaryas read-only BigQuery jobs where the time range and filter values are passed as query parameters (never interpolated), andlimitbecomes aLIMITclause.Install the optional dependency:
pip install 'telemetry-mcp[bigquery]'.
Dataset. A BigQuery dataset (in the chosen project, e.g.
speedforge-prod-499002) whose tables/views are the telemetry sources. The server adopts whatever schema the dataset has — nothing is hard-coded.Identity (keyless). A Workload Identity Federation service account with read-only BigQuery access to that dataset (e.g.
roles/bigquery.dataViewerroles/bigquery.jobUser). TheCredentialProviderresolves this at call time; no key is stored in this repo or the image. (Prefer WIF over a static SA key.)
Config. Set
TELEMETRY_BQ_PROJECTandTELEMETRY_BQ_DATASETfor the workload.
The write-side telemetry-emit-mcp needs the runtime's OTLP configuration
instead: OTEL_EXPORTER_OTLP_ENDPOINT, optional OTLP headers/protocol variables,
and OTEL_SERVICE_NAME.
Until step 1 lands, the production backend raises and only the fake-backed offline path runs — so this scaffold is safe to ship and CI is green without any GCP access.
Install
Run directly from GitHub with the MCP extra:
uvx --from "git+https://github.com/selamy-labs/telemetry-mcp@v0.1.0#egg=telemetry-mcp[mcp]" telemetry-mcpOr with pipx:
pipx install "telemetry-mcp[mcp] @ git+https://github.com/selamy-labs/telemetry-mcp@v0.1.0"MCP client config
{
"mcpServers": {
"telemetry": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/selamy-labs/telemetry-mcp@v0.1.0#egg=telemetry-mcp[mcp]",
"telemetry-mcp"
],
"env": {
"TELEMETRY_BQ_PROJECT": "speedforge-prod-499002",
"TELEMETRY_BQ_DATASET": "telemetry"
}
}
}
}Architecture
The metrics logic lives once in telemetry_mcp.core.MetricsService; the MCP
server in telemetry_mcp.mcp_server is a thin wrapper that serialises structured
results to JSON and maps expected failures to ToolError. All data access goes
through an injected backend (telemetry_mcp.backend.MetricsBackend) and all
credential resolution through an injected CredentialProvider, so the full
validate / route / shape path is exercised offline in tests with a fake
in-memory backend — no GCP, no network. The default backend
(BigQueryBackend) uses only the standard library until infra wires it, so the
core package has zero runtime dependencies; the mcp SDK and
google-cloud-bigquery are optional extras.
Development
python -m pip install -e ".[test]"
ruff format --check .
ruff check .
coverage run -m pytest
coverage report --fail-under=95License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/selamy-labs/telemetry-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server