The official Python SDK for Model Context Protocol servers and clients
This report presents the forensic synthetic code analysis of modelcontextprotocol/python-sdk, a Python project with 23,608 GitHub stars. SynthScan v2.0 examined 159,645 lines of code across 977 source files, recording 4032 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 32.3 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 4032 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_examples.py | 51 | async def test_direct_call_tool_result_return(): | CODE |
| LOW | tests/test_types.py | 67 | async def test_method_initialization(): | CODE |
| LOW | tests/test_types.py | 152 | async def test_sampling_message_with_user_role(): | CODE |
| LOW | tests/test_types.py | 175 | async def test_sampling_message_with_assistant_role(): | CODE |
| LOW | tests/test_types.py | 205 | async def test_sampling_message_backward_compatibility(): | CODE |
| LOW | tests/test_types.py | 232 | async def test_create_message_request_params_with_tools(): | CODE |
| LOW | tests/test_types.py | 255 | async def test_create_message_result_with_tool_use(): | CODE |
| LOW | tests/test_types.py | 278 | async def test_create_message_result_basic(): | CODE |
| LOW | tests/test_types.py | 297 | async def test_client_capabilities_with_sampling_tools(): | CODE |
| LOW | tests/test_types.py | 383 | def test_concrete_wire_results_always_dump_result_type_complete(): | CODE |
| LOW | tests/test_types.py | 404 | def test_cacheable_results_default_to_immediately_stale_private(): | CODE |
| LOW⚡ | tests/test_types.py | 429 | def test_empty_result_dumps_no_fields_by_default(): | CODE |
| LOW⚡ | tests/test_types.py | 434 | def test_empty_result_dumps_result_type_only_when_explicitly_tagged(): | CODE |
| LOW⚡ | tests/test_types.py | 438 | def test_input_required_result_dumps_its_discriminating_tag(): | CODE |
| LOW⚡ | tests/test_types.py | 444 | def test_input_required_result_requires_at_least_one_of_input_requests_or_request_state(): | CODE |
| LOW⚡ | tests/types/test_version.py | 26 | def test_is_version_at_least_ordering(version: str, minimum: str, expected: bool) -> None: | CODE |
| LOW⚡ | tests/types/test_version.py | 32 | def test_is_version_at_least_unknown_version_is_false(version: str) -> None: | CODE |
| LOW⚡ | tests/types/test_version.py | 37 | def test_is_version_at_least_unknown_minimum_raises() -> None: | CODE |
| LOW⚡ | tests/types/test_version.py | 46 | def test_is_version_at_least_matches_lexicographic_for_known_versions(version: str, minimum: str) -> None: | CODE |
| LOW⚡ | tests/types/test_version.py | 52 | def test_supported_versions_are_known() -> None: | CODE |
| LOW⚡ | tests/types/test_version.py | 58 | def test_known_versions_are_strictly_ordered() -> None: | CODE |
| LOW⚡ | tests/types/test_methods.py | 551 | def test_cacheable_methods_mirror_the_cacheable_method_literal(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 556 | def test_input_required_methods_mirror_the_monolith_input_required_arms(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 561 | def test_is_input_required_matches_typed_and_wire_shapes(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 571 | def test_minimal_request_bodies_parse_through_every_request_row(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 580 | def test_minimal_notification_bodies_parse_through_every_notification_row(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 589 | def test_minimal_result_bodies_parse_through_every_result_row(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 598 | def test_non_file_root_uri_passes_the_surface_step_and_rejects_at_the_monolith_step(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 743 | def test_extension_map_rows_parse_through_the_same_functions(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 753 | def test_inconsistent_extension_maps_raise_runtime_error_after_the_surface_hit(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 760 | def test_input_required_unions_discriminate_identically_in_both_arm_orders(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 913 | def test_serialize_server_result_preserves_arbitrary_meta_value_identically(version: str): | CODE |
| LOW⚡ | tests/types/test_methods.py | 920 | def test_serialize_server_result_preserves_open_type_extras(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 930 | def test_serialize_server_result_drops_an_unknown_nested_tool_field(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 936 | def test_serialize_server_result_raises_key_error_for_an_absent_row_and_value_error_for_an_unknown_version(): | CODE |
| LOW⚡ | tests/types/test_methods.py | 943 | def test_importing_the_module_builds_no_adapters_and_identical_rows_share_one(): | CODE |
| LOW | tests/types/test_methods.py | 421 | def test_maps_define_exactly_the_expected_methods_for_every_known_version(): | CODE |
| LOW | tests/types/test_methods.py | 437 | def test_spec_client_method_sets_are_the_client_direction_projection_of_the_surface_maps(): | CODE |
| LOW | tests/types/test_methods.py | 445 | def test_elicit_result_surface_accepts_null_content_values_at_every_version_that_defines_it(): | CODE |
| LOW | tests/types/test_methods.py | 463 | def test_elicit_request_surface_accepts_loose_property_schemas(): | CODE |
| LOW | tests/types/test_methods.py | 476 | def test_response_map_keys_mirror_the_request_map_keys(): | CODE |
| LOW | tests/types/test_methods.py | 481 | def test_response_row_values_match_the_pinned_classes_and_unions(): | CODE |
| LOW | tests/types/test_methods.py | 501 | def test_surface_keys_agree_with_their_classes_and_the_monolith_maps(): | CODE |
| LOW | tests/types/test_methods.py | 532 | def test_built_in_maps_are_immutable(): | CODE |
| LOW | tests/types/test_methods.py | 621 | def test_absent_map_keys_raise_key_error_for_every_gate_shape(): | CODE |
| LOW | tests/types/test_methods.py | 636 | def test_unknown_version_strings_raise_value_error_on_every_parse_function(): | CODE |
| LOW | tests/types/test_methods.py | 671 | def test_empty_result_body_parses_at_versions_that_define_it(): | CODE |
| LOW | tests/types/test_methods.py | 687 | def test_embedded_input_request_entries_without_method_reject_at_the_surface_step(): | CODE |
| LOW | tests/types/test_methods.py | 724 | def test_none_params_omit_the_key_so_required_params_reject(): | CODE |
| LOW | tests/types/test_methods.py | 731 | def test_snake_case_spellings_of_required_aliased_fields_reject_as_missing(): | CODE |
| LOW | tests/types/test_methods.py | 792 | def test_sampling_union_keeps_the_complete_arm_first_because_order_is_load_bearing(): | CODE |
| LOW | tests/types/test_methods.py | 815 | def test_validate_functions_accept_reject_and_gate_like_their_parse_siblings(): | CODE |
| LOW | tests/types/test_methods.py | 879 | def test_dumped_monolith_results_round_trip_through_serialize_server_result(method: str, version: str): | CODE |
| LOW⚡ | tests/types/test_request_name_param.py | 18 | def test_request_base_declares_no_name_param() -> None: | CODE |
| LOW⚡ | tests/types/test_request_name_param.py | 22 | def test_core_request_types_inherit_none() -> None: | CODE |
| LOW⚡ | tests/types/test_request_name_param.py | 27 | def test_subclass_overrides_by_bare_assignment() -> None: | CODE |
| LOW⚡ | tests/types/test_request_name_param.py | 33 | def test_name_param_is_not_a_pydantic_field() -> None: | CODE |
| LOW | tests/types/test_parity.py | 180 | def test_monolith_is_superset_of_surface_fields( | CODE |
| LOW | tests/types/test_parity.py | 197 | def test_every_public_monolith_model_is_exported_from_mcp_types() -> None: | CODE |
| LOW | tests/types/test_parity.py | 211 | def test_every_surface_class_is_accounted_for() -> None: | CODE |
| 2728 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/transports/stdio/test_windows.py | 0 | opt out of the shared per-module event loop: this module parametrizes `anyio_backend`. | STRING |
| HIGH | tests/server/test_streamable_http_modern.py | 0 | opt out of the shared per-module event loop: this module parametrizes `anyio_backend`. | STRING |
| HIGH | tests/shared/test_jsonrpc_dispatcher.py | 0 | opt out of the shared per-module event loop: this module parametrizes `anyio_backend`. | STRING |
| HIGH | tests/docs_src/test_subscriptions.py | 0 | opt out of the shared per-module event loop: this module parametrizes `anyio_backend`. | STRING |
| HIGH | tests/client/test_input_required.py | 0 | opt out of the shared per-module event loop: this module parametrizes `anyio_backend`. | STRING |
| HIGH | tests/interaction/lowlevel/test_timeouts.py | 0 | opt out of the shared per-module event loop: this module parametrizes `anyio_backend`. | STRING |
| HIGH | tests/server/test_session.py | 0 | a spec-method result that fails the per-version surface schema raises `validationerror` even when the caller's `result_t | STRING |
| HIGH | tests/server/test_connection.py | 0 | a spec-method result that fails the per-version surface schema raises `validationerror` even when the caller's `result_t | STRING |
| HIGH | tests/client/test_session.py | 0 | a spec-method result that fails the per-version surface schema raises `validationerror` even when the caller's `result_t | STRING |
| HIGH | tests/server/test_session.py | 0 | peer results validate alias-only; a snake_case key from the wire is ignored as extra, not populated by python field name | STRING |
| HIGH | tests/server/test_connection.py | 0 | peer results validate alias-only; a snake_case key from the wire is ignored as extra, not populated by python field name | STRING |
| HIGH | tests/shared/test_peer.py | 0 | peer results validate alias-only; a snake_case key from the wire is ignored as extra, not populated by python field name | STRING |
| HIGH | …s/server/mcpserver/resources/test_resource_template.py | 0 | sync prompt functions must run in a worker thread, not the event loop. | STRING |
| HIGH | …/server/mcpserver/resources/test_function_resources.py | 0 | sync prompt functions must run in a worker thread, not the event loop. | STRING |
| HIGH | tests/server/mcpserver/prompts/test_base.py | 0 | sync prompt functions must run in a worker thread, not the event loop. | STRING |
| HIGH | tests/interaction/transports/test_hosting_http.py | 0 | registered so the logging capability is advertised; the client never sets a level. | STRING |
| HIGH | tests/interaction/transports/_stdio_server.py | 0 | registered so the logging capability is advertised; the client never sets a level. | STRING |
| HIGH | tests/interaction/lowlevel/test_logging.py | 0 | registered so the logging capability is advertised; the client never sets a level. | STRING |
| HIGH | tests/interaction/lowlevel/test_flows.py | 0 | registered so the logging capability is advertised; the client never sets a level. | STRING |
| HIGH | tests/interaction/transports/test_hosting_http.py | 0 | registered so the resources capability is advertised; the client never lists resources. | STRING |
| HIGH | tests/interaction/lowlevel/test_resources.py | 0 | registered so the resources capability is advertised; the client never lists resources. | STRING |
| HIGH | tests/interaction/lowlevel/test_list_changed.py | 0 | registered so the resources capability is advertised; the client never lists resources. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | a progress token, used to associate progress notifications with the original request. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | a progress token, used to associate progress notifications with the original request. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | a progress token, used to associate progress notifications with the original request. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | the sender or recipient of messages and data in a conversation. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | the sender or recipient of messages and data in a conversation. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | the sender or recipient of messages and data in a conversation. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | if specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link pro | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | if specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link pro | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | if specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link pro | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | an opaque token representing the current pagination position. if provided, the server should return results starting aft | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | an opaque token representing the current pagination position. if provided, the server should return results starting aft | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | an opaque token representing the current pagination position. if provided, the server should return results starting aft | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | an opaque token representing the pagination position after the last returned result. if present, there may be more resul | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | an opaque token representing the pagination position after the last returned result. if present, there may be more resul | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | an opaque token representing the pagination position after the last returned result. if present, there may be more resul | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present). | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present). | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present). | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | intended for ui and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar w | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | intended for ui and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar w | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | intended for ui and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar w | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | an optional url of the website for this implementation. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | an optional url of the website for this implementation. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | an optional url of the website for this implementation. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | experimental, non-standard capabilities that the client supports. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | experimental, non-standard capabilities that the client supports. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | experimental, non-standard capabilities that the client supports. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | whether this server supports notifications for changes to the prompt list. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | whether this server supports notifications for changes to the prompt list. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | whether this server supports notifications for changes to the prompt list. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | whether this server supports subscribing to resource updates. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | whether this server supports subscribing to resource updates. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | whether this server supports subscribing to resource updates. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | whether this server supports notifications for changes to the resource list. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | whether this server supports notifications for changes to the resource list. | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 0 | whether this server supports notifications for changes to the resource list. | STRING |
| HIGH | src/mcp-types/mcp_types/_types.py | 0 | whether this server supports notifications for changes to the tool list. | STRING |
| HIGH | src/mcp-types/mcp_types/v2025_11_25/__init__.py | 0 | whether this server supports notifications for changes to the tool list. | STRING |
| 178 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/types/test_parity.py | 3 | CODE | |
| LOW | tests/shared/test_streamable_http.py | 7 | CODE | |
| LOW | tests/shared/test_otel.py | 1 | CODE | |
| LOW | tests/examples/conftest.py | 13 | CODE | |
| LOW | tests/examples/test_stories.py | 3 | CODE | |
| LOW | tests/examples/test_stories_smoke.py | 17 | CODE | |
| LOW | tests/examples/test_story_shape.py | 8 | CODE | |
| LOW | tests/client/test_probe.py | 14 | CODE | |
| LOW | tests/client/test_probe.py | 39 | CODE | |
| LOW | tests/client/test_session.py | 1 | CODE | |
| LOW | tests/client/test_client.py | 3 | CODE | |
| LOW | tests/interaction/transports/__init__.py | 7 | CODE | |
| LOW | examples/snippets/clients/url_elicitation_client.py | 23 | CODE | |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 1 | CODE | |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 8 | CODE | |
| LOW | examples/stories/_hosting.py | 8 | CODE | |
| LOW | examples/stories/_hosting.py | 12 | CODE | |
| LOW | examples/stories/_harness.py | 9 | CODE | |
| LOW | examples/stories/_harness.py | 25 | CODE | |
| LOW | examples/stories/_harness.py | 27 | CODE | |
| LOW | examples/stories/_harness.py | 28 | CODE | |
| LOW | examples/stories/_shared/auth.py | 6 | CODE | |
| LOW | scripts/gen_surface_types.py | 11 | CODE | |
| LOW | scripts/docs/llms_txt.py | 23 | CODE | |
| LOW | scripts/docs/gen_ref_pages.py | 13 | CODE | |
| LOW | scripts/docs/build_config.py | 13 | CODE | |
| LOW | scripts/docs/check_crossrefs.py | 29 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| LOW | src/mcp/__init__.py | 1 | CODE | |
| 372 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/server/test_lifespan.py | 43 | # Create a tool that accesses lifespan context | COMMENT |
| MEDIUM | tests/server/auth/test_protected_resource.py | 18 | # Create the protected resource routes | COMMENT |
| MEDIUM | tests/server/auth/middleware/test_auth_context.py | 53 | # Create an authenticated user | COMMENT |
| MEDIUM | tests/server/auth/middleware/test_bearer_auth.py | 333 | # Create a user with read/write scopes but not admin | COMMENT |
| MEDIUM | tests/server/auth/middleware/test_bearer_auth.py | 362 | # Create a user with read/write scopes | COMMENT |
| MEDIUM | tests/server/auth/middleware/test_bearer_auth.py | 390 | # Create a user with read/write scopes | COMMENT |
| MEDIUM | tests/server/auth/middleware/test_bearer_auth.py | 415 | # Create a user with read/write scopes | COMMENT |
| MEDIUM | tests/server/auth/middleware/test_bearer_auth.py | 440 | # Create a user with read/write scopes | COMMENT |
| MEDIUM | tests/server/mcpserver/test_func_metadata.py | 334 | # Create a copy of the actual schema to normalize | COMMENT |
| MEDIUM⚡ | tests/server/mcpserver/test_server.py | 457 | # Create a test image | COMMENT |
| MEDIUM⚡ | tests/server/mcpserver/test_server.py | 461 | # Create a test audio | COMMENT |
| MEDIUM | tests/server/mcpserver/test_server.py | 353 | # Create a test image | COMMENT |
| MEDIUM | tests/server/mcpserver/test_server.py | 373 | # Create a test audio | COMMENT |
| MEDIUM | tests/server/mcpserver/test_server.py | 409 | # Create a test audio file with the specific extension | COMMENT |
| MEDIUM | tests/server/mcpserver/test_server.py | 819 | # Create a text file | COMMENT |
| MEDIUM | tests/server/mcpserver/test_server.py | 835 | # Create a binary file | COMMENT |
| MEDIUM | tests/server/mcpserver/test_elicitation.py | 67 | # Create a custom handler for elicitation requests | COMMENT |
| MEDIUM | tests/server/mcpserver/auth/test_auth_integration.py | 107 | # Create a RefreshToken object that matches what is expected in later code | COMMENT |
| MEDIUM | tests/server/mcpserver/auth/test_auth_integration.py | 368 | # Create an auth code for the registered client | COMMENT |
| MEDIUM | tests/server/mcpserver/auth/test_auth_integration.py | 834 | # Create a test client with the token | COMMENT |
| MEDIUM | …s/server/mcpserver/resources/test_resource_template.py | 404 | # Create a resource from the template | COMMENT |
| MEDIUM | …s/server/mcpserver/resources/test_resource_template.py | 454 | # Create a resource from the template | COMMENT |
| MEDIUM⚡ | tests/shared/test_streamable_http.py | 1616 | # Create a mock SSE event with empty data (keep-alive ping) | COMMENT |
| MEDIUM⚡ | tests/shared/test_streamable_http.py | 1619 | # Create a context-aware stream writer (matches StreamWriter type alias) | COMMENT |
| MEDIUM⚡ | tests/shared/test_streamable_http.py | 1641 | # Create a transport with an event store | COMMENT |
| MEDIUM⚡ | tests/shared/test_streamable_http.py | 1647 | # Create a mock message and request | COMMENT |
| MEDIUM | tests/shared/test_streamable_http.py | 1074 | # Create a new response with 204 status code but same headers | COMMENT |
| MEDIUM | tests/shared/test_streamable_http.py | 2085 | # Create a client with custom headers | COMMENT |
| MEDIUM | tests/issues/test_152_resource_mime_type.py | 25 | # Create a small test image as bytes | COMMENT |
| MEDIUM | tests/issues/test_152_resource_mime_type.py | 70 | # Create a small test image as bytes | COMMENT |
| MEDIUM | tests/issues/test_355_type_error.py | 20 | # Create a named server | COMMENT |
| MEDIUM | …sts/issues/test_1363_race_condition_streamable_http.py | 77 | # Create a new event loop for this thread | COMMENT |
| MEDIUM | tests/client/test_auth.py | 410 | # Create a test request | COMMENT |
| MEDIUM | tests/client/test_auth.py | 1084 | # Create a test request | COMMENT |
| MEDIUM | tests/client/test_auth.py | 1109 | # Create a test request | COMMENT |
| MEDIUM | tests/client/test_auth.py | 1262 | # Create a test request | COMMENT |
| MEDIUM | tests/client/test_auth.py | 1861 | # Create a test request | COMMENT |
| MEDIUM | tests/client/test_session.py | 124 | # Create a message handler to catch exceptions | COMMENT |
| MEDIUM | tests/client/test_logging_callback.py | 28 | # Create a simple test tool | COMMENT |
| MEDIUM | tests/client/test_logging_callback.py | 34 | # Create a function that can send a log notification | COMMENT |
| MEDIUM | tests/client/test_logging_callback.py | 57 | # Create a message handler to catch exceptions | COMMENT |
| MEDIUM | examples/snippets/clients/streamable_basic.py | 14 | # Create a session using the client streams | COMMENT |
| MEDIUM | …s/snippets/servers/streamable_http_multiple_servers.py | 31 | # Create a combined lifespan to manage both session managers | COMMENT |
| MEDIUM | …les/snippets/servers/streamable_http_basic_mounting.py | 24 | # Create a lifespan context manager to run the session manager | COMMENT |
| MEDIUM | …ples/snippets/servers/streamable_http_host_mounting.py | 24 | # Create a lifespan context manager to run the session manager | COMMENT |
| MEDIUM⚡ | examples/snippets/servers/streamable_starlette_mount.py | 12 | # Create the Echo server | COMMENT |
| MEDIUM⚡ | examples/snippets/servers/streamable_starlette_mount.py | 22 | # Create the Math server | COMMENT |
| MEDIUM⚡ | examples/snippets/servers/streamable_starlette_mount.py | 32 | # Create a combined lifespan to manage both session managers | COMMENT |
| MEDIUM⚡ | examples/snippets/servers/streamable_starlette_mount.py | 41 | # Create the Starlette app and mount the MCP servers | COMMENT |
| MEDIUM | examples/snippets/servers/mcpserver_quickstart.py | 9 | # Create an MCP server | COMMENT |
| MEDIUM | …amples/snippets/servers/streamable_http_path_config.py | 12 | # Create a simple MCPServer server | COMMENT |
| MEDIUM | examples/mcpserver/readme-quickstart.py | 3 | # Create an MCP server | COMMENT |
| MEDIUM | src/mcp/server/models.py | 1 | """This module provides simplified types to use with the server for managing prompts | STRING |
| MEDIUM | src/mcp/server/sse.py | 7 | # Create an SSE transport at an endpoint | STRING |
| MEDIUM | src/mcp/server/streamable_http.py | 706 | # Create a standalone message stream for server-initiated messages | COMMENT |
| MEDIUM | src/mcp/server/streamable_http.py | 883 | # Define an async callback for sending events | COMMENT |
| MEDIUM | src/mcp/server/streamable_http.py | 965 | # Create the memory streams for this connection | COMMENT |
| MEDIUM | src/mcp/server/streamable_http.py | 978 | # Create a message router that distributes messages to request streams | COMMENT |
| MEDIUM | src/mcp/server/streamable_http_manager.py | 294 | # Define the server runner | COMMENT |
| MEDIUM | src/mcp/server/auth/middleware/auth_context.py | 8 | # Create a contextvar to store the authenticated user | COMMENT |
| 2 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/client/test_stdio.py | 55 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/client/test_stdio.py | 57 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/client/test_stdio.py | 980 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/client/test_stdio.py | 982 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/client/test_stdio.py | 1113 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/client/test_stdio.py | 1115 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/client/test_client.py | 717 | # ── SEP-2322 multi-round-trip auto-loop ──────────────────────────────────────── | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 171 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 173 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 467 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 469 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 802 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 804 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 944 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 946 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1078 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1080 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1109 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1111 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1290 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1292 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1332 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1334 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1398 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1400 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1438 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1440 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1484 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1486 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1545 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1547 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1752 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 1754 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2001 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2003 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2078 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2080 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2130 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2132 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2151 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2153 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2480 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2482 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2543 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2545 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2654 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2656 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2767 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2769 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2951 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 2953 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3024 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3026 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3305 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3307 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3549 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3551 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3900 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3902 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | tests/interaction/_requirements.py | 3952 | # ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/shared/test_streamable_http.py | 1596 | except Exception: | CODE |
| LOW | tests/interaction/transports/_bridge.py | 148 | except Exception as exc: # The bridge is the application's outermost boundary: a crash | CODE |
| MEDIUM | docs/migration.md | 424 | print(f"Error: {e.error.message}") | CODE |
| MEDIUM | docs/migration.md | 435 | print(f"Error: {e.message}") | CODE |
| LOW | docs/migration.md | 1132 | except Exception as e: | CODE |
| MEDIUM | docs/migration.md | 1129 | def handle_call_tool(ctx, params) -> CallToolResult: | CODE |
| MEDIUM | examples/snippets/clients/url_elicitation_client.py | 79 | print("Error: No URL provided in elicitation request") | CODE |
| LOW | examples/snippets/clients/url_elicitation_client.py | 120 | except Exception as e: | CODE |
| LOW | examples/snippets/clients/url_elicitation_client.py | 134 | except Exception: | CODE |
| LOW | examples/snippets/clients/url_elicitation_client.py | 307 | except Exception as e: | CODE |
| MEDIUM | examples/snippets/clients/parsing_tool_results.py | 54 | print(f"Error: {content.text}") | CODE |
| MEDIUM | examples/snippets/servers/__init__.py | 36 | print(f"Error: Server '{server_name}' not found") | CODE |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 93 | except Exception as e: | CODE |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 152 | except Exception as e: | CODE |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 169 | except Exception as e: | CODE |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 282 | except Exception as e: | CODE |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 322 | except Exception as e: | CODE |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 338 | except Exception as e: | CODE |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 243 | except Exception as e: | CODE |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 284 | except Exception as e: | CODE |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 304 | except Exception as e: | CODE |
| LOW | examples/stories/_harness.py | 198 | except Exception: | CODE |
| LOW | …vers/everything-server/mcp_everything_server/server.py | 210 | except Exception as e: | CODE |
| LOW | …vers/everything-server/mcp_everything_server/server.py | 232 | except Exception as e: | CODE |
| LOW | …vers/everything-server/mcp_everything_server/server.py | 264 | except Exception as e: | CODE |
| LOW | …vers/everything-server/mcp_everything_server/server.py | 323 | except Exception as e: | CODE |
| LOW | examples/servers/simple-auth/mcp_simple_auth/server.py | 155 | except Exception: | CODE |
| LOW | …/servers/simple-auth/mcp_simple_auth/token_verifier.py | 81 | except Exception as e: | CODE |
| LOW | scripts/update_readme_snippets.py | 91 | except Exception as e: | CODE |
| MEDIUM | scripts/update_readme_snippets.py | 92 | print(f"Error processing {file_path}: {e}") | CODE |
| MEDIUM | scripts/update_readme_snippets.py | 107 | print(f"Error: README file not found: {readme_path}") | CODE |
| LOW | .github/actions/conformance/client.py | 337 | except Exception: | CODE |
| LOW | .github/actions/conformance/client.py | 365 | except Exception: | CODE |
| LOW | .github/actions/conformance/client.py | 582 | except Exception as e: | CODE |
| LOW | src/mcp/server/_otel.py | 56 | except Exception as e: | CODE |
| LOW | src/mcp/server/runner.py | 130 | except Exception: | CODE |
| LOW | src/mcp/server/runner.py | 284 | except Exception: | CODE |
| LOW | src/mcp/server/runner.py | 645 | except Exception as exc: | CODE |
| LOW | src/mcp/server/_streamable_http_modern.py | 136 | except Exception as exc: | CODE |
| LOW | src/mcp/server/_streamable_http_modern.py | 251 | except Exception: | CODE |
| LOW | src/mcp/server/request_state.py | 318 | except Exception: # deny-on-error: a raising principal binding must fail closed | CODE |
| LOW | src/mcp/server/request_state.py | 374 | except Exception: # deny-on-error: a buggy custom codec must fail closed | CODE |
| LOW | src/mcp/server/request_state.py | 452 | except Exception: # deny-on-error: a raising custom codec must not leak its failure | CODE |
| LOW | src/mcp/server/subscriptions.py | 113 | except Exception: # fan-out boundary: isolate listeners from each other | CODE |
| LOW | src/mcp/server/subscriptions.py | 137 | except Exception: # fan-out boundary: a raising bus must not skip stream cleanup | CODE |
| MEDIUM | src/mcp/server/streamable_http.py | 704 | def standalone_sse_writer(): | CODE |
| MEDIUM | src/mcp/server/streamable_http.py | 880 | def replay_sender(): | CODE |
| MEDIUM | src/mcp/server/streamable_http.py | 979 | def message_router(): | CODE |
| LOW | src/mcp/server/streamable_http.py | 321 | except Exception: # pragma: lax no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 400 | except Exception: # pragma: no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 589 | except Exception: # pragma: no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 635 | except Exception: # pragma: lax no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 642 | except Exception as err: | CODE |
| LOW | src/mcp/server/streamable_http.py | 727 | except Exception: | CODE |
| LOW | src/mcp/server/streamable_http.py | 743 | except Exception: # pragma: lax no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 800 | except Exception as e: # pragma: no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 922 | except Exception: # pragma: lax no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 934 | except Exception: # pragma: lax no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 940 | except Exception: # pragma: lax no cover | CODE |
| LOW | src/mcp/server/streamable_http.py | 1029 | except Exception: # pragma: lax no cover | CODE |
| 53 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/server/test_runner.py | 719 | async def set_level(ctx: Ctx, params: SetLevelRequestParams) -> None: | CODE |
| LOW | tests/server/test_sse_security.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/shared/conftest.py | 61 | __all__ = ["PairFactory", "direct_pair", "jsonrpc_pair"] | CODE |
| LOW | tests/cli/test_utils.py | 12 | def _set_mcp_version(monkeypatch: pytest.MonkeyPatch, version: str) -> None: | CODE |
| LOW | tests/cli/test_claude.py | 13 | def _set_mcp_version(monkeypatch: pytest.MonkeyPatch, version: str) -> None: | CODE |
| LOW | tests/client/test_auth.py | 56 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | tests/client/test_auth.py | 62 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | tests/client/test_session.py | 796 | def _set_negotiated_version(session: ClientSession, version: str) -> None: | CODE |
| LOW | tests/client/test_scope_bug_1630.py | 32 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | tests/client/test_scope_bug_1630.py | 38 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | tests/client/auth/extensions/test_client_credentials.py | 36 | async def set_tokens(self, tokens: OAuthToken) -> None: # pragma: no cover | CODE |
| LOW | tests/client/auth/extensions/test_client_credentials.py | 42 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: # pragma: no cover | CODE |
| LOW | tests/client/auth/extensions/test_identity_assertion.py | 32 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | tests/client/auth/extensions/test_identity_assertion.py | 38 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | tests/interaction/auth/_harness.py | 119 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | tests/interaction/auth/_harness.py | 125 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | tests/interaction/transports/__init__.py | 9 | __all__ = ["StreamingASGITransport"] | CODE |
| LOW | examples/snippets/clients/oauth_client.py | 32 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | examples/snippets/clients/oauth_client.py | 40 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | examples/snippets/clients/identity_assertion_client.py | 37 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | examples/snippets/clients/identity_assertion_client.py | 43 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 40 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 46 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | examples/stories/serve_one/server.py | 28 | __all__ = ["SingleExchangeContext", "build_server", "handle_one"] | CODE |
| LOW | examples/stories/_shared/auth.py | 41 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | examples/stories/_shared/auth.py | 47 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | …vers/everything-server/mcp_everything_server/server.py | 50 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ple-streamablehttp/mcp_simple_streamablehttp/server.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | …treamablehttp/mcp_simple_streamablehttp/event_store.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | …tateless/mcp_simple_streamablehttp_stateless/server.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/servers/simple-auth/mcp_simple_auth/server.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | …les/servers/simple-auth/mcp_simple_auth/auth_server.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ervers/simple-auth/mcp_simple_auth/legacy_as_server.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | …/servers/simple-auth/mcp_simple_auth/token_verifier.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ervers/sse-polling-demo/mcp_sse_polling_demo/server.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | …s/sse-polling-demo/mcp_sse_polling_demo/event_store.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | .github/actions/conformance/client.py | 65 | logger = logging.getLogger(__name__) | CODE |
| LOW | .github/actions/conformance/client.py | 130 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | .github/actions/conformance/client.py | 136 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | docs_src/middleware/tutorial001.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs_src/extensions/tutorial005.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs_src/oauth_clients/tutorial002.py | 17 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | docs_src/oauth_clients/tutorial002.py | 23 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | docs_src/oauth_clients/tutorial001.py | 20 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | docs_src/oauth_clients/tutorial001.py | 26 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | docs_src/identity_assertion/tutorial001.py | 23 | async def set_tokens(self, tokens: OAuthToken) -> None: | CODE |
| LOW | docs_src/identity_assertion/tutorial001.py | 29 | async def set_client_info(self, client_info: OAuthClientInformationFull) -> None: | CODE |
| LOW | docs_src/logging/tutorial001.py | 5 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/mcp/__init__.py | 71 | __all__ = [ | CODE |
| LOW | src/mcp/server/runner.py | 69 | __all__ = [ | CODE |
| LOW | src/mcp/server/runner.py | 81 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/mcp/server/_streamable_http_modern.py | 72 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/mcp/server/transport_security.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/mcp/server/request_state.py | 34 | __all__ = [ | CODE |
| LOW | src/mcp/server/request_state.py | 43 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/mcp/server/subscriptions.py | 57 | __all__ = [ | CODE |
| LOW | src/mcp/server/subscriptions.py | 69 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/mcp/server/session.py | 22 | __all__ = ["ServerSession"] | CODE |
| LOW | src/mcp/server/__init__.py | 7 | __all__ = ["CacheHint", "Server", "ServerRequestContext", "MCPServer", "NotificationOptions", "InitializationOptions"] | CODE |
| LOW | src/mcp/server/sse.py | 61 | logger = logging.getLogger(__name__) | CODE |
| 53 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 35 | Load server configuration from JSON file. Args: file_path: Path to the JSON configuration file. | STRING |
| HIGH | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 126 | Execute a tool with retry mechanism. Args: tool_name: Name of the tool to execute. argu | STRING |
| HIGH | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 224 | Get a response from the LLM. Args: messages: A list of message dictionaries. Returns: | STRING |
| HIGH | src/mcp/server/session.py | 211 | Send a sampling/create_message request. Args: messages: The conversation messages to send. | STRING |
| HIGH | src/mcp/server/session.py | 312 | Send a form mode elicitation/create request. Args: message: The message to present to the user. | STRING |
| HIGH | src/mcp/server/session.py | 344 | Send a URL mode elicitation/create request. This directs the user to an external URL for out-of-band interactio | STRING |
| HIGH | src/mcp/server/auth/provider.py | 165 | Handle the /authorize endpoint and return a URL that the client will be redirected to. Many MCP impleme | STRING |
| HIGH | src/mcp/server/auth/provider.py | 224 | Exchanges an authorization code for an access token and refresh token. Args: client: The client exc | STRING |
| HIGH | src/mcp/server/auth/provider.py | 256 | Exchanges a refresh token for an access token and refresh token. Implementations SHOULD rotate both the access | STRING |
| HIGH | src/mcp/server/auth/provider.py | 304 | Exchanges an Identity Assertion Authorization Grant (ID-JAG) for an access token. This is leg 2 of SEP-990: the | STRING |
| HIGH | src/mcp/server/auth/middleware/client_auth.py | 40 | Authenticate a client from an HTTP request. Extracts client credentials from the appropriate location based on | STRING |
| HIGH | src/mcp/server/mcpserver/context.py | 153 | Read a resource by URI. This is a content reader: an `InputRequiredResult` returned by a resource templ | STRING |
| HIGH | src/mcp/shared/path_security.py | 122 | Join path components onto a base, rejecting escapes. Resolves the joined path and verifies it remains within ``base | STRING |
| HIGH | src/mcp/shared/uri_template.py | 401 | Expand the template by substituting variable values. String values are percent-encoded according to their opera | STRING |
| HIGH | src/mcp/client/client.py | 617 | Read a resource from the server. If the server returns an `InputRequiredResult`, the embedded input req | STRING |
| HIGH | src/mcp/client/client.py | 746 | Call a tool on the server. If the server returns an `InputRequiredResult`, the embedded input requests | STRING |
| HIGH | src/mcp/client/client.py | 835 | Get a prompt from the server. If the server returns an `InputRequiredResult`, the embedded input reques | STRING |
| HIGH | src/mcp/client/auth/utils.py | 400 | Parse and validate a token response. Parses token response JSON. Callers should check response.status_code before c | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/server/test_request_state.py | 427 | '["client-123",null,null]', | CODE |
| HIGH⚡ | tests/server/test_request_state.py | 432 | '["client-123",null,"alice"]', | CODE |
| HIGH | tests/server/test_sse_security.py | 238 | body = b'{"jsonrpc": "2.0", "id": 1, "method": "ping", "params": null}' | CODE |
| HIGH | tests/server/mcpserver/test_func_metadata.py | 151 | "my_model_b": '{"how_many_shrimp": 5, "ok": {"x": 1}, "y": null}', | CODE |
| HIGH | tests/server/mcpserver/test_tool_manager.py | 312 | {"tank": '{"x": null, "shrimp": [{"name": "rex"}, {"name": "gertrude"}]}'}, | CODE |
| HIGH⚡ | tests/shared/test_sse.py | 358 | json_message = '{"jsonrpc": "2.0", "id": "123", "method": "ping", "params": null}' | CODE |
| HIGH⚡ | tests/shared/test_sse.py | 362 | json_message = '{"jsonrpc": "2.0", "id": 123, "method": "ping", "params": null}' | CODE |
| HIGH⚡ | tests/shared/test_jsonrpc_dispatcher.py | 1915 | """Parse-error responses (id=null) have no waiter; they're dropped and the read loop stays healthy.""" | STRING |
| HIGH⚡ | tests/client/test_auth.py | 132 | b'"scopes_supported": null}' | CODE |
| HIGH | examples/snippets/clients/url_elicitation_client.py | 290 | print("(Start server with: cd examples/snippets && uv run server elicitation sse)") | CODE |
| HIGH | examples/snippets/clients/url_elicitation_client.py | 306 | print(" cd examples/snippets && uv run server elicitation sse") | CODE |
| HIGH | src/mcp/shared/uri_template.py | 233 | (RFC 6570 §2.3); if all are undefined, the expression contributes | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 2645 | This can be any JSON value (object, array, string, number, boolean, or null). | STRING |
| HIGH | src/mcp-types/mcp_types/v2026_07_28/__init__.py | 2699 | This can be any JSON value (object, array, string, number, boolean, or null) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/interaction/transports/test_streamable_http.py | 163 | # Bounded because a harness regression here historically meant deadlock, not failure. | COMMENT |
| MEDIUM | examples/stories/manifest.toml | 84 | # A per-client fresh target over a real ASGI transport is harness machinery, not user | COMMENT |
| MEDIUM | .github/workflows/conformance.yml | 17 | # Pinned conformance harness package spec (passed verbatim to `npx --yes`). | COMMENT |
| MEDIUM⚡ | .github/workflows/conformance.yml | 83 | # shipped with the pinned harness — including the extension-tagged | COMMENT |
| MEDIUM⚡ | .github/workflows/conformance.yml | 89 | # of silent exclusions, and stays robust to scenarios moving between | COMMENT |
| MEDIUM⚡ | .github/workflows/conformance.yml | 90 | # harness suite lists across pin bumps. `--suite pending` would cover | COMMENT |
| MEDIUM | .github/workflows/conformance.yml | 139 | # The harness runs all scenarios via unbounded Promise.all; with 40 | COMMENT |
| MEDIUM | .github/actions/conformance/run-client.sh | 28 | # If the harness's summary wording changes, the list comes up empty and the | COMMENT |
| MEDIUM⚡ | .github/actions/conformance/client.py | 67 | #: Spec version the harness is running this scenario at (e.g. "2025-11-25", | COMMENT |
| MEDIUM⚡ | .github/actions/conformance/client.py | 68 | #: "2026-07-28"). The harness always sets this (when --spec-version is omitted | COMMENT |
| MEDIUM⚡ | .github/actions/conformance/client.py | 71 | #: outside the harness. | COMMENT |
| MEDIUM | .github/actions/conformance/client.py | 485 | # The harness does not put the issuer in context, so for conformance we | COMMENT |
| MEDIUM | .github/actions/conformance/client.py | 486 | # learn it from the harness's PRM document (RFC 9728); production | COMMENT |
| MEDIUM | …b/actions/conformance/expected-failures.2026-07-28.yml | 13 | # Baseline established against the harness pinned via CONFORMANCE_PKG in | COMMENT |
| MEDIUM | .github/actions/conformance/expected-failures.yml | 4 | # Baseline established against the harness pinned via CONFORMANCE_PKG in | COMMENT |
| MEDIUM | .github/actions/conformance/expected-failures.yml | 22 | # `tasks-status-notifications` is intentionally NOT listed: the harness | COMMENT |
| LOW | src/mcp/server/auth/handlers/authorize.py | 115 | # if the redirect URI is invalid, ignore it & just return the | COMMENT |
| LOW | src/mcp/server/auth/handlers/revoke.py | 74 | # if token is not found, just return HTTP 200 per the RFC | COMMENT |
| LOW | src/mcp/server/mcpserver/utilities/func_metadata.py | 235 | # This raise could perhaps be skipped, and we (MCPServer) just call | COMMENT |
| LOW | src/mcp/cli/cli.py | 53 | return "npx" # On Unix-like systems, just use npx | CODE |
| MEDIUM | src/mcp/client/session_group.py | 312 | # Create read and write streams that facilitate io with the server. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/transports/stdio/test_windows.py | 45 | CODE | |
| LOW | tests/server/test_streamable_http_manager.py | 105 | CODE | |
| LOW | tests/server/test_streamable_http_manager.py | 161 | CODE | |
| LOW | tests/server/test_streamable_http_manager.py | 354 | CODE | |
| LOW | tests/server/mcpserver/test_integration.py | 66 | CODE | |
| LOW | tests/shared/test_streamable_http.py | 209 | CODE | |
| LOW | tests/shared/test_uri_template.py | 934 | CODE | |
| LOW | tests/examples/test_story_shape.py | 39 | CODE | |
| LOW | tests/client/test_session_group.py | 320 | CODE | |
| LOW | examples/snippets/clients/url_elicitation_client.py | 237 | CODE | |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 285 | CODE | |
| LOW | …ples/clients/simple-chatbot/mcp_simple_chatbot/main.py | 332 | CODE | |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 267 | CODE | |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 287 | CODE | |
| LOW | …ents/simple-auth-client/mcp_simple_auth_client/main.py | 307 | CODE | |
| LOW | …ervers/sse-polling-demo/mcp_sse_polling_demo/server.py | 60 | CODE | |
| LOW | scripts/update_readme_snippets.py | 31 | CODE | |
| LOW | scripts/docs/llms_txt.py | 123 | CODE | |
| LOW | src/mcp/server/_streamable_http_modern.py | 205 | CODE | |
| LOW | src/mcp/server/_streamable_http_modern.py | 304 | CODE | |
| LOW | src/mcp/server/streamable_http.py | 465 | CODE | |
| LOW | src/mcp/server/streamable_http.py | 855 | CODE | |
| LOW | src/mcp/server/streamable_http.py | 880 | CODE | |
| LOW | src/mcp/server/auth/handlers/authorize.py | 70 | CODE | |
| LOW | src/mcp/server/mcpserver/resolve.py | 516 | CODE | |
| LOW | src/mcp/server/mcpserver/resources/types.py | 58 | CODE | |
| LOW | src/mcp/server/mcpserver/utilities/func_metadata.py | 366 | CODE | |
| LOW | src/mcp/server/mcpserver/utilities/context_injection.py | 13 | CODE | |
| LOW | src/mcp/server/mcpserver/prompts/base.py | 141 | CODE | |
| LOW | src/mcp/shared/jsonrpc_dispatcher.py | 690 | CODE | |
| LOW | src/mcp/shared/uri_template.py | 228 | CODE | |
| LOW | src/mcp/shared/uri_template.py | 611 | CODE | |
| LOW | src/mcp/shared/uri_template.py | 878 | CODE | |
| LOW | src/mcp/shared/uri_template.py | 924 | CODE | |
| LOW | src/mcp/shared/uri_template.py | 969 | CODE | |
| LOW | src/mcp/shared/uri_template.py | 459 | CODE | |
| LOW | src/mcp/shared/inbound.py | 119 | CODE | |
| LOW | src/mcp/shared/direct_dispatcher.py | 230 | CODE | |
| LOW | src/mcp/cli/cli.py | 119 | CODE | |
| LOW | src/mcp/cli/cli.py | 361 | CODE | |
| LOW | src/mcp/client/streamable_http.py | 316 | CODE | |
| LOW | src/mcp/client/streamable_http.py | 536 | CODE | |
| LOW | src/mcp/client/_probe.py | 47 | CODE | |
| LOW | src/mcp/client/stdio.py | 114 | CODE | |
| LOW | src/mcp/client/stdio.py | 141 | CODE | |
| LOW | src/mcp/client/auth/oauth2.py | 530 | CODE | |
| LOW | src/mcp/client/auth/extensions/identity_assertion.py | 162 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/server/mcpserver/auth/test_auth_integration.py | 124 | # Check if refresh token exists | COMMENT |
| LOW⚡ | tests/server/mcpserver/auth/test_auth_integration.py | 129 | # Check if the access token exists | COMMENT |
| LOW⚡ | tests/server/mcpserver/auth/test_auth_integration.py | 132 | # Check if the token was issued to this client | COMMENT |
| LOW | tests/server/mcpserver/auth/test_auth_integration.py | 167 | # Check if token is expired | COMMENT |
| LOW | examples/snippets/clients/url_elicitation_client.py | 156 | # Check if the tool returned an error in the result | COMMENT |
| LOW | examples/snippets/clients/url_elicitation_client.py | 164 | # Check if this is a URL elicitation required error | COMMENT |
| LOW | examples/snippets/clients/pagination_client.py | 30 | # Check if there are more pages | COMMENT |
| LOW | examples/snippets/servers/elicitation.py | 35 | # Check if date is available | COMMENT |
| LOW | …rs/simple-auth/mcp_simple_auth/simple_auth_provider.py | 248 | # Check if expired | COMMENT |
| LOW | src/mcp/server/transport_security.py | 58 | # Check if the actual host starts with base host and has a port | COMMENT |
| LOW | src/mcp/server/transport_security.py | 80 | # Check if the actual origin starts with base origin and has a port | COMMENT |
| LOW⚡ | src/mcp/server/streamable_http.py | 505 | # Check if this is an initialization request | COMMENT |
| LOW⚡ | src/mcp/server/streamable_http.py | 509 | # Check if the server already has an established session | COMMENT |
| LOW⚡ | src/mcp/server/streamable_http.py | 511 | # Check if request has a session ID | COMMENT |
| LOW | src/mcp/server/streamable_http.py | 692 | # Check if we already have an active GET stream | COMMENT |
| LOW | src/mcp/server/streamable_http.py | 985 | # Check if this is a response with a known request id. | COMMENT |
| LOW | src/mcp/server/mcpserver/server.py | 658 | # Check if user passed function directly instead of calling decorator | COMMENT |
| LOW | src/mcp/server/mcpserver/server.py | 791 | # Check if user passed function directly instead of calling decorator | COMMENT |
| LOW | src/mcp/server/mcpserver/server.py | 949 | # Check if user passed function directly instead of calling decorator | COMMENT |
| LOW | src/mcp/server/mcpserver/utilities/func_metadata.py | 253 | # Check if the parameter name conflicts with BaseModel attributes | COMMENT |
| LOW | src/mcp/client/streamable_http.py | 559 | # Check if this is a resumption request | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/server/mcpserver/auth/test_auth_integration.py | 557 | # Step 1: First, let's create a token and refresh token at the current time | COMMENT |
| LOW | tests/server/mcpserver/auth/test_auth_integration.py | 576 | # Step 2: Time travel forward 4 hours (tokens expire in 1 hour by default) | COMMENT |
| LOW | .claude/commands/review-pr.md | 5 | ## Step 1: Resolve the PR | COMMENT |
| LOW | .claude/commands/review-pr.md | 20 | ## Step 2: Gather the diff | COMMENT |
| LOW | .claude/commands/review-pr.md | 30 | ## Step 3: Collect PR discussion context | COMMENT |
| LOW | .claude/commands/review-pr.md | 47 | ## Step 4: Find and read linked issues | COMMENT |
| LOW | .claude/commands/review-pr.md | 63 | ## Step 5: Analyze and validate | COMMENT |
| LOW | .claude/commands/review-pr.md | 75 | ## Step 6: Produce the review summary | COMMENT |
| LOW | examples/servers/simple-auth/README.md | 9 | ### Step 1: Start Authorization Server | COMMENT |
| LOW | examples/servers/simple-auth/README.md | 27 | ### Step 2: Start Resource Server (MCP Server) | COMMENT |
| LOW | examples/servers/simple-auth/README.md | 41 | ### Step 3: Test with Client | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 640 | # Step 3: Apply scope selection strategy | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 648 | # Step 4: Register client or use URL-based client ID (CIMD) | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 694 | # Step 5: Perform authorization and complete token exchange | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 705 | # Step 1: Extract error field from WWW-Authenticate header | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 708 | # Step 2: Check if we need to step-up authorization | COMMENT |
| LOW | src/mcp/client/auth/oauth2.py | 559 | # Step 1: Discover protected resource metadata (SEP-985 with fallback support) | COMMENT |
| LOW | src/mcp/client/auth/oauth2.py | 606 | # Step 2: Discover OAuth Authorization Server Metadata (OASM) (with fallback for legacy servers) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/client/test_stdio.py | 138 | CODE | |
| LOW | tests/client/test_caching.py | 303 | CODE | |
| LOW | tests/interaction/_connect.py | 80 | CODE | |
| LOW | tests/interaction/_connect.py | 115 | CODE | |
| LOW | tests/interaction/_connect.py | 177 | CODE | |
| LOW | tests/interaction/_connect.py | 356 | CODE | |
| LOW | tests/interaction/_connect.py | 63 | CODE | |
| LOW | tests/interaction/auth/_harness.py | 405 | CODE | |
| LOW | src/mcp/server/session.py | 137 | CODE | |
| LOW | src/mcp/server/session.py | 157 | CODE | |
| LOW | src/mcp/server/session.py | 177 | CODE | |
| LOW | src/mcp/server/session.py | 196 | CODE | |
| LOW | src/mcp/server/lowlevel/server.py | 134 | CODE | |
| LOW | src/mcp/server/lowlevel/server.py | 217 | CODE | |
| LOW | src/mcp/server/lowlevel/server.py | 309 | CODE | |
| LOW | src/mcp/server/lowlevel/server.py | 708 | CODE | |
| LOW | src/mcp/server/mcpserver/server.py | 160 | CODE | |
| LOW | src/mcp/server/mcpserver/server.py | 361 | CODE | |
| LOW | src/mcp/server/mcpserver/server.py | 720 | CODE | |
| LOW | src/mcp/server/mcpserver/server.py | 1043 | CODE | |
| LOW | src/mcp/server/mcpserver/resolve.py | 131 | CODE | |
| LOW | src/mcp/server/mcpserver/tools/base.py | 58 | CODE | |
| LOW | src/mcp/server/mcpserver/resources/resource_manager.py | 60 | CODE | |
| LOW | src/mcp/server/mcpserver/resources/templates.py | 125 | CODE | |
| LOW | src/mcp/shared/peer.py | 89 | CODE | |
| LOW | src/mcp/shared/peer.py | 107 | CODE | |
| LOW | src/mcp/shared/peer.py | 125 | CODE | |
| LOW | src/mcp/shared/peer.py | 142 | CODE | |
| LOW | src/mcp/client/session.py | 325 | CODE | |
| LOW | src/mcp/client/session.py | 893 | CODE | |
| LOW | src/mcp/client/session.py | 952 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/server/mcpserver/auth/test_auth_integration.py | 557 | # Step 1: First, let's create a token and refresh token at the current time | COMMENT |
| LOW | tests/server/mcpserver/auth/test_auth_integration.py | 576 | # Step 2: Time travel forward 4 hours (tokens expire in 1 hour by default) | COMMENT |
| LOW | src/mcp/server/auth/middleware/client_auth.py | 88 | # form_data.get() can return an UploadFile or None, so we need to check if it's a string | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 640 | # Step 3: Apply scope selection strategy | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 648 | # Step 4: Register client or use URL-based client ID (CIMD) | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 694 | # Step 5: Perform authorization and complete token exchange | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 705 | # Step 1: Extract error field from WWW-Authenticate header | COMMENT |
| LOW⚡ | src/mcp/client/auth/oauth2.py | 708 | # Step 2: Check if we need to step-up authorization | COMMENT |
| LOW | src/mcp/client/auth/oauth2.py | 559 | # Step 1: Discover protected resource metadata (SEP-985 with fallback support) | COMMENT |
| LOW | src/mcp/client/auth/oauth2.py | 606 | # Step 2: Discover OAuth Authorization Server Metadata (OASM) (with fallback for legacy servers) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pyproject.toml | 81 | # MkDocs plugins or hooks, so the API reference (formerly gen-files + | COMMENT |
| LOW | tests/shared/test_uri_template.py | 681 | ("file://{+path}", "http://x"), | COMMENT |
| LOW | tests/shared/test_uri_template.py | 881 | # The two tests below generate template strings instead of enumerating | COMMENT |
| LOW | tests/interaction/transports/_stdio_server.py | 61 | COMMENT | |
| LOW | examples/snippets/servers/streamable_config.py | 21 | mcp.run(transport="streamable-http", stateless_http=True, json_response=True) | COMMENT |
| LOW | scripts/build-docs.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/serve-docs.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/docs/llms_txt.py | 41 | "mcp-types API reference", | COMMENT |
| LOW | scripts/docs/llms_txt.py | 61 | # Block HTML comments are inert in rendered output: python-markdown passes | COMMENT |
| LOW | scripts/docs/build.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | .github/workflows/shared.yml | 141 | COMMENT | |
| LOW | .github/workflows/conformance.yml | 81 | - name: Run server conformance (all suite, extension scenarios) | COMMENT |
| LOW | .github/workflows/docs-preview.yml | 1 | name: Docs Preview | COMMENT |
| LOW | …b/actions/conformance/expected-failures.2026-07-28.yml | 1 | # Expected failures for the carried-forward 2026-07-28 legs | COMMENT |
| LOW | .github/actions/conformance/expected-failures.yml | 1 | # Conformance scenarios not yet passing against the Python SDK on main. | COMMENT |
| LOW | src/mcp/server/runner.py | 181 | # so malformed params are INVALID_PARAMS even with no handler | COMMENT |
| LOW | src/mcp/server/runner.py | 221 | # Dump and serialize inside the chain so the OpenTelemetry span (the | COMMENT |
| LOW | src/mcp/server/auth/handlers/authorize.py | 81 | error_description: str | None, | COMMENT |
| LOW | src/mcp/shared/uri_template.py | 1081 | if atom.ifemp: | COMMENT |
| LOW | src/mcp/shared/inbound.py | 81 | field to compare against), so both ends agree on the field by construction. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/server/mcpserver/test_func_metadata.py | 997 | return PersonWithAddress(name="Jack", address=Address(street="123 Main St", city="Anytown", zipcode="12345")) | CODE |
| LOW⚡ | tests/server/mcpserver/test_server.py | 534 | assert result.structured_content == {"name": "John Doe", "age": 30, "active": True} | CODE |
| LOW⚡ | tests/server/mcpserver/test_server.py | 538 | assert '"name": "John Doe"' in result.content[0].text | CODE |
| LOW | tests/server/mcpserver/test_server.py | 516 | return UserOutput(name="John Doe", age=30) | CODE |
| LOW | tests/server/mcpserver/test_elicitation.py | 166 | {"required_name": "John Doe", "optional_age": 30, "optional_email": "john@example.com", "subscribe": True}, | CODE |
| LOW | tests/client/auth/extensions/test_client_credentials.py | 146 | "name": "John Doe", | CODE |
| LOW | tests/client/auth/extensions/test_client_credentials.py | 178 | assert claims["name"] == "John Doe" | CODE |
| LOW | tests/client/auth/extensions/test_client_credentials.py | 296 | client_id="placeholder", | CODE |
| LOW | …vers/everything-server/mcp_everything_server/server.py | 239 | name: str = Field(default="John Doe", description="User name") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples/servers/simple-auth/mcp_simple_auth/server.py | 6 | NOTE: this is a simplified example for demonstration purposes. | STRING |
| MEDIUM | …rs/simple-auth/mcp_simple_auth/simple_auth_provider.py | 4 | for demonstration purposes. No external authentication provider is required. | STRING |
| MEDIUM | …rs/simple-auth/mcp_simple_auth/simple_auth_provider.py | 6 | NOTE: this is a simplified example for demonstration purposes. | STRING |
| MEDIUM | …les/servers/simple-auth/mcp_simple_auth/auth_server.py | 6 | NOTE: this is a simplified example for demonstration purposes. | STRING |
| MEDIUM | …ervers/simple-auth/mcp_simple_auth/legacy_as_server.py | 6 | NOTE: this is a simplified example for demonstration purposes. | STRING |
| MEDIUM | …/servers/simple-auth/mcp_simple_auth/token_verifier.py | 15 | This is a simple example implementation for demonstration purposes. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/server/mcpserver/test_tool_manager.py | 630 | def process_data(input_data: str) -> str: # pragma: no cover | CODE |
| LOW | examples/snippets/servers/notifications.py | 7 | async def process_data(data: str, ctx: Context) -> str: | CODE |
| LOW | …amples/snippets/servers/streamable_http_path_config.py | 17 | def process_data(data: str) -> str: | CODE |
| LOW | src/mcp/server/streamable_http.py | 407 | async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> None: | CODE |
| LOW | src/mcp/server/streamable_http_manager.py | 157 | async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/build-docs.sh | 16 | # Usage: | COMMENT |
| LOW | scripts/serve-docs.sh | 9 | # Usage: | COMMENT |
| LOW | scripts/docs/build.sh | 13 | # Usage: | COMMENT |