Socket
Book a DemoInstallSign in
Socket

@arizeai/openinference-instrumentation-mcp

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arizeai/openinference-instrumentation-mcp

OpenInference instrumentation for MCP

0.2.4
latest
Source
npmnpm
Version published
Weekly downloads
572
-23.94%
Maintainers
7
Weekly downloads
 
Created
Source

OpenInference Instrumentation for MCP Typescript SDK

npm version

This module provides automatic instrumentation for the MCP Typescript SDK. which may be used in conjunction with @opentelemetry/sdk-trace-node.

Installation

npm install --save @arizeai/openinference-instrumentation-mcp

Usage

To load the MCP instrumentation, manually instrument the @modelcontextprotocol/sdk/client/index and/or @modelcontextprotocol/sdk/server/index module. The client and server must be manually instrumented due to the non-traditional module structure in @modelcontextprotocol/sdk. Additional instrumentations can be registered as usual using the registerInstrumentations function.

For example, if using stdio transport,

import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { MCPInstrumentation } from "@arizeai/openinference-instrumentation-mcp";
import * as MCPClientStdioModule from "@modelcontextprotocol/sdk/client/stdio";
import * as MCPServerStdioModule from "@modelcontextprotocol/sdk/server/stdio";

const provider = new NodeTracerProvider();
provider.register();

const mcpInstrumentation = new MCPInstrumentation();
// MCP must be manually instrumented as it doesn't have a traditional module structure
mcpInstrumentation.manuallyInstrument({
  clientStdioModule: MCPClientStdioModule,
  serverStdioModule: MCPServerStdioModule,
});

For more information on OpenTelemetry Node.js SDK, see the OpenTelemetry Node.js SDK documentation.

FAQs

Package last updated on 14 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.