---
title: "Set Up"
description: "Learn how to set up Sentry MCP Monitoring"
url: https://docs.sentry.io/ai/monitoring/mcp/getting-started/
---

# Set Up

Sentry MCP Observability 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:

## [Supported SDKs](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#supported-sdks)

### [JavaScript - MCP Server](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#javascript---mcp-server)

##### Version requirement

MCP Observability<!-- --> requires <!-- -->Node SDK<!-- --> version `9.46.0` or newer.

The Sentry JavaScript SDK supports MCP observability by wrapping the MCP Server from the [@modelcontextprotocol/sdk](https://www.npmjs.com/package/@modelcontextprotocol/sdk) package. This wrapper automatically captures spans for your MCP server workflows including tool executions, resource access, and client connections.

#### [Quick Start with MCP Server](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#quick-start-with-mcp-server)

```javascript
import * as Sentry from "@sentry/node";
import { McpServer } from "@modelcontextprotocol/sdk";

// Sentry init needs to be above everything else
Sentry.init({
  dsn: "___PUBLIC_DSN___",
  tracesSampleRate: 1.0,
});

// Your MCP server with optional input/output recording
const server = Sentry.wrapMcpServerWithSentry(
  new McpServer({
    name: "my-mcp-server",
    version: "1.0.0",
  }),
  {
    recordInputs: true,
    recordOutputs: true,
  }
);

...
```

#### [Options](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#options)

##### [`recordInputs`](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#recordinputs)

*Type: `boolean`*

Records inputs to MCP tool and prompt calls (such as tool arguments and prompt parameters).

Defaults to `true` if `sendDefaultPii` is `true`.

##### [`recordOutputs`](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#recordoutputs)

*Type: `boolean`*

Records outputs from MCP tool and prompt calls (such as tool results and prompt messages).

Defaults to `true` if `sendDefaultPii` is `true`.

### [Python - MCP Server](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#python---mcp-server)

##### Version requirement

MCP Observability<!-- --> requires <!-- -->Python SDK<!-- --> version `2.43.0` or newer.

The Sentry Python SDK supports MCP observability for the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) (both low-level and FastMCP APIs) and [standalone FastMCP](https://gofastmcp.com/getting-started/welcome). The integration automatically captures spans for your MCP server workflows including tool executions, resource access, and prompt handling.

#### [Quick Start](https://docs.sentry.io/ai/monitoring/mcp/getting-started.md#quick-start)

```python
import sentry_sdk
from sentry_sdk.integrations.mcp import MCPIntegration
from mcp.server.fastmcp import FastMCP

# Sentry init needs to be above everything else
sentry_sdk.init(
    dsn="___PUBLIC_DSN___",
    traces_sample_rate=1.0,
    # Optional: Enable to capture tool call arguments and results in Sentry, which may include PII
    send_default_pii=True,
    integrations=[MCPIntegration()],
)

# Create the MCP server
mcp = FastMCP("Example MCP Server")

# Define a tool
@mcp.tool()
async def calculate_sum(a: int, b: int) -> int:
    """Add two numbers together."""
    return a + b

# Run the server
mcp.run()
```
