Official Fastify OpenTelemetry Instrumentation
Connect Otel to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Official Fastify OpenTelemetry Instrumentation. The otel mcp server is what makes that connection.
@fastify/otel works as a metric creator as well as application performance monitor for your Fastify application.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
onRequest — preParsingpreValidation — preHandlerpreSerialization — onSendonResponse — onErrorFastifyOtelRequestContext — The FastifyOtelRequestContext is a wrapper around the OpenTelemetry Context and Tracer APIs. It also provides a way to manage the context of aFastifyOtelInstrumentationOptions — The FastifyOtelInstrumentationOptions tool exposed by this serverExamples — const fastifyOtelInstrumentation = new FastifyOtelInstrumentation({ registerOnInitialization: true, ignorePaths: (opts) => { // Ignore all paths that@fastify/otel on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
Configuration is passed through the environment: OTEL_SERVICE_NAME. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Otel's toolset — onRequest, preValidation, preSerialization and 4 more — is a fair guide to whether it matches your workflow. It is maintained by climba03003; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| onRequest | preParsing |
| preValidation | preHandler |
| preSerialization | onSend |
| onResponse | onError |
| FastifyOtelRequestContext | The FastifyOtelRequestContext is a wrapper around the OpenTelemetry Context and Tracer APIs. It also provides a way to manage the context of a request and its associated spans as well as some utilities to extract and inj |
| FastifyOtelInstrumentationOptions | The FastifyOtelInstrumentationOptions tool exposed by this server. |
| Examples | const fastifyOtelInstrumentation = new FastifyOtelInstrumentation({ registerOnInitialization: true, ignorePaths: (opts) => { // Ignore all paths that start with /ignore return opts.url.startsWith('/ignore'); }, }); |
{
"mcpServers": {
"otel": {
"command": "npx",
"args": ["-y", "@fastify/otel"],
"env": {
"OTEL_SERVICE_NAME": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| OTEL_SERVICE_NAME | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.