Skip to content

ref(mcp): Replace instance patches with middleware#6764

Open
alexander-alderman-webb wants to merge 9 commits into
webb/mcp/prompt-argumentsfrom
webb/mcp/use-middleware-5
Open

ref(mcp): Replace instance patches with middleware#6764
alexander-alderman-webb wants to merge 9 commits into
webb/mcp/prompt-argumentsfrom
webb/mcp/use-middleware-5

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Add a middleware instead of wrapping handlers on registration.
All requests go through the middleware, whereas there are multiple ways to register a handler.

Issues

Reminders

@alexander-alderman-webb alexander-alderman-webb changed the base branch from webb/mcp/use-middleware-4 to webb/mcp/prompt-arguments July 7, 2026 09:35
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

90302 passed | ⏭️ 6310 skipped | Total: 96612 | Pass Rate: 93.47% | Execution Time: 313m 20s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +265
Passed Tests 📈 +257
Failed Tests
Skipped Tests 📈 +8

All tests are passing successfully.

✅ Patch coverage is 83.55%. Project has 2429 uncovered lines.
✅ Project coverage is 89.86%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/mcp.py 83.55% ⚠️ 25 Missing and 25 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.74%    89.86%    +0.12%
==========================================
  Files          192       192         —
  Lines        23823     23951      +128
  Branches      8226      8284       +58
==========================================
+ Hits         21378     21522      +144
- Misses        2445      2429       -16
- Partials      1349      1368       +19

Generated by Codecov Action

@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review July 7, 2026 11:39
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner July 7, 2026 11:39
Comment thread sentry_sdk/integrations/mcp.py Outdated
Comment thread sentry_sdk/integrations/mcp.py
Comment thread sentry_sdk/integrations/mcp.py Outdated
Comment thread sentry_sdk/integrations/mcp.py
Comment thread sentry_sdk/integrations/mcp.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5477c8e. Configure here.

Comment thread sentry_sdk/integrations/mcp.py
Comment thread sentry_sdk/integrations/mcp.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant