Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions docs/platforms/python/integrations/mcp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,23 @@ uv add "sentry-sdk[mcp]"

## Configure

If you have the `mcp` package in your dependencies, the MCP integration will be enabled automatically when you initialize the Sentry SDK.
Simply update your `sentry_sdk.init()` call to include the `MCPIntegration()`.

<PlatformContent includePath="getting-started-config" />
```python
import sentry_sdk
from sentry_sdk.integrations.mcp import MCPIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
traces_sample_rate=1.0,
# Add data like tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
send_default_pii=True,
integrations=[
MCPIntegration(),
],
)
```

## Verify

Expand All @@ -63,6 +77,9 @@ sentry_sdk.init(
# Add data like tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
send_default_pii=True,
integrations=[
MCPIntegration(),
],
)

# Create the MCP server
Expand Down Expand Up @@ -115,6 +132,9 @@ sentry_sdk.init(
dsn="___PUBLIC_DSN___",
traces_sample_rate=1.0,
send_default_pii=True,
integrations=[
MCPIntegration(),
],
)

# Create the low-level MCP server
Expand Down
Loading