Set Up

Learn how to set up Sentry MCP Monitoring

Sentry MCP Monitoring helps you track and debug Model Context Protocol (MCP) implementations using our supported SDKs and integrations. Monitor your complete MCP workflows from client connections to server responses, including tool executions, resource access, and protocol communications.

To start sending MCP data to Sentry, make sure you've created a Sentry project for your MCP-enabled repository and follow the guide below:

The Sentry JavaScript SDK supports MCP monitoring by wrapping the MCP Server from the @modelcontextprotocol/sdk package. This wrapper automatically captures spans for your MCP server workflows including tool executions, resource access, and client connections.

Copied
import { Sentry } from "@sentry/node";
import { McpServer } from "@modelcontextprotocol/sdk";

// Sentry init needs to be above everything else
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  tracesSampleRate: 1.0,
});

// Your MCP server
const server = Sentry.wrapMcpServerWithSentry(new McpServer({
    name: "my-mcp-server",
    version: "1.0.0",
}));

...
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").