MCP server
This site ships a Model Context Protocol server, so an AI agent can set up Belemetry from what the library actually is rather than from what it remembers. Its tools answer from this build's own text - the README, the XML documentation compiled into the assembly, the source of every page you have been reading - and two of them go further: one writes a configuration for your host, and one reviews a configuration for the mistakes that compile cleanly and then send nothing, or send too much.
Why a telemetry SDK needs one
Telemetry fails quietly. There is no exception when the collector rejects the page's origin, and no warning when an API key ships to every visitor. The mistakes an agent is most likely to make are exactly the ones nobody notices until the dashboard is empty - or until a privacy review:
The dashboard is empty
Consent defaults to None, and the app never asks: nothing has been granted, so nothing leaves the browser.
Answered by ReviewBelemetryConfiguration
Requests fail with CORS errors
The browser posts to the collector from the page's origin, and the collector does not allow it.
Answered by GetBelemetrySetupGuide
An API key is in the page source
Exporter headers are part of the browser configuration unless the transport is Relay or the exporter is .NET-only.
Answered by ReviewBelemetryConfiguration
Connect your agent
The server speaks MCP over Streamable HTTP at https://belemetry.bitplatform.dev/mcp. When you run this demo yourself it is at
https://belemetry.bitplatform.dev/mcp. The same tools are also plain GET endpoints under
/api/mcp/..., which is what the panels further down this page call.
One command, from anywhere in your project.
claude mcp add --transport http belemetry https://belemetry.bitplatform.dev/mcpAdd it to .vscode/mcp.json in the workspace, and it is offered to Copilot in agent mode.
{
"servers": {
"belemetry": {
"type": "http",
"url": "https://belemetry.bitplatform.dev/mcp"
}
}
}Add it to .cursor/mcp.json for this project, or to ~/.cursor/mcp.json for all of them.
{
"mcpServers": {
"belemetry": {
"url": "https://belemetry.bitplatform.dev/mcp"
}
}
}Add it to claude_desktop_config.json, then restart the app. mcp-remote bridges the desktop app's stdio to the HTTP server.
{
"mcpServers": {
"belemetry": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://belemetry.bitplatform.dev/mcp"]
}
}
}Search everything
An agent rarely knows which corpus holds the answer. SearchBelemetry covers the guide, every
public type and member, the semantic conventions and the demo pages at once - and every hit names the
follow-up call that returns it in full.
Generate a configuration
GenerateBelemetryConfiguration writes every file a host needs - the registrations, where
<BelemetryScript /> and <BelemetryInitializer /> go, a consent banner when the
app needs one - from the same rules the reviewer below checks against. Pick a host, the exporters and the
consent model.
Exporters
Review a configuration
ReviewBelemetryConfiguration is the pass that closes the loop after an agent writes code. It looks
for the mistakes that compile: a consent default that sends everything before anyone agreed, an OTLP
endpoint that already ends in /v1/traces (Belemetry appends the signal path itself), a vendor API
key in an exporter the browser script will use. The sample below makes all three on purpose.
Look up a convention
LookupBelemetryConventions answers "what is this attribute called" and "where does this record land
in Application Insights" from the same tables as the Semantic conventions
and Azure mapping pages - an attribute, an event name, a feature, a storage key or an
Azure table.
Tools
The catalog loads once the page is interactive.
Prompts
Prompts are the workflows: which tools to call, in which order, for a whole task. They exist because an agent holding seven tools rarely fails for lack of knowledge - it fails by skipping the review that would have caught the mistake.
Resources
The same knowledge as URIs, for clients that attach documentation to a conversation up front or let a person
browse and pin it. belemetry://source/{path} is a template: any path
GetBelemetrySourceFile lists.
How it stays true
Documentation that is written down separately drifts, and an agent cannot tell a stale answer from a fresh one. So nothing the server says is written down twice:
- The API reference is reflected out of the shipped Bit.Belemetry assembly and paired with the XML documentation compiled into it - the same catalog behind the API tables on every page of this site. A new option appears the moment it is written, with the default a freshly constructed options object really has.
- The README and the demo pages are embedded into the server, so the tools keep working from a published deployment and hand out the same text this site renders.
- The generator and the reviewer share their rules. What one writes, the other passes - and what the reviewer flags is what the generator never writes.