← Back to scan
File as GitHub Issue repo: modelcontextprotocol/python-sdk

Push this scan report to modelcontextprotocol/python-sdk

Click the green button below to open GitHub’s new-issue form, pre-filled with the report title, summary table, top findings, and an embedded score-card image. No authentication needed — you review on GitHub before submitting. Repobility is credited as the scanner.

Embedded score card image

This image will render at the top of the issue body. Hosted on Repobility, refreshes automatically after re-scans.

Repobility score card

Issue title

Bare Except Pass

Curate findings to include

Pick exactly which findings appear in the issue body. By default the top 5 are included. Uncheck noise, check what matters.

Top 5 (default)
Severity Rule Title File:line
CRIT MINED107 Missing import: `queue` used but not imported src/mcp/shared/experimental/tasks/messa…:167
CRIT MINED107 Missing import: `warnings` used but not imported src/mcp/shared/tool_name_validation.py:67
CRIT MINED107 Missing import: `http` used but not imported tests/interaction/_connect.py:283
HIGH SEC030 [SEC030] Open Redirect — user-controlled redirect target: Redirect target is taken direct… src/mcp/server/auth/handlers/authorize.…:131
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… src/mcp/server/experimental/task_result…:170
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… src/mcp/os/win32/utilities.py:302
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… src/mcp/os/posix/utilities.py:43
HIGH SEC128 [SEC128] Async function without await — fire-and-forget Promise (AI mistake): Async call … src/mcp/cli/claude.py:107
HIGH MINED009 [MINED009] Floats For Money: Variable named price/amount/cost typed as float instead of D… src/mcp/server/mcpserver/context.py:87
HIGH MINED009 [MINED009] Floats For Money: Variable named price/amount/cost typed as float instead of D… src/mcp/client/client.py:177
HIGH MINED009 [MINED009] Floats For Money: Variable named price/amount/cost typed as float instead of D… examples/snippets/servers/elicitation.py:54
HIGH MINED006 [MINED006] Overcatch Baseexception: except BaseException: ... — prevents Ctrl+C and Syste… examples/snippets/clients/url_elicitati…:269
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… examples/servers/simple-auth/mcp_simple…:127
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… examples/servers/simple-auth/mcp_simple…:126
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… examples/servers/simple-auth/mcp_simple…:176
HIGH MINED110 Blocking call `input` inside async function `start` examples/clients/simple-chatbot/mcp_sim…:376
HIGH MINED110 Blocking call `input` inside async function `elicitation_callback` examples/clients/simple-task-interactiv…:33
HIGH MINED110 Blocking call `input` inside async function `interactive_loop` examples/clients/simple-auth-client/mcp…:311
HIGH MINED110 Blocking call `input` inside async function `run_command_loop` examples/snippets/clients/url_elicitati…:266
HIGH MINED110 Blocking call `input` inside async function `handle_url_elicitation` examples/snippets/clients/url_elicitati…:103
HIGH MINED110 Blocking call `input` inside async function `handle_callback` examples/snippets/clients/oauth_client.…:50
HIGH MINED108 `self.aclose` used but never assigned in __init__ tests/client/conftest.py:30
HIGH MINED108 `self.aclose` used but never assigned in __init__ tests/interaction/_helpers.py:82
HIGH MINED108 `self.aclose` used but never assigned in __init__ tests/interaction/_helpers.py:58
HIGH MINED108 `self.receive` used but never assigned in __init__ tests/interaction/_helpers.py:48
HIGH MINED131 pre-commit hook `https://github.com/igorshubovych/markdownlint-cli` pinned to mutable rev… .pre-commit-config.yaml:14
HIGH MINED131 pre-commit hook `https://github.com/pre-commit/mirrors-prettier` pinned to mutable rev `v… .pre-commit-config.yaml:8
HIGH MINED131 pre-commit hook `https://github.com/pre-commit/pre-commit-hooks` pinned to mutable rev `v… .pre-commit-config.yaml:4
HIGH SEC004 [SEC004] SQL Injection Risk: String interpolation in SQL execution. Allows SQL injection. examples/servers/simple-task-interactiv…:65
MED SEC134 [SEC134] AI scaffold leftover — Lorem ipsum / example.com / John Doe in code: Lorem ipsum… src/mcp/shared/exceptions.py:72
MED SEC034 [SEC034] Log Injection / Log Forging — unsanitized user input in log: User input is logge… src/mcp/server/sse.py:244
MED SEC123 [SEC123] Production stack trace / debug output exposed: Debug mode left on in production … examples/servers/simple-streamablehttp-…:104
MED SEC123 [SEC123] Production stack trace / debug output exposed: Debug mode left on in production … examples/servers/simple-auth/mcp_simple…:67
MED SEC123 [SEC123] Production stack trace / debug output exposed: Debug mode left on in production … examples/servers/simple-auth/mcp_simple…:68
MED MINED111 Bare except continues silently src/mcp/server/mcpserver/utilities/cont…:28
MED MINED111 Bare except continues silently src/mcp/server/mcpserver/server.py:315
MED MINED111 Bare except continues silently src/mcp/server/experimental/request_con…:207
MED MINED111 Bare except continues silently src/mcp/server/lowlevel/server.py:512
MED MINED111 Bare except continues silently src/mcp/shared/experimental/tasks/helpe…:161
MED MINED111 Bare except continues silently src/mcp/client/auth/utils.py:265
MED MINED109 Mutable default argument in `_exchange_token_authorization_code` (dict) src/mcp/client/auth/oauth2.py:379
MED MINED109 Mutable default argument in `install` (list) src/mcp/cli/cli.py:361
MED MINED109 Mutable default argument in `dev` (list) src/mcp/cli/cli.py:221
MED MINED111 Bare except continues silently src/mcp/server/stdio.py:55
MED MINED111 Bare except continues silently examples/clients/simple-auth-client/mcp…:297
MED MINED111 Bare except continues silently examples/clients/simple-auth-client/mcp…:277
MED MINED111 Bare except continues silently examples/clients/simple-auth-client/mcp…:236
MED MINED111 Bare except continues silently examples/snippets/clients/url_elicitati…:132
MED MINED111 Bare except continues silently examples/snippets/clients/url_elicitati…:118
MED MINED111 Bare except continues silently examples/servers/everything-server/mcp_…:304
MED MINED111 Bare except continues silently examples/servers/everything-server/mcp_…:245
MED MINED111 Bare except continues silently examples/servers/everything-server/mcp_…:213
MED MINED111 Bare except continues silently examples/servers/everything-server/mcp_…:191
MED MINED111 Bare except continues silently tests/interaction/transports/_bridge.py:145
MED MINED111 Bare except continues silently scripts/update_readme_snippets.py:89
MED ERR001 [ERR001] Silent Exception Swallowing: Silently swallowing all exceptions hides bugs. Even… src/mcp/os/win32/utilities.py:302
MED ERR001 [ERR001] Silent Exception Swallowing: Silently swallowing all exceptions hides bugs. Even… src/mcp/server/experimental/task_result…:170
MED WEB003 Public web service has no security.txt .well-known/security.txt
LOW COMP001 [COMP001] High cognitive complexity: Function `replay_events_after` has cognitive complex… examples/servers/simple-streamablehttp/…:68
LOW COMP001 [COMP001] High cognitive complexity: Function `_validate_resource` has cognitive complexi… examples/servers/simple-auth/mcp_simple…:85
LOW COMP001 [COMP001] High cognitive complexity: Function `run` has cognitive complexity 8 (SonarSour… examples/clients/simple-task-interactiv…:74
LOW AIC003 Duplicated implementation block across source files src/mcp/server/lowlevel/experimental.py:98
LOW AIC003 Duplicated implementation block across source files src/mcp/server/experimental/task_contex…:406
INFO MINED074 [MINED074] Ai Tell Fake Citation: Plausible-looking but non-existent URLs (e.g., docs.exa… src/mcp/shared/_httpx_utils.py:52
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… src/mcp/client/experimental/tasks.py:201
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… examples/snippets/servers/lifespan_exam…:21
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… examples/servers/simple-auth/mcp_simple…:266
INFO MINED069 [MINED069] Debug True Prod: Django/Flask DEBUG=True or app.debug=True in non-test files. examples/servers/simple-streamablehttp-…:104
INFO MINED069 [MINED069] Debug True Prod: Django/Flask DEBUG=True or app.debug=True in non-test files. examples/servers/simple-auth/mcp_simple…:67
INFO MINED069 [MINED069] Debug True Prod: Django/Flask DEBUG=True or app.debug=True in non-test files. examples/servers/simple-auth/mcp_simple…:68
INFO MINED043 [MINED043] Http Not Https: Hardcoded http:// (not localhost) for endpoints that handle cr… examples/servers/simple-auth/mcp_simple…:131
INFO MINED043 [MINED043] Http Not Https: Hardcoded http:// (not localhost) for endpoints that handle cr… examples/servers/simple-auth/mcp_simple…:122
INFO MINED043 [MINED043] Http Not Https: Hardcoded http:// (not localhost) for endpoints that handle cr… examples/servers/simple-auth/mcp_simple…:172
INFO MINED062 [MINED062] Python Dataclass No Fields: @dataclass over an empty class — unfinished model. examples/servers/sse-polling-demo/mcp_s…:18
INFO MINED062 [MINED062] Python Dataclass No Fields: @dataclass over an empty class — unfinished model. examples/servers/simple-streamablehttp/…:18
INFO MINED062 [MINED062] Python Dataclass No Fields: @dataclass over an empty class — unfinished model. examples/mcpserver/weather_structured.py:72
INFO MINED064 [MINED064] Python Input Call: input() blocks for stdin. Inappropriate in services. examples/snippets/clients/url_elicitati…:103
INFO MINED064 [MINED064] Python Input Call: input() blocks for stdin. Inappropriate in services. examples/snippets/clients/oauth_client.…:50
INFO MINED064 [MINED064] Python Input Call: input() blocks for stdin. Inappropriate in services. examples/clients/simple-task-interactiv…:33
Reset to top 5 79 findings available (after auto-suppression of test files + won't-fix)

Issue body (markdown)

## Code-quality scan: `modelcontextprotocol/python-sdk`

**Score: 92/100 (A)**  ·  144 findings  ·  scanned 2026-05-31 01:27 UTC  ·  75,658 LOC

| Severity | Count |
|---|---|
| CRITICAL | 3 |
| HIGH | 26 |
| MEDIUM | 29 |
| LOW | 5 |

📊 [Full filterable report](https://repobility.com/scan/09a82e1c-3c7b-4e96-9fa0-263fa270bb5b/)  ·  ![scorecard](https://repobility.com/scan/09a82e1c-3c7b-4e96-9fa0-263fa270bb5b/report.png?v=1780190824-s2)

### Top findings

1. **CRITICAL** `MINED107` — Missing import: `queue` used but not imported
   `src/mcp/shared/experimental/tasks/message_queue.py:167` · ✓ Repobility
2. **CRITICAL** `MINED107` — Missing import: `warnings` used but not imported
   `src/mcp/shared/tool_name_validation.py:67` · ✓ Repobility
3. **CRITICAL** `MINED107` — Missing import: `http` used but not imported
   `tests/interaction/_connect.py:283` · ✓ Repobility
4. **HIGH** `SEC030` — Open Redirect — user-controlled redirect target
   `src/mcp/server/auth/handlers/authorize.py:131` · CWE-601 · A01:2021 Broken Access Control (open redirect)
5. **HIGH** `MINED001` — Bare Except Pass
   `src/mcp/server/experimental/task_result_handler.py:170` · CWE-755 · ✓ Repobility

---

**Security note**: this issue is public. If any flagged finding is a real, exploitable vulnerability, please redirect to your `SECURITY.md` policy or open a [private security advisory](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) instead. We're happy to close this and re-submit privately.

---

_Filed automatically. Close this issue if not useful — we won't refile. Full report: https://repobility.com/scan/09a82e1c-3c7b-4e96-9fa0-263fa270bb5b/_
Already filed
This repo publishes a SECURITY.md policy and the scan contains 8 Critical/High security finding(s). Public issue filing would violate coordinated disclosure. Submit privately via the project's security reporting channel.
Megaproject â high spam risk
Could not determine 'modelcontextprotocol/python-sdk' star count (GitHub API rate-limited or unreachable). When in doubt about repo size, prefer opening a focused PR or a discussion rather than an issue.
Already filed
118/161 findings (73%) on this scan are already flagged as test-file, won't-fix, or suppressed. The scan is too noisy to file as a single issue. Curate down to specific actionable findings, or address the FP source first.

The button opens GitHubâs new-issue page in a new tab. You will see the title + body pre-filled â review, edit if you want, then click GitHubâs "Submit new issue" button. Repobility never posts anything on your behalf.

For real security findings on big repos: use the project's SECURITY.md or private advisory flow instead of a public issue.