Instrumentation Mcp
@traceloop/instrumentation-mcp
MCP (Model Context Protocol) Instrumentation
0 downloads
v0.22.6
Capabilities
tools
Installation
Quick Install
Install using the MCPSearch CLI (recommended)
mcp install @traceloop/instrumentation-mcpDon't have the CLI? Install it first
Run with npx
Run directly without installing
npx -y @traceloop/instrumentation-mcpManual Configuration
Add to your MCP client configuration file
CClaude Code / Claude Desktop
Add to ~/.claude/claude_desktop_config.json
{
"mcpServers": {
"instrumentation-mcp": {
"command": "npx",
"args": [
"-y",
"@traceloop/instrumentation-mcp"
]
}
}
}CuCursor
Add to ~/.cursor/mcp.json
{
"mcp": {
"servers": {
"instrumentation-mcp": {
"command": "npx",
"args": [
"-y",
"@traceloop/instrumentation-mcp"
]
}
}
}
}VSVS Code / Continue.dev
Add to .vscode/mcp.json or Continue settings
{
"mcpServers": {
"instrumentation-mcp": {
"command": "npx",
"args": [
"-y",
"@traceloop/instrumentation-mcp"
]
}
}
}About
# OpenTelemetry MCP Instrumentation for Node.js
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This library allows tracing of agentic workflows implemented with MCP (Model Context Protocol) framework using the [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk).
## Installation
```bash
npm install --save @traceloop/instrumentation-mcp
```
## Usage
```javascript
const { McpInstrumentation } = require("@traceloop/instrumentation-mcp");
const { registerInstrumentations } = require("@opentelemetry/instrumentation");
registerInstrumentations({
instrumentations: [new McpInstrumentation()],
});
```
## Privacy
By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.
However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also want to disable this logging to reduce the size of your traces.
To disable logging, set the `traceContent` config option to `false`:
```javascript
const { McpInstrumentation } = require("@traceloop/instrumentation-mcp");
const mcpInstrumentation = new McpInstrumentation({
traceContent: false,
});
```
## Instrumented Operations
This instrumentation tracks the following MCP operations:
### Client Operations
- Session lifecycle management
- Tool invocations
- Resource access
- Prompt templates
- MCP protocol methods
### Server Operations
- Request handling
- Tool execution
- Resource serving
- Server-side spans
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[npm-url]: https://www.npmjs.com/package/@traceloop/instrumentation-mcp
[npm-img]: https://badge.fury.io/js/%40traceloop%2Finstrumentation-mcp.svg
[license-url]: https://github.com/traceloop/openllmetry-js/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
Reviews
No reviews yet. Be the first to review this package!
Quick Install
Install using the MCPSearch CLI (recommended)
mcp install @traceloop/instrumentation-mcpDon't have the CLI? Install it first
Run with npx
Run directly without installing
npx -y @traceloop/instrumentation-mcpManual Configuration
Add to your MCP client configuration file
CClaude Code / Claude Desktop
Add to ~/.claude/claude_desktop_config.json
{
"mcpServers": {
"instrumentation-mcp": {
"command": "npx",
"args": [
"-y",
"@traceloop/instrumentation-mcp"
]
}
}
}CuCursor
Add to ~/.cursor/mcp.json
{
"mcp": {
"servers": {
"instrumentation-mcp": {
"command": "npx",
"args": [
"-y",
"@traceloop/instrumentation-mcp"
]
}
}
}
}VSVS Code / Continue.dev
Add to .vscode/mcp.json or Continue settings
{
"mcpServers": {
"instrumentation-mcp": {
"command": "npx",
"args": [
"-y",
"@traceloop/instrumentation-mcp"
]
}
}
}Compatible With
Claude CodeCursorWindsurfContinue.dev
Details
- Version
- 0.22.6
- License
- Apache-2.0
- Category
- memory
- MCP Version
- 1.0
- Published
- 11/24/2025
- Updated
- 1/18/2026