AI Slop Code RIsk Monitor

modelcontextprotocol/python-sdk

The official Python SDK for Model Context Protocol servers and clients

21.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for modelcontextprotocol/python-sdk, a Python project with 24,537 GitHub stars. SynthScan examined 270,733 lines of code across 1699 source files, recording 4504 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 21.4 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

21.4
Adjusted Signal
21.4
Raw Pattern Score
100%
Time Factor
2026-10-05
Last Push
24.5K
Stars
Python
Language
270.7K
Lines of Code
1.7K
Files
4.5K
Pattern Hits
2026-10-12
Scan Date
0.19
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 47.6/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 3432 finding(s).

Hallucinated Dependency & Supply Chain Risk 7.9/100 · LOW

Are imports declared and package/API names verified? 479 finding(s).

Agent Over-Engineering Ratio 58.9/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 3780 finding(s).

PR Review Velocity Impact 69.9/100 · HIGH

Which changes need focused human review? 4504 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 328MEDIUM 177LOW 3999

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 4504 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers3154 hits · 2932 pts
SeverityFileLineSnippetContext
LOWtests/test_examples.py64async def test_direct_call_tool_result_return():CODE
LOWtests/test_types.py80async def test_method_initialization():CODE
LOWtests/test_types.py165async def test_sampling_message_with_user_role():CODE
LOWtests/test_types.py188async def test_sampling_message_with_assistant_role():CODE
LOWtests/test_types.py218async def test_sampling_message_backward_compatibility():CODE
LOWtests/test_types.py245async def test_create_message_request_params_with_tools():CODE
LOWtests/test_types.py268async def test_create_message_result_with_tool_use():CODE
LOWtests/test_types.py291async def test_create_message_result_basic():CODE
LOWtests/test_types.py310async def test_client_capabilities_with_sampling_tools():CODE
LOWtests/test_types.py396def test_concrete_wire_results_always_dump_result_type_complete():CODE
LOWtests/test_types.py416def test_cacheable_results_default_to_immediately_stale_private():CODE
LOW⚡tests/test_types.py440def test_empty_result_dumps_no_fields_by_default():CODE
LOW⚡tests/test_types.py445def test_empty_result_dumps_result_type_only_when_explicitly_tagged():CODE
LOW⚡tests/test_types.py449def test_input_required_result_dumps_its_discriminating_tag():CODE
LOW⚡tests/test_types.py455def test_input_required_result_requires_at_least_one_of_input_requests_or_request_state():CODE
LOWtests/test_types.py469def test_mcp_types_namespace_mirrors_mcp_types_exactly():CODE
LOWtests/test_types.py483def test_mcp_types_submodules_mirror_mcp_types_submodules_exactly(mirror: ModuleType, source: ModuleType):CODE
LOWtests/test_types.py488def test_bare_import_mcp_binds_the_types_submodule():CODE
LOW⚡tests/types/test_version.py26def test_is_version_at_least_ordering(version: str, minimum: str, expected: bool) -> None:CODE
LOW⚡tests/types/test_version.py32def test_is_version_at_least_unknown_version_is_false(version: str) -> None:CODE
LOW⚡tests/types/test_version.py37def test_is_version_at_least_unknown_minimum_raises() -> None:CODE
LOW⚡tests/types/test_version.py46def test_is_version_at_least_matches_lexicographic_for_known_versions(version: str, minimum: str) -> None:CODE
LOW⚡tests/types/test_version.py52def test_supported_versions_are_known() -> None:CODE
LOW⚡tests/types/test_version.py58def test_known_versions_are_strictly_ordered() -> None:CODE
LOW⚡tests/types/test_methods.py577def test_cacheable_methods_mirror_the_cacheable_method_literal():CODE
LOW⚡tests/types/test_methods.py582def test_input_required_methods_mirror_the_monolith_input_required_arms():CODE
LOW⚡tests/types/test_methods.py587def test_is_input_required_matches_typed_and_wire_shapes():CODE
LOW⚡tests/types/test_methods.py597def test_minimal_request_bodies_parse_through_every_request_row():CODE
LOW⚡tests/types/test_methods.py606def test_minimal_notification_bodies_parse_through_every_notification_row():CODE
LOW⚡tests/types/test_methods.py615def test_minimal_result_bodies_parse_through_every_result_row():CODE
LOW⚡tests/types/test_methods.py624def test_non_file_root_uri_passes_the_surface_step_and_rejects_at_the_monolith_step():CODE
LOW⚡tests/types/test_methods.py777def test_extension_map_rows_parse_through_the_same_functions():CODE
LOW⚡tests/types/test_methods.py787def test_inconsistent_extension_maps_raise_runtime_error_after_the_surface_hit():CODE
LOW⚡tests/types/test_methods.py794def test_input_required_unions_discriminate_identically_in_both_arm_orders():CODE
LOW⚡tests/types/test_methods.py946def test_serialize_server_result_preserves_arbitrary_meta_value_identically(version: str):CODE
LOW⚡tests/types/test_methods.py953def test_serialize_server_result_preserves_open_type_extras():CODE
LOW⚡tests/types/test_methods.py963def test_serialize_server_result_drops_top_level_server_info_on_discover_but_keeps_the_meta_stamp():CODE
LOW⚡tests/types/test_methods.py981def test_serialize_server_result_drops_an_unknown_nested_tool_field():CODE
LOW⚡tests/types/test_methods.py987def test_serialize_server_result_raises_key_error_for_an_absent_row_and_value_error_for_an_unknown_version():CODE
LOW⚡tests/types/test_methods.py994def test_importing_the_module_builds_no_adapters_and_identical_rows_share_one():CODE
LOWtests/types/test_methods.py422def test_maps_define_exactly_the_expected_methods_for_every_known_version():CODE
LOWtests/types/test_methods.py438def test_spec_client_method_sets_are_the_client_direction_projection_of_the_surface_maps():CODE
LOWtests/types/test_methods.py446def test_elicit_result_surface_accepts_null_content_values_at_every_version_that_defines_it():CODE
LOWtests/types/test_methods.py457def test_discovery_capabilities_preserve_nested_json_values() -> None:CODE
LOWtests/types/test_methods.py473def test_elicit_request_surface_accepts_loose_property_schemas():CODE
LOWtests/types/test_methods.py502def test_response_map_keys_mirror_the_request_map_keys():CODE
LOWtests/types/test_methods.py507def test_response_row_values_match_the_pinned_classes_and_unions():CODE
LOWtests/types/test_methods.py527def test_surface_keys_agree_with_their_classes_and_the_monolith_maps():CODE
LOWtests/types/test_methods.py558def test_built_in_maps_are_immutable():CODE
LOWtests/types/test_methods.py647def test_absent_map_keys_raise_key_error_for_every_gate_shape():CODE
LOWtests/types/test_methods.py662def test_unknown_version_strings_raise_value_error_on_every_parse_function():CODE
LOWtests/types/test_methods.py705def test_empty_result_body_parses_at_versions_that_define_it():CODE
LOWtests/types/test_methods.py721def test_embedded_input_request_entries_without_method_reject_at_the_surface_step():CODE
LOWtests/types/test_methods.py758def test_none_params_omit_the_key_so_required_params_reject():CODE
LOWtests/types/test_methods.py765def test_snake_case_spellings_of_required_aliased_fields_reject_as_missing():CODE
LOWtests/types/test_methods.py826def test_sampling_union_keeps_the_complete_arm_first_because_order_is_load_bearing():CODE
LOWtests/types/test_methods.py849def test_validate_functions_accept_reject_and_gate_like_their_parse_siblings():CODE
LOWtests/types/test_methods.py912def test_dumped_monolith_results_round_trip_through_serialize_server_result(method: str, version: str):CODE
LOW⚡tests/types/test_request_name_param.py18def test_request_base_declares_no_name_param() -> None:CODE
LOW⚡tests/types/test_request_name_param.py22def test_core_request_types_inherit_none() -> None:CODE
3094 more matches not shown…
Cross-File Repetition254 hits · 1270 pts
SeverityFileLineSnippetContext
HIGHtests/transports/stdio/test_windows.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/server/test_streamable_http_modern.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/shared/test_request_clock.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/shared/test_jsonrpc_dispatcher.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/docs_src/test_subscriptions.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/client/test_input_required.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/interaction/auth/test_login_time.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGH…sts/interaction/transports/test_hosting_http_modern.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/interaction/lowlevel/test_timeouts.py0opt out of the shared per-module event loop: this module parametrizes `anyio_backend`.STRING
HIGHtests/server/test_session.py0a spec-method result that fails the per-version surface schema raises `validationerror` even when the caller's `result_tSTRING
HIGHtests/server/test_connection.py0a spec-method result that fails the per-version surface schema raises `validationerror` even when the caller's `result_tSTRING
HIGHtests/client/test_session.py0a spec-method result that fails the per-version surface schema raises `validationerror` even when the caller's `result_tSTRING
HIGHtests/server/test_session.py0peer results validate alias-only; a snake_case key from the wire is ignored as extra, not populated by python field nameSTRING
HIGHtests/server/test_connection.py0peer results validate alias-only; a snake_case key from the wire is ignored as extra, not populated by python field nameSTRING
HIGHtests/shared/test_peer.py0peer results validate alias-only; a snake_case key from the wire is ignored as extra, not populated by python field nameSTRING
HIGH…s/server/mcpserver/resources/test_resource_template.py0sync prompt functions must run in a worker thread, not the event loop.STRING
HIGH…/server/mcpserver/resources/test_function_resources.py0sync prompt functions must run in a worker thread, not the event loop.STRING
HIGHtests/server/mcpserver/prompts/test_base.py0sync prompt functions must run in a worker thread, not the event loop.STRING
HIGHtests/interaction/transports/test_hosting_http.py0registered so the logging capability is advertised; the client never sets a level.STRING
HIGHtests/interaction/transports/_stdio_server.py0registered so the logging capability is advertised; the client never sets a level.STRING
HIGHtests/interaction/lowlevel/test_logging.py0registered so the logging capability is advertised; the client never sets a level.STRING
HIGHtests/interaction/lowlevel/test_flows.py0registered so the logging capability is advertised; the client never sets a level.STRING
HIGHtests/interaction/transports/test_hosting_http.py0registered so the resources capability is advertised; the client never lists resources.STRING
HIGHtests/interaction/lowlevel/test_resources.py0registered so the resources capability is advertised; the client never lists resources.STRING
HIGHtests/interaction/lowlevel/test_list_changed.py0registered so the resources capability is advertised; the client never lists resources.STRING
HIGHdocs/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/zh-hant/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/ja/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/ru/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/pt/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/zh/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/uk/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/hi/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/de/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/ko/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/fr/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/es/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHi18n/tr/pages/deprecated.md0the user opened another folder: expose it through the roots callback, then tell the server.STRING
HIGHsrc/mcp-types/mcp_types/_types.py0a progress token, used to associate progress notifications with the original request.STRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0a progress token, used to associate progress notifications with the original request.STRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0a progress token, used to associate progress notifications with the original request.STRING
HIGHsrc/mcp-types/mcp_types/_types.py0the sender or recipient of messages and data in a conversation.STRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0the sender or recipient of messages and data in a conversation.STRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0the sender or recipient of messages and data in a conversation.STRING
HIGHsrc/mcp-types/mcp_types/_types.py0if specified, the caller is requesting out-of-band progress notifications for this request (as represented by notificatiSTRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0if specified, the caller is requesting out-of-band progress notifications for this request (as represented by notificatiSTRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0if specified, the caller is requesting out-of-band progress notifications for this request (as represented by notificatiSTRING
HIGHsrc/mcp-types/mcp_types/_types.py0an opaque token representing the current pagination position. if provided, the server should return results starting aftSTRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0an opaque token representing the current pagination position. if provided, the server should return results starting aftSTRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0an opaque token representing the current pagination position. if provided, the server should return results starting aftSTRING
HIGHsrc/mcp-types/mcp_types/_types.py0an opaque token representing the pagination position after the last returned result. if present, there may be more resulSTRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0an opaque token representing the pagination position after the last returned result. if present, there may be more resulSTRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0an opaque token representing the pagination position after the last returned result. if present, there may be more resulSTRING
HIGHsrc/mcp-types/mcp_types/_types.py0intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).STRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).STRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).STRING
HIGHsrc/mcp-types/mcp_types/_types.py0intended for ui and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar wSTRING
HIGHsrc/mcp-types/mcp_types/_v2025_11_25/__init__.py0intended for ui and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar wSTRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py0intended for ui and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar wSTRING
HIGHsrc/mcp-types/mcp_types/_types.py0an optional url of the website for this implementation.STRING
194 more matches not shown…
Unused Imports451 hits · 322 pts
SeverityFileLineSnippetContext
LOWtests/types/test_parity.py3CODE
LOWtests/server/mcpserver/test_func_metadata.py23CODE
LOWtests/shared/test_streamable_http.py7CODE
LOWtests/shared/test_otel.py1CODE
LOWtests/examples/conftest.py13CODE
LOWtests/examples/test_stories.py3CODE
LOWtests/examples/test_stories_smoke.py17CODE
LOWtests/examples/test_story_shape.py8CODE
LOWtests/client/test_probe.py14CODE
LOWtests/client/test_probe.py39CODE
LOWtests/client/test_session.py1CODE
LOWtests/client/test_client.py3CODE
LOWtests/interaction/transports/__init__.py7CODE
LOWexamples/snippets/clients/url_elicitation_client.py23CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py1CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py8CODE
LOWexamples/stories/_hosting.py8CODE
LOWexamples/stories/_hosting.py12CODE
LOWexamples/stories/_harness.py9CODE
LOWexamples/stories/_harness.py24CODE
LOWexamples/stories/_harness.py26CODE
LOWexamples/stories/_harness.py27CODE
LOWexamples/stories/_shared/auth.py6CODE
LOWscripts/gen_surface_types.py12CODE
LOWscripts/docs/llms_txt.py23CODE
LOWscripts/docs/gen_ref_pages.py13CODE
LOWscripts/docs/translations.py37CODE
LOWscripts/docs/build_config.py21CODE
LOWscripts/docs/check_crossrefs.py29CODE
LOWscripts/docs/check_render_order.py37CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
LOWsrc/mcp/__init__.py1CODE
391 more matches not shown…
Self-Referential Comments60 hits · 186 pts
SeverityFileLineSnippetContext
MEDIUMtests/server/test_lifespan.py43 # Create a tool that accesses lifespan contextCOMMENT
MEDIUMtests/server/auth/test_protected_resource.py18 # Create the protected resource routesCOMMENT
MEDIUMtests/server/auth/middleware/test_auth_context.py53 # Create an authenticated userCOMMENT
MEDIUMtests/server/auth/middleware/test_bearer_auth.py384 # Create a user with read/write scopes but not adminCOMMENT
MEDIUMtests/server/auth/middleware/test_bearer_auth.py413 # Create a user with read/write scopesCOMMENT
MEDIUMtests/server/auth/middleware/test_bearer_auth.py441 # Create a user with read/write scopesCOMMENT
MEDIUMtests/server/auth/middleware/test_bearer_auth.py466 # Create a user with read/write scopesCOMMENT
MEDIUMtests/server/auth/middleware/test_bearer_auth.py491 # Create a user with read/write scopesCOMMENT
MEDIUMtests/server/mcpserver/test_func_metadata.py371 # Create a copy of the actual schema to normalizeCOMMENT
MEDIUM⚡tests/server/mcpserver/test_server.py461 # Create a test imageCOMMENT
MEDIUM⚡tests/server/mcpserver/test_server.py465 # Create a test audioCOMMENT
MEDIUMtests/server/mcpserver/test_server.py369 # Create a test imageCOMMENT
MEDIUMtests/server/mcpserver/test_server.py389 # Create a test audioCOMMENT
MEDIUMtests/server/mcpserver/test_server.py425 # Create a test audio file with the specific extensionCOMMENT
MEDIUMtests/server/mcpserver/test_server.py847 # Create a text fileCOMMENT
MEDIUMtests/server/mcpserver/test_server.py863 # Create a binary fileCOMMENT
MEDIUMtests/server/mcpserver/test_elicitation.py67 # Create a custom handler for elicitation requestsCOMMENT
MEDIUMtests/server/mcpserver/auth/test_auth_integration.py107 # Create a RefreshToken object that matches what is expected in later codeCOMMENT
MEDIUMtests/server/mcpserver/auth/test_auth_integration.py370 # Create an auth code for the registered clientCOMMENT
MEDIUMtests/server/mcpserver/auth/test_auth_integration.py838 # Create a test client with the tokenCOMMENT
MEDIUM…s/server/mcpserver/resources/test_resource_template.py404 # Create a resource from the templateCOMMENT
MEDIUM…s/server/mcpserver/resources/test_resource_template.py454 # Create a resource from the templateCOMMENT
MEDIUM⚡tests/shared/test_streamable_http.py1706 # Create a mock SSE event with empty data (keep-alive ping)COMMENT
MEDIUM⚡tests/shared/test_streamable_http.py1709 # Create a context-aware stream writer (matches StreamWriter type alias)COMMENT
MEDIUM⚡tests/shared/test_streamable_http.py1731 # Create a transport with an event storeCOMMENT
MEDIUM⚡tests/shared/test_streamable_http.py1737 # Create a mock message and requestCOMMENT
MEDIUMtests/shared/test_streamable_http.py2163 # Create a client with custom headersCOMMENT
MEDIUMtests/issues/test_152_resource_mime_type.py25 # Create a small test image as bytesCOMMENT
MEDIUMtests/issues/test_152_resource_mime_type.py70 # Create a small test image as bytesCOMMENT
MEDIUMtests/issues/test_355_type_error.py20# Create a named serverCOMMENT
MEDIUM…sts/issues/test_1363_race_condition_streamable_http.py77 # Create a new event loop for this threadCOMMENT
MEDIUMtests/client/test_auth.py411 # Create a test requestCOMMENT
MEDIUMtests/client/test_auth.py1259 # Create a test requestCOMMENT
MEDIUMtests/client/test_auth.py1284 # Create a test requestCOMMENT
MEDIUMtests/client/test_auth.py1437 # Create a test requestCOMMENT
MEDIUMtests/client/test_auth.py2137 # Create a test requestCOMMENT
MEDIUMtests/client/test_session.py126 # Create a message handler to catch exceptionsCOMMENT
MEDIUMtests/client/test_logging_callback.py27 # Create a simple test toolCOMMENT
MEDIUMtests/client/test_logging_callback.py33 # Create a function that can send a log notificationCOMMENT
MEDIUMtests/client/test_logging_callback.py56 # Create a message handler to catch exceptionsCOMMENT
MEDIUMexamples/snippets/clients/streamable_basic.py14 # Create a session using the client streamsCOMMENT
MEDIUM…s/snippets/servers/streamable_http_multiple_servers.py31# Create a combined lifespan to manage both session managersCOMMENT
MEDIUM…les/snippets/servers/streamable_http_basic_mounting.py24# Create a lifespan context manager to run the session managerCOMMENT
MEDIUM…ples/snippets/servers/streamable_http_host_mounting.py24# Create a lifespan context manager to run the session managerCOMMENT
MEDIUM⚡examples/snippets/servers/streamable_starlette_mount.py12# Create the Echo serverCOMMENT
MEDIUM⚡examples/snippets/servers/streamable_starlette_mount.py22# Create the Math serverCOMMENT
MEDIUM⚡examples/snippets/servers/streamable_starlette_mount.py32# Create a combined lifespan to manage both session managersCOMMENT
MEDIUM⚡examples/snippets/servers/streamable_starlette_mount.py41# Create the Starlette app and mount the MCP serversCOMMENT
MEDIUMexamples/snippets/servers/mcpserver_quickstart.py9# Create an MCP serverCOMMENT
MEDIUM…amples/snippets/servers/streamable_http_path_config.py12# Create a simple MCPServer serverCOMMENT
MEDIUMexamples/mcpserver/readme-quickstart.py3# Create an MCP serverCOMMENT
MEDIUMsrc/mcp/server/models.py1"""This module provides simplified types to use with the server for managing promptsSTRING
MEDIUMsrc/mcp/server/sse.py7 # Create an SSE transport at an endpointSTRING
MEDIUMsrc/mcp/server/streamable_http.py781 # Create a standalone message stream for server-initiated messagesCOMMENT
MEDIUMsrc/mcp/server/streamable_http.py958 # Define an async callback for sending eventsCOMMENT
MEDIUMsrc/mcp/server/streamable_http.py1042 # Create the memory streams for this connectionCOMMENT
MEDIUMsrc/mcp/server/streamable_http.py1055 # Create a message router that distributes messages to request streamsCOMMENT
MEDIUMsrc/mcp/server/auth/middleware/auth_context.py8# Create a contextvar to store the authenticated userCOMMENT
MEDIUMsrc/mcp/server/lowlevel/server.py773 # Create the ASGI handlerCOMMENT
MEDIUMsrc/mcp/client/session_group.py378 # Create a reverse index so we can find all prompts, resources, andCOMMENT
Empty Error Handlers35 hits · 175 pts
SeverityFileLineSnippetContext
HIGHtests/server/mcpserver/resources/test_file_resources.py25except FileNotFoundError: # pragma: lax no coverCODE
HIGHtests/shared/test_streamable_http.py1686except Exception:CODE
HIGHtests/client/test_auth.py1689except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py3590except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py3668except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py513except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py1273except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py1376except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py1420except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py1529except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py1626except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py1963except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py2064except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py2204except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py2553except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py2639except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py2888except StopAsyncIteration:CODE
HIGHtests/client/test_auth.py2993except StopAsyncIteration:CODE
HIGHtests/client/test_scope_bug_1630.py168except StopAsyncIteration:CODE
HIGHdocs_src/subscriptions/tutorial005.py16except SubscriptionLost:CODE
HIGHsrc/mcp/server/transport_security.py143except ValueError:CODE
HIGHsrc/mcp/server/subscriptions.py208except anyio.ClosedResourceError:CODE
HIGHsrc/mcp/server/session.py120except KeyError:CODE
HIGHsrc/mcp/server/connection.py396except KeyError:CODE
HIGHsrc/mcp/server/streamable_http.py799except anyio.ClosedResourceError:CODE
HIGHsrc/mcp/server/auth/handlers/authorize.py110except (ValidationError, InvalidRedirectUriError):CODE
HIGHsrc/mcp/server/mcpserver/resources/types.py174except UnicodeError:CODE
HIGHsrc/mcp/server/mcpserver/utilities/logging.py33except ImportError: # pragma: no coverCODE
HIGHsrc/mcp/shared/dispatcher.py65except ValueError:CODE
HIGHsrc/mcp/shared/jsonrpc_dispatcher.py717except (anyio.WouldBlock, anyio.BrokenResourceError, anyio.ClosedResourceError):CODE
HIGHsrc/mcp/os/posix/utilities.py61except PermissionError:CODE
HIGHsrc/mcp/os/win32/utilities.py284except OSError:CODE
HIGHsrc/mcp/client/session.py592except KeyError:CODE
HIGHsrc/mcp/client/streamable_http.py414except (httpx2.StreamError, ValidationError):CODE
HIGHsrc/mcp/client/stdio.py161except anyio.ClosedResourceError:CODE
Decorative Section Separators75 hits · 174 pts
SeverityFileLineSnippetContext
MEDIUMtests/client/test_stdio.py59# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/client/test_stdio.py61# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/client/test_stdio.py1030# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/client/test_stdio.py1032# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/client/test_stdio.py1163# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/client/test_stdio.py1165# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/client/test_client.py757# ── SEP-2322 multi-round-trip auto-loop ────────────────────────────────────────COMMENT
MEDIUMtests/interaction/_requirements.py171 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py173 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py477 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py479 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py814 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py816 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py956 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py958 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1091 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1093 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1122 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1124 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1303 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1305 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1352 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1354 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1418 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1420 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1458 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1460 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1504 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1506 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1596 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1598 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1803 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py1805 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2052 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2054 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2129 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2131 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2181 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2183 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2202 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2204 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2531 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2533 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2594 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2596 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2731 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2733 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2844 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py2846 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3039 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3041 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3112 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3114 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3416 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3418 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3671 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py3673 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py4054 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py4056 # ═══════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtests/interaction/_requirements.py4109 # ═══════════════════════════════════════════════════════════════════════════COMMENT
15 more matches not shown…
Modern Structural Boilerplate119 hits · 119 pts
SeverityFileLineSnippetContext
LOW⚡tests/server/test_runner.py731 async def set_level(ctx: Ctx, params: SetLevelRequestParams) -> None:CODE
LOWtests/server/test_sse_security.py26logger = logging.getLogger(__name__)CODE
LOWtests/shared/conftest.py61__all__ = ["PairFactory", "direct_pair", "jsonrpc_pair"]CODE
LOWtests/cli/test_utils.py12def _set_mcp_version(monkeypatch: pytest.MonkeyPatch, version: str) -> None:CODE
LOWtests/cli/test_claude.py13def _set_mcp_version(monkeypatch: pytest.MonkeyPatch, version: str) -> None:CODE
LOWtests/client/test_auth.py58 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWtests/client/test_auth.py64 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWtests/client/test_session.py796def _set_negotiated_version(session: ClientSession, version: str) -> None:CODE
LOWtests/client/test_scope_bug_1630.py32 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWtests/client/test_scope_bug_1630.py38 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWtests/client/auth/extensions/test_client_credentials.py35 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWtests/client/auth/extensions/test_client_credentials.py41 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: # pragma: no coverCODE
LOWtests/client/auth/extensions/test_identity_assertion.py33 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWtests/client/auth/extensions/test_identity_assertion.py39 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWtests/interaction/auth/_harness.py119 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWtests/interaction/auth/_harness.py125 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWtests/interaction/transports/__init__.py9__all__ = ["StreamingASGITransport"]CODE
LOWexamples/snippets/clients/oauth_client.py32 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWexamples/snippets/clients/oauth_client.py40 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWexamples/snippets/clients/identity_assertion_client.py37 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWexamples/snippets/clients/identity_assertion_client.py43 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py40 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py46 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWexamples/stories/serve_one/server.py28__all__ = ["SingleExchangeContext", "build_server", "handle_one"]CODE
LOWexamples/stories/_shared/auth.py41 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWexamples/stories/_shared/auth.py47 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOW…vers/everything-server/mcp_everything_server/server.py51logger = logging.getLogger(__name__)CODE
LOW…ple-streamablehttp/mcp_simple_streamablehttp/server.py13logger = logging.getLogger(__name__)CODE
LOW…treamablehttp/mcp_simple_streamablehttp/event_store.py15logger = logging.getLogger(__name__)CODE
LOW…tateless/mcp_simple_streamablehttp_stateless/server.py10logger = logging.getLogger(__name__)CODE
LOWexamples/servers/simple-auth/mcp_simple_auth/server.py23logger = logging.getLogger(__name__)CODE
LOW…les/servers/simple-auth/mcp_simple_auth/auth_server.py29logger = logging.getLogger(__name__)CODE
LOW…ervers/simple-auth/mcp_simple_auth/legacy_as_server.py26logger = logging.getLogger(__name__)CODE
LOW…/servers/simple-auth/mcp_simple_auth/token_verifier.py9logger = logging.getLogger(__name__)CODE
LOW…ervers/sse-polling-demo/mcp_sse_polling_demo/server.py25logger = logging.getLogger(__name__)CODE
LOW…s/sse-polling-demo/mcp_sse_polling_demo/event_store.py15logger = logging.getLogger(__name__)CODE
LOW⚡.github/actions/conformance/client.py67logger = logging.getLogger(__name__)CODE
LOW.github/actions/conformance/client.py132 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOW.github/actions/conformance/client.py138 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWdocs_src/middleware/tutorial001.py15logger = logging.getLogger(__name__)CODE
LOWdocs_src/extensions/tutorial005.py9logger = logging.getLogger(__name__)CODE
LOWdocs_src/oauth_clients/tutorial002.py17 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWdocs_src/oauth_clients/tutorial002.py23 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWdocs_src/oauth_clients/tutorial001.py20 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWdocs_src/oauth_clients/tutorial001.py26 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWdocs_src/identity_assertion/tutorial001.py23 async def set_tokens(self, tokens: OAuthToken) -> None:CODE
LOWdocs_src/identity_assertion/tutorial001.py29 async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:CODE
LOWdocs_src/logging/tutorial001.py5logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/__init__.py74__all__ = [CODE
LOWsrc/mcp/server/runner.py75__all__ = [CODE
LOWsrc/mcp/server/runner.py87logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/server/_streamable_http_modern.py77logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/server/transport_security.py13logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/server/request_state.py34__all__ = [CODE
LOWsrc/mcp/server/request_state.py43logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/server/subscriptions.py57__all__ = [CODE
LOWsrc/mcp/server/subscriptions.py69logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/server/session.py24__all__ = ["ServerSession"]CODE
LOWsrc/mcp/server/session.py26logger = logging.getLogger(__name__)CODE
LOWsrc/mcp/server/__init__.py7__all__ = ["CacheHint", "Server", "ServerRequestContext", "MCPServer", "NotificationOptions", "InitializationOptions"]CODE
59 more matches not shown…
Excessive Try-Catch Wrapping109 hits · 116 pts
SeverityFileLineSnippetContext
LOWtests/shared/test_streamable_http.py1686 except Exception:CODE
LOWtests/interaction/transports/_bridge.py148 except Exception as exc: # The bridge is the application's outermost boundary: a crashCODE
MEDIUMdocs/migration.md570 print(f"Error: {e.error.message}")CODE
MEDIUMdocs/migration.md581 print(f"Error: {e.message}")CODE
LOWdocs/migration.md1514 except Exception as e:CODE
MEDIUMdocs/migration.md1511def handle_call_tool(ctx, params) -> CallToolResult:CODE
MEDIUMexamples/snippets/clients/url_elicitation_client.py78 print("Error: No URL provided in elicitation request")CODE
LOWexamples/snippets/clients/url_elicitation_client.py119 except Exception as e:CODE
LOWexamples/snippets/clients/url_elicitation_client.py133 except Exception:CODE
LOWexamples/snippets/clients/url_elicitation_client.py306 except Exception as e:CODE
MEDIUMexamples/snippets/clients/parsing_tool_results.py53 print(f"Error: {content.text}")CODE
MEDIUMexamples/snippets/servers/__init__.py36 print(f"Error: Server '{server_name}' not found")CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py93 except Exception as e:CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py152 except Exception as e:CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py169 except Exception as e:CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py279 except Exception as e:CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py319 except Exception as e:CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py335 except Exception as e:CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py245 except Exception as e:CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py286 except Exception as e:CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py306 except Exception as e:CODE
LOWexamples/stories/_harness.py200 except Exception:CODE
LOW…vers/everything-server/mcp_everything_server/server.py212 except Exception as e:CODE
LOW…vers/everything-server/mcp_everything_server/server.py234 except Exception as e:CODE
LOW…vers/everything-server/mcp_everything_server/server.py266 except Exception as e:CODE
LOW…vers/everything-server/mcp_everything_server/server.py325 except Exception as e:CODE
LOWexamples/servers/simple-auth/mcp_simple_auth/server.py156 except Exception:CODE
LOW…/servers/simple-auth/mcp_simple_auth/token_verifier.py88 except Exception as e:CODE
MEDIUMscripts/update_readme_snippets.py99 print(f"Error: README file not found: {readme_path}")CODE
LOWscripts/docs/check_render_order.py98 except Exception:CODE
LOW.github/actions/conformance/client.py367 except Exception:CODE
LOW.github/actions/conformance/client.py395 except Exception:CODE
LOW.github/actions/conformance/client.py612 except Exception as e:CODE
LOWsrc/mcp/server/_otel.py56 except Exception as e:CODE
LOWsrc/mcp/server/runner.py139 except Exception:CODE
LOWsrc/mcp/server/runner.py286 except Exception:CODE
LOWsrc/mcp/server/runner.py796 except Exception as exc:CODE
LOWsrc/mcp/server/_streamable_http_modern.py141 except Exception as exc:CODE
LOWsrc/mcp/server/_streamable_http_modern.py312 except Exception:CODE
LOWsrc/mcp/server/_streamable_http_modern.py366 except Exception:CODE
LOWsrc/mcp/server/request_state.py318 except Exception: # deny-on-error: a raising principal binding must fail closedCODE
LOWsrc/mcp/server/request_state.py374 except Exception: # deny-on-error: a buggy custom codec must fail closedCODE
LOWsrc/mcp/server/request_state.py452 except Exception: # deny-on-error: a raising custom codec must not leak its failureCODE
LOWsrc/mcp/server/subscriptions.py113 except Exception: # fan-out boundary: isolate listeners from each otherCODE
LOWsrc/mcp/server/subscriptions.py137 except Exception: # fan-out boundary: a raising bus must not skip stream cleanupCODE
MEDIUMsrc/mcp/server/streamable_http.py779def standalone_sse_writer():CODE
MEDIUMsrc/mcp/server/streamable_http.py955def replay_sender():CODE
MEDIUMsrc/mcp/server/streamable_http.py1056def message_router():CODE
LOWsrc/mcp/server/streamable_http.py374 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py467 except Exception: # pragma: no coverCODE
LOWsrc/mcp/server/streamable_http.py710 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py717 except Exception as err:CODE
LOWsrc/mcp/server/streamable_http.py802 except Exception:CODE
LOWsrc/mcp/server/streamable_http.py818 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py875 except Exception as e: # pragma: no coverCODE
LOWsrc/mcp/server/streamable_http.py997 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py1009 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py1015 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py1113 except Exception: # pragma: lax no coverCODE
LOWsrc/mcp/server/streamable_http.py1133 except Exception as e: # pragma: no coverCODE
49 more matches not shown…
Cross-Language Confusion21 hits · 115 pts
SeverityFileLineSnippetContext
HIGH⚡tests/server/test_request_state.py427 '["client-123",null,null]',CODE
HIGH⚡tests/server/test_request_state.py432 '["client-123",null,"alice"]',CODE
HIGHtests/server/test_sse_security.py253 body = b'{"jsonrpc": "2.0", "id": 1, "method": "ping", "params": null}'CODE
HIGHtests/server/test_streamable_http_modern.py834 null, so header validation still runs and a mismatched header is still rejected."""STRING
HIGHtests/server/mcpserver/test_func_metadata.py830 # An optional key the tool leaves out is absent, not null, so it validates against the schema aboveCOMMENT
HIGHtests/server/mcpserver/test_func_metadata.py155 "my_model_b": '{"how_many_shrimp": 5, "ok": {"x": 1}, "y": null}',CODE
HIGHtests/server/mcpserver/test_tool_manager.py312 {"tank": '{"x": null, "shrimp": [{"name": "rex"}, {"name": "gertrude"}]}'},CODE
HIGH⚡tests/shared/test_sse.py356 json_message = '{"jsonrpc": "2.0", "id": "123", "method": "ping", "params": null}'CODE
HIGH⚡tests/shared/test_sse.py360 json_message = '{"jsonrpc": "2.0", "id": 123, "method": "ping", "params": null}'CODE
HIGHtests/shared/test_auth.py135# would send (an unregistered application_type, an explicit null, an auth method the SDKCOMMENT
HIGH⚡tests/shared/test_auth.py185 """A server that dumps unset members as null, or echoes them as "", still yields aSTRING
HIGH⚡tests/shared/test_jsonrpc_dispatcher.py2031 """Parse-error responses (id=null) have no waiter; they're dropped and the read loop stays healthy."""STRING
HIGH⚡tests/client/test_auth.py134 b'"scopes_supported": null}'CODE
HIGHtests/client/test_auth.py1112 b'"application_type": "confidential", "redirect_uris": null, 'CODE
HIGHexamples/snippets/clients/url_elicitation_client.py289 print("(Start server with: cd examples/snippets && uv run server elicitation sse)")CODE
HIGHexamples/snippets/clients/url_elicitation_client.py305 print(" cd examples/snippets && uv run server elicitation sse")CODE
HIGHsrc/mcp/shared/auth.py152 # servers echo other strings or an explicit null; the value is informational here.COMMENT
HIGHsrc/mcp/shared/auth.py168 # Servers dump unset members of their client record as null, or echo them as "",COMMENT
HIGHsrc/mcp/shared/uri_template.py233 (RFC 6570 §2.3); if all are undefined, the expression contributesSTRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py2972 This can be any JSON value (object, array, string, number, boolean, or null).STRING
HIGHsrc/mcp-types/mcp_types/_v2026_07_28/__init__.py3026 This can be any JSON value (object, array, string, number, boolean, or null)STRING
AI Slop Vocabulary27 hits · 94 pts
SeverityFileLineSnippetContext
MEDIUMtests/interaction/transports/test_streamable_http.py221 # Bounded because a harness regression here historically meant deadlock, not failure.COMMENT
MEDIUMexamples/stories/manifest.toml84# A per-client fresh target over a real ASGI transport is harness machinery, not userCOMMENT
MEDIUM⚡.github/workflows/conformance.yml17 # Pinned conformance harness package spec (passed verbatim to `npx --yes`).COMMENT
MEDIUM⚡.github/workflows/conformance.yml23# `--spec-version <rev>` legs run every scenario the pinned harness marksCOMMENT
MEDIUM⚡.github/workflows/conformance.yml30# every shipped scenario at whichever wire the harness defaults it to; it isCOMMENT
MEDIUM.github/workflows/conformance.yml102 # The harness runs a leg's scenarios via unbounded Promise.all; underCOMMENT
MEDIUM.github/actions/conformance/run-client.sh28# If the harness's summary wording changes, the list comes up empty and theCOMMENT
MEDIUM⚡.github/actions/conformance/client.py69#: Spec version the harness is running this scenario at (e.g. "2025-11-25",COMMENT
MEDIUM⚡.github/actions/conformance/client.py70#: "2026-07-28"). The harness always sets this (when --spec-version is omittedCOMMENT
MEDIUM⚡.github/actions/conformance/client.py73#: outside the harness.COMMENT
MEDIUM.github/actions/conformance/client.py515 # The harness does not put the issuer in context, so for conformance weCOMMENT
MEDIUM.github/actions/conformance/client.py516 # learn it from the harness's PRM document (RFC 9728); productionCOMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2026-07-28.yml3# harness marks applicable at 2026-07-28, run stateless with per-request _meta.COMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2026-07-28.yml12# keyed by scenario name only: a scenario that passes at the harness defaultCOMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2026-07-28.yml17# Baseline established against the harness pinned via CONFORMANCE_PKG inCOMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2025-11-25.yml3# harness marks applicable at 2025-11-25, run over the stateful handshake.COMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2025-11-25.yml12# legs currently run these same scenarios at 2025-11-25 too: the harness'sCOMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2025-11-25.yml16# re-verification off the harness's baseline output.COMMENT
MEDIUM⚡…b/actions/conformance/expected-failures.2025-11-25.yml18# Baseline established against the harness pinned via CONFORMANCE_PKG inCOMMENT
MEDIUM.github/actions/conformance/expected-failures.yml3# pinned harness, each at the harness's default wire for it). CI exits 0 if onlyCOMMENT
MEDIUM.github/actions/conformance/expected-failures.yml10# Baseline established against the harness pinned via CONFORMANCE_PKG inCOMMENT
MEDIUM.github/actions/conformance/expected-failures.yml43 # `tasks-status-notifications` is intentionally NOT listed: the harnessCOMMENT
LOWsrc/mcp/server/auth/handlers/authorize.py111 # if the redirect URI is invalid, ignore it & just return theCOMMENT
LOWsrc/mcp/server/auth/handlers/revoke.py74 # if token is not found, just return HTTP 200 per the RFCCOMMENT
LOWsrc/mcp/server/mcpserver/utilities/func_metadata.py324 # This raise could perhaps be skipped, and we (MCPServer) just callCOMMENT
LOWsrc/mcp/cli/cli.py53 return "npx" # On Unix-like systems, just use npxCODE
MEDIUMsrc/mcp/client/session_group.py315 # Create read and write streams that facilitate io with the server.COMMENT
Docstring Block Structure18 hits · 90 pts
SeverityFileLineSnippetContext
HIGH…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py35Load server configuration from JSON file. Args: file_path: Path to the JSON configuration file. STRING
HIGH…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py126Execute a tool with retry mechanism. Args: tool_name: Name of the tool to execute. arguSTRING
HIGHsrc/mcp/server/session.py257Send a sampling/create_message request. Args: messages: The conversation messages to send. STRING
HIGHsrc/mcp/server/session.py357Send a form mode elicitation/create request. Args: message: The message to present to the user. STRING
HIGHsrc/mcp/server/session.py389Send a URL mode elicitation/create request. This directs the user to an external URL for out-of-band interactioSTRING
HIGHsrc/mcp/server/auth/provider.py174Handle the /authorize endpoint and return a URL that the client will be redirected to. Many MCP implemeSTRING
HIGHsrc/mcp/server/auth/provider.py233Exchanges an authorization code for an access token and refresh token. Args: client: The client excSTRING
HIGHsrc/mcp/server/auth/provider.py265Exchanges a refresh token for an access token and refresh token. Implementations SHOULD rotate both the access STRING
HIGHsrc/mcp/server/auth/provider.py313Exchanges an Identity Assertion Authorization Grant (ID-JAG) for an access token. This is leg 2 of SEP-990: theSTRING
HIGHsrc/mcp/server/auth/middleware/client_auth.py40Authenticate a client from an HTTP request. Extracts client credentials from the appropriate location based on STRING
HIGHsrc/mcp/server/mcpserver/context.py159Read a resource by URI. This is a content reader: an `InputRequiredResult` returned by a resource templSTRING
HIGHsrc/mcp/shared/path_security.py122Join path components onto a base, rejecting escapes. Resolves the joined path and verifies it remains within ``baseSTRING
HIGHsrc/mcp/shared/uri_template.py401Expand the template by substituting variable values. String values are percent-encoded according to their operaSTRING
HIGHsrc/mcp/client/client.py638Read a resource from the server. If the server returns an `InputRequiredResult`, the embedded input reqSTRING
HIGHsrc/mcp/client/client.py767Call a tool on the server. If the server returns an `InputRequiredResult`, the embedded input requests STRING
HIGHsrc/mcp/client/client.py878Get a prompt from the server. If the server returns an `InputRequiredResult`, the embedded input requesSTRING
HIGHsrc/mcp/client/auth/oauth2.py238Prepare authentication for token requests. Args: data: The form data to send headers: OSTRING
HIGHsrc/mcp/client/auth/utils.py424Parse and validate a token response. Parses token response JSON. Callers should check response.status_code before cSTRING
Deep Nesting54 hits · 49 pts
SeverityFileLineSnippetContext
LOWtests/transports/stdio/test_windows.py39CODE
LOWtests/server/test_stdio.py218CODE
LOWtests/server/test_stdio.py444CODE
LOWtests/server/test_streamable_http_manager.py213CODE
LOWtests/server/test_streamable_http_manager.py269CODE
LOWtests/server/mcpserver/test_integration.py63CODE
LOWtests/shared/test_streamable_http.py210CODE
LOWtests/shared/test_uri_template.py934CODE
LOWtests/examples/test_story_shape.py39CODE
LOWtests/client/test_session_group.py322CODE
LOWexamples/snippets/clients/url_elicitation_client.py236CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py282CODE
LOW…ples/clients/simple-chatbot/mcp_simple_chatbot/main.py329CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py269CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py289CODE
LOW…ents/simple-auth-client/mcp_simple_auth_client/main.py309CODE
LOW…ervers/sse-polling-demo/mcp_sse_polling_demo/server.py60CODE
LOWscripts/update_readme_snippets.py31CODE
LOWscripts/docs/llms_txt.py123CODE
LOWscripts/docs/translations.py955CODE
LOWscripts/docs/check_render_order.py72CODE
LOWsrc/mcp/server/runner.py662CODE
LOWsrc/mcp/server/_streamable_http_modern.py264CODE
LOWsrc/mcp/server/_streamable_http_modern.py375CODE
LOWsrc/mcp/server/streamable_http.py558CODE
LOWsrc/mcp/server/streamable_http.py930CODE
LOWsrc/mcp/server/streamable_http.py1025CODE
LOWsrc/mcp/server/streamable_http.py955CODE
LOWsrc/mcp/server/streamable_http.py1056CODE
LOWsrc/mcp/server/auth/handlers/authorize.py66CODE
LOWsrc/mcp/server/mcpserver/resolve.py516CODE
LOWsrc/mcp/server/mcpserver/utilities/func_metadata.py480CODE
LOWsrc/mcp/server/mcpserver/utilities/context_injection.py13CODE
LOWsrc/mcp/server/mcpserver/prompts/base.py158CODE
LOWsrc/mcp/shared/jsonrpc_dispatcher.py319CODE
LOWsrc/mcp/shared/jsonrpc_dispatcher.py721CODE
LOWsrc/mcp/shared/uri_template.py228CODE
LOWsrc/mcp/shared/uri_template.py611CODE
LOWsrc/mcp/shared/uri_template.py878CODE
LOWsrc/mcp/shared/uri_template.py924CODE
LOWsrc/mcp/shared/uri_template.py969CODE
LOWsrc/mcp/shared/uri_template.py459CODE
LOWsrc/mcp/shared/inbound.py120CODE
LOWsrc/mcp/shared/_httpx_utils.py206CODE
LOWsrc/mcp/shared/direct_dispatcher.py233CODE
LOWsrc/mcp/cli/cli.py119CODE
LOWsrc/mcp/cli/cli.py361CODE
LOWsrc/mcp/client/streamable_http.py363CODE
LOWsrc/mcp/client/streamable_http.py609CODE
LOWsrc/mcp/client/_probe.py52CODE
LOWsrc/mcp/client/stdio.py115CODE
LOWsrc/mcp/client/stdio.py142CODE
LOWsrc/mcp/client/auth/oauth2.py604CODE
LOWsrc/mcp/client/auth/extensions/identity_assertion.py163CODE
Redundant / Tautological Comments21 hits · 36 pts
SeverityFileLineSnippetContext
LOW⚡tests/server/mcpserver/auth/test_auth_integration.py124 # Check if refresh token existsCOMMENT
LOW⚡tests/server/mcpserver/auth/test_auth_integration.py129 # Check if the access token existsCOMMENT
LOW⚡tests/server/mcpserver/auth/test_auth_integration.py132 # Check if the token was issued to this clientCOMMENT
LOWtests/server/mcpserver/auth/test_auth_integration.py167 # Check if token is expiredCOMMENT
LOWexamples/snippets/clients/url_elicitation_client.py155 # Check if the tool returned an error in the resultCOMMENT
LOWexamples/snippets/clients/url_elicitation_client.py163 # Check if this is a URL elicitation required errorCOMMENT
LOWexamples/snippets/clients/pagination_client.py29 # Check if there are more pagesCOMMENT
LOWexamples/snippets/servers/elicitation.py35 # Check if date is availableCOMMENT
LOW…rs/simple-auth/mcp_simple_auth/simple_auth_provider.py248 # Check if expiredCOMMENT
LOWsrc/mcp/server/transport_security.py65 # Check if the actual host starts with base host and has a portCOMMENT
LOWsrc/mcp/server/transport_security.py87 # Check if the actual origin starts with base origin and has a portCOMMENT
LOW⚡src/mcp/server/streamable_http.py598 # Check if this is an initialization requestCOMMENT
LOW⚡src/mcp/server/streamable_http.py602 # Check if the server already has an established sessionCOMMENT
LOW⚡src/mcp/server/streamable_http.py604 # Check if request has a session IDCOMMENT
LOWsrc/mcp/server/streamable_http.py767 # Check if we already have an active GET streamCOMMENT
LOWsrc/mcp/server/streamable_http.py1062 # Check if this is a response with a known request id.COMMENT
LOWsrc/mcp/server/mcpserver/server.py718 # Check if user passed function directly instead of calling decoratorCOMMENT
LOWsrc/mcp/server/mcpserver/server.py859 # Check if user passed function directly instead of calling decoratorCOMMENT
LOWsrc/mcp/server/mcpserver/server.py1017 # Check if user passed function directly instead of calling decoratorCOMMENT
LOWsrc/mcp/server/mcpserver/utilities/func_metadata.py342 # Check if the parameter name conflicts with BaseModel attributesCOMMENT
LOWsrc/mcp/client/streamable_http.py632 # Check if this is a resumption requestCOMMENT
AI Structural Patterns33 hits · 32 pts
SeverityFileLineSnippetContext
LOWtests/client/test_stdio.py142CODE
LOWtests/client/test_caching.py303CODE
LOWtests/interaction/_connect.py82CODE
LOWtests/interaction/_connect.py119CODE
LOWtests/interaction/_connect.py183CODE
LOWtests/interaction/_connect.py364CODE
LOWtests/interaction/_connect.py64CODE
LOWtests/interaction/auth/_harness.py408CODE
LOWsrc/mcp/server/session.py183CODE
LOWsrc/mcp/server/session.py203CODE
LOWsrc/mcp/server/session.py223CODE
LOWsrc/mcp/server/session.py242CODE
LOWsrc/mcp/server/streamable_http_manager.py86CODE
LOWsrc/mcp/server/lowlevel/server.py131CODE
LOWsrc/mcp/server/lowlevel/server.py215CODE
LOWsrc/mcp/server/lowlevel/server.py308CODE
LOWsrc/mcp/server/lowlevel/server.py732CODE
LOWsrc/mcp/server/mcpserver/server.py158CODE
LOWsrc/mcp/server/mcpserver/server.py387CODE
LOWsrc/mcp/server/mcpserver/server.py788CODE
LOWsrc/mcp/server/mcpserver/server.py1113CODE
LOWsrc/mcp/server/mcpserver/server.py1288CODE
LOWsrc/mcp/server/mcpserver/resolve.py131CODE
LOWsrc/mcp/server/mcpserver/tools/base.py65CODE
LOWsrc/mcp/server/mcpserver/resources/resource_manager.py60CODE
LOWsrc/mcp/server/mcpserver/resources/templates.py122CODE
LOWsrc/mcp/shared/peer.py89CODE
LOWsrc/mcp/shared/peer.py107CODE
LOWsrc/mcp/shared/peer.py125CODE
LOWsrc/mcp/shared/peer.py142CODE
LOWsrc/mcp/client/session.py404CODE
LOWsrc/mcp/client/session.py993CODE
LOWsrc/mcp/client/session.py1052CODE
Structural Annotation Overuse16 hits · 26 pts
SeverityFileLineSnippetContext
LOW⚡tests/server/mcpserver/auth/test_auth_integration.py561 # Step 1: First, let's create a token and refresh token at the current timeCOMMENT
LOWtests/server/mcpserver/auth/test_auth_integration.py580 # Step 2: Time travel forward 4 hours (tokens expire in 1 hour by default)COMMENT
LOW.claude/commands/review-pr.md5## Step 1: Resolve the PRCOMMENT
LOW.claude/commands/review-pr.md20## Step 2: Gather the diffCOMMENT
LOW.claude/commands/review-pr.md30## Step 3: Collect PR discussion contextCOMMENT
LOW.claude/commands/review-pr.md47## Step 4: Find and read linked issuesCOMMENT
LOW.claude/commands/review-pr.md63## Step 5: Analyze and validateCOMMENT
LOW.claude/commands/review-pr.md75## Step 6: Produce the review summaryCOMMENT
LOWexamples/servers/simple-auth/README.md9### Step 1: Start Authorization ServerCOMMENT
LOWexamples/servers/simple-auth/README.md27### Step 2: Start Resource Server (MCP Server)COMMENT
LOWexamples/servers/simple-auth/README.md41### Step 3: Test with ClientCOMMENT
LOW⚡src/mcp/client/auth/oauth2.py784 # Step 5: Perform authorization and complete token exchangeCOMMENT
LOWsrc/mcp/client/auth/oauth2.py645 # Step 1: Discover protected resource metadata (SEP-985 with fallback support)COMMENT
LOWsrc/mcp/client/auth/oauth2.py700 # Step 2: Discover OAuth Authorization Server Metadata (OASM) (with fallback for legacy servers)COMMENT
LOWsrc/mcp/client/auth/oauth2.py722 # Step 3: Apply scope selection strategyCOMMENT
LOWsrc/mcp/client/auth/oauth2.py738 # Step 4: Register client or use URL-based client ID (CIMD)COMMENT
Over-Commented Block27 hits · 25 pts
SeverityFileLineSnippetContext
LOWpyproject.toml81]COMMENT
LOWtests/shared/test_uri_template.py681 ("file://{+path}", "http://x"),COMMENT
LOWtests/shared/test_uri_template.py881# The two tests below generate template strings instead of enumeratingCOMMENT
LOWexamples/snippets/servers/streamable_config.py21 mcp.run(transport="streamable-http", stateless_http=True, json_response=True)COMMENT
LOWscripts/build-docs.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/serve-docs.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/docs/llms_txt.py41 "mcp-types API reference",COMMENT
LOWscripts/docs/llms_txt.py61# Block HTML comments are inert in rendered output: python-markdown passesCOMMENT
LOWscripts/docs/gen_ref_pages.py21# A MkDocs/Zensical nav is a list of entries, each either `{title: url}` for aCOMMENT
LOWscripts/docs/build.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/docs/build.sh41uv run --frozen --no-sync zensical build -f mkdocs.gen.yml --strictCOMMENT
LOW.github/workflows/require-linked-issue.yml1# PR intake gate — see CONTRIBUTING.md ("How pull requests get in") for theCOMMENT
LOW.github/workflows/conformance.yml21COMMENT
LOW.github/workflows/docs-preview.yml1name: Docs PreviewCOMMENT
LOW.github/scripts/pr_intake_gate.js1// PR intake gate. The policy lives in CONTRIBUTING.md ("How pull requests getCOMMENT
LOW…b/actions/conformance/expected-failures.2026-07-28.yml1# Expected failures at the 2026-07-28 wire, read by the `--suite allCOMMENT
LOW…b/actions/conformance/expected-failures.2025-11-25.yml1# Expected failures at the 2025-11-25 wire, read by the `--suite allCOMMENT
LOW.github/actions/conformance/expected-failures.yml1# Conformance scenarios not yet passing against the Python SDK on main, read byCOMMENT
LOWsrc/mcp/server/runner.py221 # Shape for the wire inside the chain so the OpenTelemetry span (theCOMMENT
LOWsrc/mcp/server/streamable_http.py61# Special key for the standalone GET streamCOMMENT
LOWsrc/mcp/server/auth/handlers/authorize.py81 # 1. The request has a valid client ID & redirect_uri: we issue a redirectCOMMENT
LOWsrc/mcp/server/lowlevel/server.py441 self._session_manager: StreamableHTTPSessionManager | None = NoneCOMMENT
LOWsrc/mcp/shared/jsonrpc_dispatcher.py741 finally:COMMENT
LOWsrc/mcp/shared/uri_template.py1081 if atom.ifemp:COMMENT
LOWsrc/mcp/shared/inbound.py81Shared by client emit (which header to send) and server validate (which bodyCOMMENT
LOWsrc/mcp/client/session.py161 def stamp(data: dict[str, Any], opts: CallOptions) -> None:COMMENT
LOWsrc/mcp/client/auth/oauth2.py61from mcp.shared.inbound import MCP_PROTOCOL_VERSION_HEADERCOMMENT
Verbosity Indicators8 hits · 14 pts
SeverityFileLineSnippetContext
LOW⚡tests/server/mcpserver/auth/test_auth_integration.py561 # Step 1: First, let's create a token and refresh token at the current timeCOMMENT
LOWtests/server/mcpserver/auth/test_auth_integration.py580 # Step 2: Time travel forward 4 hours (tokens expire in 1 hour by default)COMMENT
LOWsrc/mcp/server/auth/middleware/client_auth.py88 # form_data.get() can return an UploadFile or None, so we need to check if it's a stringCOMMENT
LOW⚡src/mcp/client/auth/oauth2.py784 # Step 5: Perform authorization and complete token exchangeCOMMENT
LOWsrc/mcp/client/auth/oauth2.py645 # Step 1: Discover protected resource metadata (SEP-985 with fallback support)COMMENT
LOWsrc/mcp/client/auth/oauth2.py700 # Step 2: Discover OAuth Authorization Server Metadata (OASM) (with fallback for legacy servers)COMMENT
LOWsrc/mcp/client/auth/oauth2.py722 # Step 3: Apply scope selection strategyCOMMENT
LOWsrc/mcp/client/auth/oauth2.py738 # Step 4: Register client or use URL-based client ID (CIMD)COMMENT
Fake / Example Data7 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/server/mcpserver/test_func_metadata.py1179 return PersonWithAddress(name="Jack", address=Address(street="123 Main St", city="Anytown", zipcode="12345"))CODE
LOW⚡tests/server/mcpserver/test_server.py536 assert result.structured_content == {"name": "John Doe", "age": 30, "active": True}CODE
LOW⚡tests/server/mcpserver/test_server.py540 assert '"name": "John Doe"' in result.content[0].textCODE
LOWtests/server/mcpserver/test_server.py518 return UserOutput(name="John Doe", age=30)CODE
LOWtests/server/mcpserver/test_elicitation.py166 {"required_name": "John Doe", "optional_age": 30, "optional_email": "john@example.com", "subscribe": True},CODE
LOW⚡tests/shared/test_auth.py179@pytest.mark.parametrize("placeholder", [None, ""], ids=["null", "empty-string"])CODE
LOW…vers/everything-server/mcp_everything_server/server.py241 name: str = Field(default="John Doe", description="User name")CODE
Slop Phrases6 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMexamples/servers/simple-auth/mcp_simple_auth/server.py6NOTE: this is a simplified example for demonstration purposes.STRING
MEDIUM…rs/simple-auth/mcp_simple_auth/simple_auth_provider.py4for demonstration purposes. No external authentication provider is required.STRING
MEDIUM…rs/simple-auth/mcp_simple_auth/simple_auth_provider.py6NOTE: this is a simplified example for demonstration purposes.STRING
MEDIUM…les/servers/simple-auth/mcp_simple_auth/auth_server.py6NOTE: this is a simplified example for demonstration purposes.STRING
MEDIUM…ervers/simple-auth/mcp_simple_auth/legacy_as_server.py6NOTE: this is a simplified example for demonstration purposes.STRING
MEDIUM…/servers/simple-auth/mcp_simple_auth/token_verifier.py15 This is a simple example implementation for demonstration purposes.STRING
Overly Generic Function Names5 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/server/mcpserver/test_tool_manager.py630 def process_data(input_data: str) -> str: # pragma: no coverCODE
LOWexamples/snippets/servers/notifications.py7async def process_data(data: str, ctx: Context) -> str:CODE
LOW…amples/snippets/servers/streamable_http_path_config.py17def process_data(data: str) -> str:CODE
LOWsrc/mcp/server/streamable_http.py474 async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> None:CODE
LOWsrc/mcp/server/streamable_http_manager.py176 async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> None:CODE
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWscripts/build-docs.sh20# Usage:COMMENT
LOWscripts/serve-docs.sh12# Usage:COMMENT
LOWscripts/docs/build.sh22# Usage:COMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/server/test_streamable_http_manager.py749CODE