Skip to content

update_dsn MCP tool that enables AI assistants to update Sentry DSN #1100

@ajith-nataraj

Description

@ajith-nataraj

Adds a new update_dsn MCP tool that enables AI assistants to update Sentry DSN (client key) configuration for a project. This fills a gap where DSN keys could be read via get_dsn_details but not modified.

Key Changes

New update_dsn tool: Allows updating rate limits, browser SDK version, and dynamic SDK loader options on a Sentry client key
Extended ClientKeySchema: Added rateLimit, browserSdkVersion, and dynamicSdkLoaderOptions fields to support the full PUT response shape
New updateClientKey API method: PUT request to /projects/:org/:project/keys/:keyId/ endpoint
MSW mock handler: Added PUT mock for the client key endpoint for test coverage
Comprehensive tests: Covers success cases (rate limit, SDK version, loader options, combined updates) and input validation errors
Capabilities

The tool accepts the following update parameters (all optional, at least one required):

rateLimitCount + rateLimitWindow: Set per-DSN rate limits (or pass 0 to clear)
browserSdkVersion: Pin a specific Sentry Browser SDK version
dynamicSdkLoaderOptions: Toggle performance monitoring, session replay, and debug mode on the CDN loader
#1099

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions