AI Slop Code RIsk Monitor

mcp-use/mcp-use

The fullstack MCP framework to develop MCP Apps for ChatGPT / Claude & MCP Servers for AI Agents.

6.0 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for mcp-use/mcp-use, a TypeScript project with 10,742 GitHub stars. SynthScan examined 312,494 lines of code across 1665 source files, recording 1259 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 6.0 (Moderate 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.

6.0
Adjusted Signal
6.0
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
10.7K
Stars
TypeScript
Language
312.5K
Lines of Code
1.7K
Files
1.3K
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 13.7/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 3.9/100 · LOW

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

Agent Over-Engineering Ratio 17.9/100 · LOW

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

PR Review Velocity Impact 25.3/100 · MEDIUM

Which changes need focused human review? 1259 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 38MEDIUM 188LOW 1033

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 1259 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 Identifiers487 hits · 514 pts
SeverityFileLineSnippetContext
LOWlibraries/python/tests/unit/test_client_capabilities.py30 def test_list_roots_callback_always_provided(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py64 async def test_set_roots_updates_cache(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py80 async def test_set_roots_sends_notification_when_connected(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py97 async def test_set_roots_no_notification_when_disconnected(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py114 async def test_internal_list_roots_callback_returns_roots(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py133 async def test_custom_list_roots_callback_takes_precedence(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py156 def test_get_roots_returns_copy(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py176 async def test_stdio_passes_list_roots_callback(self, mock_client_session, mock_connection_manager):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py214 async def test_http_passes_list_roots_callback(self, mock_client_session, mock_cm_class):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py246 def test_sampling_callback_stored(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py255 def test_elicitation_callback_stored(self):CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py267 async def test_all_callbacks_passed_to_client_session(self, mock_client_session, mock_connection_manager):CODE
LOW⚡libraries/python/tests/unit/test_sandbox_connector.py85 def test_init_with_env_api_key(self, mock_sandbox_modules, mock_os_environ):CODE
LOW⚡libraries/python/tests/unit/test_sandbox_connector.py95 def test_init_missing_api_key(self, mock_sandbox_modules):CODE
LOW⚡libraries/python/tests/unit/test_sandbox_connector.py101 def test_init_with_custom_options(self, mock_sandbox_modules):CODE
LOWlibraries/python/tests/unit/test_sandbox_connector.py166 async def test_connect_already_connected(self, mock_sandbox_modules):CODE
LOWlibraries/python/tests/unit/test_sandbox_connector.py269 async def test_cleanup_resources_with_exceptions(self, mock_logger, mock_sandbox_modules):CODE
LOWlibraries/python/tests/unit/test_agent.py25 def test_init_with_llm_and_client(self):CODE
LOW⚡libraries/python/tests/unit/test_agent.py39 def test_init_requires_llm_for_local(self):CODE
LOW⚡libraries/python/tests/unit/test_agent.py45 def test_init_requires_client_or_connectors(self):CODE
LOW⚡libraries/python/tests/unit/test_agent.py52 def test_init_with_connectors_only(self):CODE
LOWlibraries/python/tests/unit/test_agent.py63 def test_server_manager_requires_client(self):CODE
LOWlibraries/python/tests/unit/test_agent.py70 def test_init_remote_mode_with_agent_id(self):CODE
LOWlibraries/python/tests/unit/test_agent.py91 async def test_run_remote_delegates(self):CODE
LOWlibraries/python/tests/unit/test_agent.py110 async def test_run_local_calls_stream_and_consume(self):CODE
LOWlibraries/python/tests/unit/test_agent.py149 async def test_stream_remote_delegates(self):CODE
LOWlibraries/python/tests/unit/test_agent.py170 async def test_stream_initializes_and_finishes(self):CODE
LOWlibraries/python/tests/unit/test_agent.py200 async def test_stream_uses_external_history_and_sets_max_steps(self):CODE
LOWlibraries/python/tests/unit/test_agent.py238 async def test_stream_persists_tool_messages_in_history(self):CODE
LOWlibraries/python/tests/unit/test_agent.py282 async def test_stream_handles_block_tool_results_without_losing_history(self):CODE
LOWlibraries/python/tests/unit/test_agent.py346 async def test_stream_events_persists_block_tool_results_in_history(self):CODE
LOWlibraries/python/tests/unit/test_code_executor.py64 async def test_execute_with_variables(self, code_executor):STRING
LOWlibraries/python/tests/unit/test_code_executor.py94 async def test_execute_with_list_comprehension(self, code_executor):STRING
LOWlibraries/python/tests/unit/test_code_executor.py162 async def test_safe_builtins_available(self, code_executor):CODE
LOWlibraries/python/tests/unit/test_code_executor.py214 async def test_search_tools_function(self, mock_client, code_executor):CODE
LOWlibraries/python/tests/unit/test_code_executor.py239 async def test_search_tools_with_query(self, mock_client, code_executor):STRING
LOWlibraries/python/tests/unit/test_code_executor.py281 async def test_tool_namespaces_available(self, mock_client, code_executor):STRING
LOWlibraries/python/tests/unit/test_code_executor.py304 async def test_tool_wrapper_creation(self, mock_client, code_executor):STRING
LOWlibraries/python/tests/unit/test_enum_handling.py22 def test_fix_schema_with_enum(self):CODE
LOWlibraries/python/tests/unit/test_enum_handling.py34 def test_fix_schema_preserves_existing_type(self):CODE
LOWlibraries/python/tests/unit/test_enum_handling.py48 def test_enum_validation_works_after_fix(self):CODE
LOWlibraries/python/tests/unit/test_enum_handling.py71 def test_enum_validation_accepts_valid_values(self):CODE
LOWlibraries/python/tests/unit/test_enum_handling.py93 def test_recursive_schema_fixing(self):CODE
LOWlibraries/python/tests/unit/test_session.py24 def test_init_with_auto_connect_false(self):CODE
LOWlibraries/python/tests/unit/test_session.py58 async def test_async_context_manager(self):CODE
LOWlibraries/python/tests/unit/test_session.py66 async def test_is_connected_property(self):CODE
LOWlibraries/python/tests/unit/test_session.py104 async def test_initialize_already_connected(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py43 async def test_stop_with_normal_cleanup(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py52 async def test_stop_with_default_timeout(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py60 async def test_stop_with_custom_timeout(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py68 async def test_stop_with_slow_cleanup_exceeding_timeout(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py77 async def test_stop_with_hanging_cleanup(self):CODE
LOW…s/python/tests/unit/test_connection_manager_timeout.py107 async def test_stop_when_task_not_started(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py120 async def test_stop_timeout_with_zero_timeout(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py128 async def test_timeout_during_task_execution(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py136 async def test_stop_without_hanging_task(self):CODE
LOW⚡…s/python/tests/unit/test_connection_manager_timeout.py145 async def test_timeout_with_close_exception(self):CODE
LOW…s/python/tests/unit/test_connection_manager_timeout.py160 async def test_close_exception_without_timeout(self):CODE
LOW…s/python/tests/unit/test_connection_manager_timeout.py174 async def test_stop_respects_total_timeout_timing(self):CODE
LOW…s/python/tests/unit/test_connection_manager_timeout.py192 async def test_stop_with_negative_timeout_waits_indefinitely(self):CODE
427 more matches not shown…
Decorative Section Separators119 hits · 407 pts
SeverityFileLineSnippetContext
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py11# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py13# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py22# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py24# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py76# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py78# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py110# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py112# ---------------------------------------------------------------------------COMMENT
MEDIUMlibraries/python/tests/unit/server/test_json_schema.py160# ---------------------------------------------------------------------------COMMENT
MEDIUMlibraries/python/tests/unit/server/test_json_schema.py162# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py179# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡libraries/python/tests/unit/server/test_json_schema.py181# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py143# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py145# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py153# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py155# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py174# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py176# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py189# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py191# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py221# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ries/python/tests/unit/server/test_list_tool_format.py223# ---------------------------------------------------------------------------COMMENT
MEDIUM…ries/python/tests/unit/server/test_list_tool_format.py22# ---------------------------------------------------------------------------COMMENT
MEDIUM…ries/python/tests/unit/server/test_list_tool_format.py24# ---------------------------------------------------------------------------COMMENT
MEDIUM…ries/python/tests/unit/server/test_list_tool_format.py52# ---------------------------------------------------------------------------COMMENT
MEDIUM…ries/python/tests/unit/server/test_list_tool_format.py54# ---------------------------------------------------------------------------COMMENT
MEDIUM…ries/python/tests/unit/server/test_list_tool_format.py128# ---------------------------------------------------------------------------COMMENT
MEDIUM…ries/python/tests/unit/server/test_list_tool_format.py130# ---------------------------------------------------------------------------COMMENT
MEDIUM…/python/tests/unit/server/auth/test_auth_middleware.py60# ============================================================================COMMENT
MEDIUM…/python/tests/unit/server/auth/test_auth_middleware.py62# ============================================================================COMMENT
MEDIUM…/python/tests/unit/server/auth/test_auth_middleware.py86# ============================================================================COMMENT
MEDIUM…/python/tests/unit/server/auth/test_auth_middleware.py88# ============================================================================COMMENT
MEDIUM…ries/python/tests/unit/server/auth/test_bearer_auth.py14# ============================================================================COMMENT
MEDIUM…ries/python/tests/unit/server/auth/test_bearer_auth.py16# ============================================================================COMMENT
MEDIUM⚡…ries/python/tests/unit/server/auth/test_bearer_auth.py33# ============================================================================COMMENT
MEDIUM⚡…ries/python/tests/unit/server/auth/test_bearer_auth.py35# ============================================================================COMMENT
MEDIUM⚡libraries/python/tests/integration/test_conformance.py69# =============================================================================COMMENT
MEDIUM⚡libraries/python/tests/integration/test_conformance.py71# =============================================================================COMMENT
MEDIUMlibraries/python/tests/integration/test_conformance.py141# =============================================================================COMMENT
MEDIUMlibraries/python/tests/integration/test_conformance.py143# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py38# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py41# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py63# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py65# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py351# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py353# =============================================================================COMMENT
MEDIUM⚡…/integration/servers_for_testing/conformance_server.py404# =============================================================================COMMENT
MEDIUM⚡…/integration/servers_for_testing/conformance_server.py406# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py452# =============================================================================COMMENT
MEDIUM…/integration/servers_for_testing/conformance_server.py454# =============================================================================COMMENT
MEDIUM…/integration/clients_for_testing/conformance_client.py74# =============================================================================COMMENT
MEDIUM…/integration/clients_for_testing/conformance_client.py76# =============================================================================COMMENT
MEDIUM…/integration/clients_for_testing/conformance_client.py196# =============================================================================COMMENT
MEDIUM…/integration/clients_for_testing/conformance_client.py198# =============================================================================COMMENT
MEDIUM…/integration/clients_for_testing/conformance_client.py217# =============================================================================COMMENT
MEDIUM…/integration/clients_for_testing/conformance_client.py219# =============================================================================COMMENT
MEDIUM⚡…/integration/clients_for_testing/conformance_client.py269# =============================================================================COMMENT
MEDIUM⚡…/integration/clients_for_testing/conformance_client.py271# =============================================================================COMMENT
MEDIUMlibraries/python/examples/server/context_example.py28# =============================================================================COMMENT
MEDIUMlibraries/python/examples/server/context_example.py30# =============================================================================COMMENT
59 more matches not shown…
Unused Imports198 hits · 174 pts
SeverityFileLineSnippetContext
LOWlibraries/python/tests/unit/test_client_capabilities.py8CODE
LOWlibraries/python/tests/unit/test_client_capabilities.py13CODE
LOWlibraries/python/tests/unit/test_sandbox_connector.py6CODE
LOWlibraries/python/tests/unit/test_agent.py8CODE
LOWlibraries/python/tests/unit/test_enum_handling.py6CODE
LOWlibraries/python/tests/unit/test_enum_handling.py7CODE
LOWlibraries/python/tests/unit/test_enum_handling.py10CODE
LOWlibraries/python/tests/unit/test_enum_handling.py10CODE
LOWlibraries/python/tests/unit/test_session.py7CODE
LOW…aries/python/tests/unit/test_search_tools_issue_138.py14CODE
LOWlibraries/python/tests/unit/backward_compatibility.py14CODE
LOWlibraries/python/tests/unit/backward_compatibility.py15CODE
LOWlibraries/python/tests/unit/backward_compatibility.py16CODE
LOWlibraries/python/tests/unit/backward_compatibility.py17CODE
LOWlibraries/python/tests/unit/backward_compatibility.py18CODE
LOWlibraries/python/tests/unit/backward_compatibility.py19CODE
LOWlibraries/python/tests/unit/backward_compatibility.py20CODE
LOWlibraries/python/tests/unit/backward_compatibility.py21CODE
LOWlibraries/python/tests/unit/backward_compatibility.py23CODE
LOWlibraries/python/tests/unit/backward_compatibility.py24CODE
LOWlibraries/python/tests/unit/backward_compatibility.py25CODE
LOWlibraries/python/tests/unit/backward_compatibility.py28CODE
LOWlibraries/python/tests/unit/backward_compatibility.py29CODE
LOWlibraries/python/tests/unit/backward_compatibility.py32CODE
LOWlibraries/python/tests/unit/backward_compatibility.py33CODE
LOWlibraries/python/tests/unit/backward_compatibility.py34CODE
LOWlibraries/python/tests/unit/backward_compatibility.py35CODE
LOWlibraries/python/tests/unit/backward_compatibility.py36CODE
LOWlibraries/python/tests/unit/backward_compatibility.py37CODE
LOWlibraries/python/tests/unit/backward_compatibility.py40CODE
LOWlibraries/python/tests/unit/backward_compatibility.py41CODE
LOWlibraries/python/tests/unit/backward_compatibility.py42CODE
LOWlibraries/python/tests/unit/backward_compatibility.py43CODE
LOWlibraries/python/tests/unit/backward_compatibility.py44CODE
LOWlibraries/python/tests/unit/backward_compatibility.py45CODE
LOWlibraries/python/tests/unit/backward_compatibility.py48CODE
LOWlibraries/python/tests/unit/backward_compatibility.py49CODE
LOWlibraries/python/tests/unit/backward_compatibility.py50CODE
LOWlibraries/python/tests/unit/backward_compatibility.py51CODE
LOWlibraries/python/tests/unit/backward_compatibility.py52CODE
LOWlibraries/python/tests/unit/backward_compatibility.py55CODE
LOWlibraries/python/tests/unit/backward_compatibility.py56CODE
LOWlibraries/python/tests/unit/backward_compatibility.py57CODE
LOWlibraries/python/tests/unit/backward_compatibility.py58CODE
LOWlibraries/python/tests/unit/backward_compatibility.py59CODE
LOWlibraries/python/tests/unit/backward_compatibility.py60CODE
LOWlibraries/python/tests/unit/backward_compatibility.py61CODE
LOWlibraries/python/tests/unit/backward_compatibility.py62CODE
LOWlibraries/python/tests/unit/backward_compatibility.py63CODE
LOWlibraries/python/tests/unit/backward_compatibility.py64CODE
LOWlibraries/python/tests/unit/backward_compatibility.py65CODE
LOWlibraries/python/tests/unit/backward_compatibility.py66CODE
LOWlibraries/python/tests/unit/backward_compatibility.py67CODE
LOWlibraries/python/tests/unit/backward_compatibility.py68CODE
LOWlibraries/python/tests/unit/backward_compatibility.py69CODE
LOWlibraries/python/tests/unit/backward_compatibility.py72CODE
LOWlibraries/python/tests/unit/backward_compatibility.py73CODE
LOWlibraries/python/tests/unit/backward_compatibility.py74CODE
LOWlibraries/python/tests/unit/backward_compatibility.py75CODE
LOWlibraries/python/tests/unit/backward_compatibility.py76CODE
138 more matches not shown…
Excessive Try-Catch Wrapping138 hits · 154 pts
SeverityFileLineSnippetContext
LOW…integration/servers_for_testing/timeout_test_server.py113 except Exception as e:CODE
MEDIUM…integration/servers_for_testing/timeout_test_server.py114 print(f"Error in SSE connection {connection_id}: {e}")CODE
MEDIUM…integration/servers_for_testing/timeout_test_server.py85def event_generator():CODE
LOW…/integration/clients_for_testing/conformance_client.py152 except Exception as e:CODE
LOW…/integration/clients_for_testing/conformance_client.py249 except Exception:CODE
LOW⚡…/integration/clients_for_testing/conformance_client.py265 except Exception:CODE
LOW…/integration/clients_for_testing/conformance_client.py328 except Exception:CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py318 except Exception:CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py552 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py623 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py1104 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py606 except Exception as e:STRING
LOWlibraries/python/mcp_use/agents/mcpagent.py909 except Exception as e:STRING
LOWlibraries/python/mcp_use/agents/mcpagent.py918 except Exception as e:STRING
LOWlibraries/python/mcp_use/agents/remote.py137 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/remote.py149 except Exception as fallback_e:CODE
LOWlibraries/python/mcp_use/agents/remote.py196 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/remote.py255 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/remote.py359 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/display.py120 except Exception:CODE
LOW…hon/mcp_use/agents/middleware/tool_error_middleware.py58 except Exception as e:CODE
LOW…aries/python/mcp_use/agents/managers/server_manager.py58 except Exception:CODE
LOW…aries/python/mcp_use/agents/managers/server_manager.py80 except Exception as e:CODE
LOW…s/python/mcp_use/agents/managers/tools/search_tools.py111 except Exception as e:CODE
LOW…s/python/mcp_use/agents/managers/tools/search_tools.py173 except Exception:CODE
LOW…s/python/mcp_use/agents/managers/tools/search_tools.py202 except Exception:CODE
LOW…python/mcp_use/agents/managers/tools/connect_server.py71 except Exception as e:CODE
LOW…hon/mcp_use/agents/managers/tools/list_servers_tool.py45 except Exception as e:CODE
LOW…hon/mcp_use/agents/managers/tools/disconnect_server.py37 except Exception as e:CODE
LOW…braries/python/mcp_use/agents/observability/laminar.py41 except Exception as e:CODE
LOW…es/python/mcp_use/agents/adapters/langchain_adapter.py194 except Exception as e:CODE
LOW…es/python/mcp_use/agents/adapters/langchain_adapter.py203 except Exception as e:CODE
LOW…es/python/mcp_use/agents/adapters/langchain_adapter.py244 except Exception as e:CODE
LOW…es/python/mcp_use/agents/adapters/langchain_adapter.py301 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/adapters/base.py111 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/adapters/base.py116 except Exception as e:CODE
LOWlibraries/python/mcp_use/agents/adapters/base.py340 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/server.py431 except Exception:CODE
LOWlibraries/python/mcp_use/server/middleware/telemetry.py21 except Exception as exc:CODE
LOWlibraries/python/mcp_use/server/middleware/telemetry.py43 except Exception as exc:CODE
LOWlibraries/python/mcp_use/server/middleware/telemetry.py62 except Exception as exc:CODE
LOWlibraries/python/mcp_use/server/auth/middleware.py108 except Exception:CODE
LOW⚡libraries/python/mcp_use/server/utils/openmcp.py80 except Exception as e:CODE
LOW⚡libraries/python/mcp_use/server/utils/openmcp.py87 except Exception as e:CODE
LOW⚡libraries/python/mcp_use/server/utils/openmcp.py94 except Exception as e:CODE
LOW⚡libraries/python/mcp_use/server/utils/openmcp.py101 except Exception as e:CODE
LOW⚡libraries/python/mcp_use/server/utils/openmcp.py108 except Exception as e:CODE
LOW⚡libraries/python/mcp_use/server/utils/openmcp.py116 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/utils/openmcp.py131 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/utils/openmcp.py147 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/utils/openmcp.py161 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/utils/inspector.py51 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/utils/inspector.py84 except Exception as e:CODE
LOWlibraries/python/mcp_use/server/templates/cli.py206 except Exception:CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py70 except Exception as e:CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py162 except Exception as e:CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py179 except Exception as e:CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py211 except Exception as e:CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py240 except Exception as e:CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py254 except Exception as e:CODE
78 more matches not shown…
Self-Referential Comments44 hits · 136 pts
SeverityFileLineSnippetContext
MEDIUMlibraries/python/tests/unit/test_client_capabilities.py122 # Create a mock contextCOMMENT
MEDIUMlibraries/python/tests/unit/test_client_capabilities.py145 # Create a mock contextCOMMENT
MEDIUMlibraries/python/tests/unit/test_code_executor.py306 # Create a mock session with a toolCOMMENT
MEDIUMlibraries/python/tests/unit/test_enum_handling.py50 # Create a schema that would cause the original issueCOMMENT
MEDIUMlibraries/python/tests/unit/test_enum_handling.py73 # Create a schema with enumCOMMENT
MEDIUM…aries/python/tests/unit/test_search_tools_issue_138.py107 # Create a ToolSearchEngine instance with mocked server_toolsCOMMENT
MEDIUMlibraries/python/tests/unit/test_config.py24 # Create a temporary file with test configCOMMENT
MEDIUMlibraries/python/tests/unit/test_stdio_connector.py336 # Define the nested structureCOMMENT
MEDIUMlibraries/python/tests/unit/test_client.py50 # Create a temporary file with test configCOMMENT
MEDIUMlibraries/python/tests/unit/test_client.py70 # Create a temporary file with test configCOMMENT
MEDIUMlibraries/python/tests/unit/test_client.py181 # Create a temporary file pathCOMMENT
MEDIUMlibraries/python/tests/unit/test_http_connector.py419 # Define the detailed structure that the connector's read_resource methodCOMMENT
MEDIUM…/python/tests/integration/agent/test_server_manager.py50 # Create the get_greeting_tool dynamically inside the managerCOMMENT
MEDIUM⚡…thon/tests/integration/client/others/test_code_mode.py71 # Create a temporary config fileCOMMENT
MEDIUMlibraries/python/mcp_use/agents/mcpagent.py160 # Create the adapter for tool conversionCOMMENT
MEDIUMlibraries/python/mcp_use/agents/mcpagent.py191 # Create the system message based on available toolsCOMMENT
MEDIUMlibraries/python/mcp_use/agents/mcpagent.py243 # Create the system message based on available toolsCOMMENT
MEDIUMlibraries/python/mcp_use/agents/mcpagent.py246 # Create the agentCOMMENT
MEDIUM…s/python/mcp_use/agents/managers/tools/search_tools.py277 # Create a new results list with marked active serverCOMMENT
MEDIUM…raries/python/mcp_use/agents/observability/langfuse.py25 # Create a custom CallbackHandler wrapper to add loggingCOMMENT
MEDIUM…es/python/mcp_use/agents/adapters/langchain_adapter.py282 # Create an empty Pydantic model if there are no argumentsCOMMENT
MEDIUMlibraries/python/mcp_use/client/client.py251 # Create a session for itCOMMENT
MEDIUMlibraries/python/mcp_use/client/client.py320 # Create the sessionCOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/sandbox.py255 # Create the SSE connection URLCOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/sandbox.py262 # Create the client sessionCOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/http.py141 # Create a temporary client for OAuth metadata discoveryCOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/http.py286 # Create the client session for SSECOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/stdio.py87 # Create the client sessionCOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/websocket.py186 # Create a request IDCOMMENT
MEDIUMlibraries/python/mcp_use/client/connectors/websocket.py189 # Create a future to receive the responseCOMMENT
MEDIUMlibraries/python/mcp_use/client/auth/oauth_callback.py46 # Create the serverCOMMENT
MEDIUMlibraries/python/mcp_use/client/auth/oauth.py141 # Create a safe filename from the URLCOMMENT
MEDIUM⚡libraries/python/mcp_use/client/auth/oauth.py717 # Create a safe filename from the server URLCOMMENT
MEDIUM⚡libraries/python/mcp_use/client/auth/oauth.py732 # Create a safe filename from the server URLCOMMENT
MEDIUMlibraries/python/mcp_use/client/task_managers/sse.py63 # Create the context managerCOMMENT
MEDIUM…python/mcp_use/client/task_managers/streamable_http.py68 # Create the httpx client with auth, headers, and timeoutsCOMMENT
MEDIUM…python/mcp_use/client/task_managers/streamable_http.py79 # Create the streamable HTTP context managerCOMMENT
MEDIUMlibraries/python/mcp_use/client/task_managers/stdio.py51 # Create the context managerCOMMENT
MEDIUMlibraries/python/mcp_use/client/task_managers/base.py75 # Create a task to establish and maintain the connectionCOMMENT
MEDIUM…aries/python/mcp_use/client/task_managers/websocket.py47 # Create the context managerCOMMENT
MEDIUMlibraries/python/examples/simple_server_manager_use.py84 # Create an MCPAgent with the custom server managerCOMMENT
MEDIUMlibraries/python/examples/multi_server_example.py23 # Create a configuration with multiple serversCOMMENT
MEDIUM…aries/python/examples/langchain_integration_example.py51 # Create the LangChain agentCOMMENT
MEDIUMdocs/generate_docs.py804 # Create a mock parameter object for the annotationCOMMENT
Redundant / Tautological Comments44 hits · 67 pts
SeverityFileLineSnippetContext
LOW…integration/servers_for_testing/timeout_test_server.py96 # Check if we should timeoutCOMMENT
LOWlibraries/python/mcp_use/logging.py83 # Set propagate to True to ensure child loggers inherit settingsCOMMENT
LOWlibraries/python/mcp_use/agents/mcpagent.py868 # Check if we should restart or if execution completedSTRING
LOWlibraries/python/mcp_use/agents/remote.py113 # Check if this is a nested result structure (agent execution response)COMMENT
LOW…aries/python/mcp_use/agents/managers/server_manager.py70 # Check if this server's tools have changedCOMMENT
LOW…python/mcp_use/agents/managers/tools/connect_server.py28 # Check if server existsCOMMENT
LOW…braries/python/mcp_use/agents/observability/laminar.py12# Check if Laminar is disabled via environment variableCOMMENT
LOW…raries/python/mcp_use/agents/observability/langfuse.py6# Check if Langfuse is disabled via environment variableCOMMENT
LOWlibraries/python/mcp_use/agents/adapters/base.py187 # Check if we already have tools for this connectorCOMMENT
LOWlibraries/python/mcp_use/server/auth/middleware.py71 # Check if path should be excluded from authCOMMENT
LOWlibraries/python/mcp_use/server/auth/middleware.py78 # Check if this is a protected pathCOMMENT
LOWlibraries/python/mcp_use/server/utils/inspector.py28 # Check if server or autoConnect parameter is already presentCOMMENT
LOWlibraries/python/mcp_use/server/logging/config.py16 # Check if args contain a path that starts with inspector_pathCOMMENT
LOWlibraries/python/mcp_use/telemetry/telemetry.py58 # Check if telemetry is disabled on this instanceCOMMENT
LOWlibraries/python/mcp_use/telemetry/telemetry.py296 # Check if version file existsCOMMENT
LOWlibraries/python/mcp_use/client/client.py417 # Check if the session existsCOMMENT
LOWlibraries/python/mcp_use/client/connectors/http.py102 # Check if this is an OAuth provider configurationCOMMENT
LOW⚡libraries/python/mcp_use/client/connectors/base.py376 # Check if we have a client sessionCOMMENT
LOW⚡libraries/python/mcp_use/client/connectors/base.py386 # Check if we have a connection manager and if its task is still runningCOMMENT
LOW⚡libraries/python/mcp_use/client/connectors/base.py389 # Check if the connection manager task is done (indicates disconnection)COMMENT
LOWlibraries/python/mcp_use/client/connectors/base.py257 # Check if already initializedCOMMENT
LOWlibraries/python/mcp_use/client/connectors/base.py403 # Check if streams are closed using getattr with default valueCOMMENT
LOWlibraries/python/mcp_use/client/connectors/base.py473 # Check if the error might be due to connection lossCOMMENT
LOWlibraries/python/mcp_use/client/connectors/websocket.py101 # Check if this is a response to a pending requestCOMMENT
LOWlibraries/python/mcp_use/client/auth/oauth.py298 # Check if code challenge exists with S256COMMENT
LOWlibraries/python/mcp_use/client/auth/oauth.py305 # Check if it supports CIMDCOMMENT
LOWlibraries/python/mcp_use/client/auth/oauth.py644 # Check if token expires in more than 60 secondsCOMMENT
LOWlibraries/python/mcp_use/client/auth/oauth.py744 # Check if registration is still valid (if expiry info provided)COMMENT
LOWdocs/generate_docs.py361 # Check if this line starts a new section (not indented)COMMENT
LOWdocs/generate_docs.py600 # Check if this line starts a new section (like "Example:")COMMENT
LOWdocs/generate_docs.py884 # Check if this property is defined in a parent classCOMMENT
LOWdocs/generate_docs.py892 # Check if this method is defined in a parent classCOMMENT
LOWdocs/generate_docs.py1153 # Check if module only contains deprecated itemsCOMMENT
LOWdocs/generate_docs.py1155 # Check if all classes and functions are deprecatedCOMMENT
LOWdocs/generate_docs.py1243 # Write the fileCOMMENT
LOWdocs/generate_docs.py1278 # Check if module matches any exclusion patternCOMMENT
LOWdocs/generate_docs.py1408 # Check if this is a compound name we need to preserveCOMMENT
LOWdocs/generate_docs.py1589 # Check if this package has subpackagesCOMMENT
LOW.github/workflows/python-release.yml139 # Check if draft release existsCOMMENT
LOW.github/workflows/python-release.yml179 # Check if a published release with this version already existsCOMMENT
LOW.github/workflows/python-release.yml228 # Check if this version exists on PyPICOMMENT
LOW.github/workflows/python-release.yml264 # Check if the tag exists on the remote before attempting to deleteCOMMENT
LOW.github/workflows/ci.yml264 # Check if tests passedCOMMENT
LOW.github/workflows/ci.yml429 # Check if tests passedCOMMENT
Empty Error Handlers12 hits · 60 pts
SeverityFileLineSnippetContext
HIGH…/integration/clients_for_testing/conformance_client.py249except Exception:CODE
HIGH…/integration/clients_for_testing/conformance_client.py265except Exception:CODE
HIGH…/integration/clients_for_testing/conformance_client.py328except Exception:CODE
HIGHlibraries/python/mcp_use/agents/display.py35except json.JSONDecodeError:CODE
HIGHlibraries/python/mcp_use/agents/display.py164except json.JSONDecodeError:CODE
HIGHlibraries/python/mcp_use/agents/display.py172except (TypeError, ValueError):CODE
HIGHlibraries/python/mcp_use/server/server.py431except Exception:CODE
HIGHlibraries/python/mcp_use/server/templates/cli.py206except Exception:CODE
HIGHlibraries/python/mcp_use/client/connectors/http.py241except Exception:CODE
HIGHlibraries/python/mcp_use/client/connectors/http.py250except Exception:CODE
HIGHlibraries/python/mcp_use/client/connectors/http.py263except Exception:CODE
HIGHlibraries/python/mcp_use/client/auth/oauth_callback.py112except asyncio.QueueFull:CODE
Deep Nesting53 hits · 45 pts
SeverityFileLineSnippetContext
LOWlibraries/python/tests/unit/server/test_runner.py48CODE
LOW…/integration/clients_for_testing/conformance_client.py227CODE
LOW…/integration/clients_for_testing/conformance_client.py274CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py180CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py259CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py283CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py573CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py641CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py1072CODE
LOWlibraries/python/mcp_use/agents/remote.py259CODE
LOWlibraries/python/mcp_use/agents/display.py41CODE
LOWlibraries/python/mcp_use/agents/display.py195CODE
LOWlibraries/python/mcp_use/agents/display.py359CODE
LOW…aries/python/mcp_use/agents/managers/server_manager.py44CODE
LOWlibraries/python/mcp_use/agents/adapters/base.py50CODE
LOWlibraries/python/mcp_use/server/auth/middleware.py64CODE
LOWlibraries/python/mcp_use/server/utils/utils.py26CODE
LOWlibraries/python/mcp_use/server/logging/middleware.py100CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py288CODE
LOWlibraries/python/mcp_use/telemetry/utils.py53CODE
LOWlibraries/python/mcp_use/client/code_executor.py129CODE
LOWlibraries/python/mcp_use/client/code_executor.py231CODE
LOWlibraries/python/mcp_use/client/code_executor.py275CODE
LOWlibraries/python/mcp_use/client/code_executor.py243CODE
LOWlibraries/python/mcp_use/client/code_executor.py282CODE
LOWlibraries/python/mcp_use/client/config.py38CODE
LOWlibraries/python/mcp_use/client/client.py518CODE
LOWlibraries/python/mcp_use/client/connectors/sandbox.py158CODE
LOWlibraries/python/mcp_use/client/connectors/http.py88CODE
LOWlibraries/python/mcp_use/client/connectors/base.py167CODE
LOWlibraries/python/mcp_use/client/connectors/base.py366CODE
LOWlibraries/python/mcp_use/client/connectors/websocket.py91CODE
LOWlibraries/python/mcp_use/client/auth/oauth.py276CODE
LOWlibraries/python/mcp_use/client/auth/oauth.py727CODE
LOWlibraries/python/examples/openai_integration_example.py16CODE
LOW…aries/python/examples/anthropic_integration_example.py16CODE
LOWlibraries/python/examples/google_integration_example.py17CODE
LOWdocs/generate_docs.py16CODE
LOWdocs/generate_docs.py62CODE
LOWdocs/generate_docs.py234CODE
LOWdocs/generate_docs.py295CODE
LOWdocs/generate_docs.py384CODE
LOWdocs/generate_docs.py406CODE
LOWdocs/generate_docs.py520CODE
LOWdocs/generate_docs.py573CODE
LOWdocs/generate_docs.py623CODE
LOWdocs/generate_docs.py667CODE
LOWdocs/generate_docs.py748CODE
LOWdocs/generate_docs.py1022CODE
LOWdocs/generate_docs.py1250CODE
LOWdocs/generate_docs.py1368CODE
LOWdocs/generate_docs.py1578CODE
LOWdocs/generate_docs.py1689CODE
Cross-File Repetition8 hits · 40 pts
SeverityFileLineSnippetContext
HIGH…es/python/mcp_use/agents/adapters/langchain_adapter.py0initialize a new adapter. args: disallowed_tools: list of tool names that should not be available.STRING
HIGHlibraries/python/mcp_use/agents/adapters/google.py0initialize a new adapter. args: disallowed_tools: list of tool names that should not be available.STRING
HIGHlibraries/python/mcp_use/agents/adapters/openai.py0initialize a new adapter. args: disallowed_tools: list of tool names that should not be available.STRING
HIGHlibraries/python/mcp_use/agents/adapters/anthropic.py0initialize a new adapter. args: disallowed_tools: list of tool names that should not be available.STRING
HIGHlibraries/python/mcp_use/agents/adapters/base.py0initialize a new adapter. args: disallowed_tools: list of tool names that should not be available.STRING
HIGHlibraries/python/examples/filesystem_use.py0basic usage example for mcp_use. this example demonstrates how to use the mcp_use library with mcpclient to connect any STRING
HIGHlibraries/python/examples/stream_example.py0basic usage example for mcp_use. this example demonstrates how to use the mcp_use library with mcpclient to connect any STRING
HIGHlibraries/python/examples/browser_use.py0basic usage example for mcp_use. this example demonstrates how to use the mcp_use library with mcpclient to connect any STRING
Modern Structural Boilerplate40 hits · 40 pts
SeverityFileLineSnippetContext
LOWlibraries/python/tests/integration/conftest.py8logger = logging.getLogger(__name__)CODE
LOW…thon/tests/integration/client/primitives/test_roots.py15logger = logging.getLogger(__name__)CODE
LOW…n/tests/integration/client/primitives/test_sampling.py10logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/logging.py113 def set_debug(cls, debug_level: int = 2) -> None:CODE
LOWlibraries/python/mcp_use/__init__.py26__all__ = [CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py423 def set_system_message(self, message: str) -> None:CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py436 def set_disallowed_tools(self, disallowed_tools: list[str]) -> None:CODE
LOWlibraries/python/mcp_use/agents/__init__.py11__all__ = [CODE
LOWlibraries/python/mcp_use/agents/display.py13logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/agents/middleware/__init__.py5__all__ = ["tool_error_handler"]CODE
LOWlibraries/python/mcp_use/agents/managers/__init__.py11__all__ = [CODE
LOW…aries/python/mcp_use/agents/managers/tools/__init__.py8__all__ = [CODE
LOW…braries/python/mcp_use/agents/observability/laminar.py10logger = logging.getLogger(__name__)CODE
LOW…raries/python/mcp_use/agents/observability/langfuse.py4logger = logging.getLogger(__name__)CODE
LOW…raries/python/mcp_use/agents/observability/__init__.py9__all__ = ["laminar", "langfuse", "ObservabilityManager", "get_default_manager", "create_manager"]CODE
LOW…thon/mcp_use/agents/observability/callbacks_manager.py10logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/server/runner.py21logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/server/server.py60logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/server/__init__.py9__all__ = [CODE
LOWlibraries/python/mcp_use/server/types.py9__all__ = ["TransportType"]CODE
LOWlibraries/python/mcp_use/server/__fastmcp.py5__all__ = ["FastMCP"]CODE
LOWlibraries/python/mcp_use/server/middleware/__init__.py10__all__ = [CODE
LOWlibraries/python/mcp_use/server/auth/__init__.py33__all__ = [CODE
LOWlibraries/python/mcp_use/server/auth/middleware.py19logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/server/auth/dependencies.py36def set_access_token(token: AccessToken | None) -> None:CODE
LOWlibraries/python/mcp_use/server/utils/inspector.py9logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/server/utils/utils.py6logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/server/logging/__init__.py37__all__ = [CODE
LOWlibraries/python/mcp_use/server/logging/state.py9def set_method_info(info: dict | None) -> None:CODE
LOWlibraries/python/mcp_use/telemetry/events.py270__all__ = [CODE
LOWlibraries/python/mcp_use/telemetry/__init__.py6__all__ = [CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py37logger = logging.getLogger(__name__)CODE
LOWlibraries/python/mcp_use/client/client.py240 def _setup_code_mode_connector(self) -> None:CODE
LOWlibraries/python/mcp_use/client/connectors/__init__.py17__all__ = [CODE
LOWlibraries/python/mcp_use/client/connectors/http.py88 def _set_auth(self, auth: str | dict[str, Any] | httpx.Auth) -> None:CODE
LOWlibraries/python/mcp_use/client/connectors/base.py146 async def set_roots(self, roots: list[Root]) -> None:CODE
LOWlibraries/python/mcp_use/client/middleware/__init__.py34__all__ = [CODE
LOWlibraries/python/mcp_use/client/auth/__init__.py6__all__ = ["BearerAuth", "OAuth"]CODE
LOW…raries/python/mcp_use/client/task_managers/__init__.py14__all__ = [CODE
LOWdocs/generate_docs.py1689def update_docs_json(docs_json_path: str, api_reference_dir: str) -> None:CODE
Over-Commented Block36 hits · 36 pts
SeverityFileLineSnippetContext
LOW…ts/integration/servers_for_testing/primitive_server.py81# """Disable the logging_tool."""COMMENT
LOW…/tests/integration/client/primitives/test_discovery.py1# import asyncioCOMMENT
LOW…/tests/integration/client/primitives/test_discovery.py21# await session.call_tool(name="change_tools", arguments={})COMMENT
LOW…/tests/integration/client/primitives/test_discovery.py41COMMENT
LOW…/tests/integration/client/primitives/test_discovery.py61# prompts = await session.list_prompts()COMMENT
LOWlibraries/python/mcp_use/client/auth/oauth.py521 self._resource_metadata = ProtectedResourceMetadata(**prm)COMMENT
LOW…packages/inspector/src/server/rate-limiter-flexible.ts1// Keep Inspector's published server bundle limited to the in-memory adapter.COMMENT
LOW…cript/packages/inspector/src/server/proxy/mcp-proxy.ts341 } catch (error) {COMMENT
LOW…pector/src/client/components/ui/ask-user-questions.tsx301 // Remeasure on row count change, question change, shape changeCOMMENT
LOW…pector/src/client/components/ui/ask-user-questions.tsx341 setIsOtherMultiline(el.scrollHeight > lineHeight * 1.5);COMMENT
LOW…pector/src/client/components/ui/ask-user-questions.tsx741 const activeRect = activeIndex !== null ? itemRects[activeIndex] : null;COMMENT
LOW…pector/src/client/components/ui/ask-user-questions.tsx841 // (Radio.Group for single-select, Checkbox.Group for multi-select — seeCOMMENT
LOW…pector/src/client/components/ui/ask-user-questions.tsx1301 {isFreeText ? (COMMENT
LOW…ckages/inspector/src/client/components/ui/dropdown.tsx21} from "@/client/components/ui/menu-item";COMMENT
LOW…ckages/inspector/src/client/components/ui/dropdown.tsx41// ---------------------------------------------------------------------------COMMENT
LOW…ckages/inspector/src/client/components/ui/dropdown.tsx321// the `render` prop, so any element can be the trigger:COMMENT
LOW…/inspector/src/client/components/ui/file-thumbnail.tsx41 const isImage = file.type.startsWith("image/");COMMENT
LOW…ckages/server/examples/nextjs-standalone/next-env.d.ts1/// <reference types="next" />COMMENT
LOW…pescript/packages/server/examples/nextjs/next-env.d.ts1/// <reference types="next" />COMMENT
LOWlibraries/typescript/packages/server/src/server.ts401 #httpServer: NodeHttpListener | undefined;COMMENT
LOW…ckages/server/src/react/runtime/model-context-store.ts181 * contains the complete merged snapshot because `ui/update-model-context` hasCOMMENT
LOW…ckages/server/src/react/runtime/model-context-store.ts201 this.#cancelInitialization = reject;COMMENT
LOW…ckages/server/src/react/runtime/model-context-store.ts221 #flushScheduled = false;COMMENT
LOWlibraries/typescript/packages/cli/src/cli/dev.ts361COMMENT
LOWlibraries/typescript/packages/cli/src/cli/dev.ts481 ...(!localhostBind && { allowedHosts: true }),COMMENT
LOWlibraries/typescript/packages/cli/src/cli/dev.ts841 const tunnelUrl = tunnelManager.status().url;COMMENT
LOWlibraries/typescript/packages/cli/src/cli/dev.ts861 // attacker's page same-origin with this server, and the Host header isCOMMENT
LOWlibraries/typescript/packages/client/src/auth/popup.ts1// popup-runner.tsCOMMENT
LOW…script/packages/client/src/react/McpClientProvider.tsx661 // (specifically `removeServer` / `updateServer`). Reading the latestCOMMENT
LOW…braries/typescript/packages/client/src/react/useMcp.ts2241 isMountedRef.current = false;COMMENT
LOW.github/workflows/inspector-e2e.yml1name: Inspector E2E TestsCOMMENT
LOW.github/workflows/inspector-e2e-sequential.yml1name: Inspector E2E Tests (Sequential)COMMENT
LOW.github/workflows/claude.yml41 # This is an optional setting that allows Claude to read CI results on PRsCOMMENT
LOW.github/workflows/ci.yml1name: CICOMMENT
LOW.github/workflows/ci.yml21# ├─ python-unit-tests: Matrix [Python 3.11, 3.12]COMMENT
LOW.github/workflows/ci.yml181 # defaults:COMMENT
Docstring Block Structure7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHCONTRIBUTING.md163Short description of what the function does. Args: param1: Description of param1 param2: DescriptioSTRING
HIGH…es/python/mcp_use/agents/adapters/langchain_adapter.py168Asynchronously execute the tool with given arguments. Args: kwargs: The arguments tSTRING
HIGHlibraries/python/mcp_use/client/client.py282Create a session for the specified server. Args: server_name: The name of the server to create a seSTRING
HIGHlibraries/python/mcp_use/client/client.py373Get an existing session. Args: server_name: The name of the server to get the session for. STRING
HIGHlibraries/python/mcp_use/client/client.py464Execute Python code with access to MCP tools (code mode). This method allows agents to interact with MCP tools STRING
HIGHlibraries/python/mcp_use/client/session.py99Call an MCP tool. Args: name: The name of the tool to call. arguments: The arguments toSTRING
HIGHlibraries/python/mcp_use/client/connectors/base.py450Call an MCP tool with automatic reconnection handling. Args: name: The name of the tool to call. STRING
Magic Placeholder Names5 hits · 28 pts
SeverityFileLineSnippetContext
HIGH…cript/packages/agent/tests/integration/agent/README.md108export OPENAI_API_KEY="your-api-key"CODE
HIGH…braries/typescript/packages/client/src/react/useMcp.ts116 * headers: { Authorization: 'Bearer YOUR_API_KEY' }COMMENT
HIGH…braries/typescript/packages/client/src/react/useMcp.ts1397 "(e.g., Authorization: Bearer YOUR_API_KEY)."CODE
HIGH…braries/typescript/packages/client/src/react/useMcp.ts1411 "(e.g., Authorization: Bearer YOUR_API_KEY)."CODE
HIGH…braries/typescript/packages/client/src/react/useMcp.ts1523 "(e.g., Authorization: Bearer YOUR_API_KEY)."CODE
Cross-Language Confusion4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHlibraries/python/mcp_use/server/utils/json_schema.py26 """Return the non-null branch if *any_of* is exactly ``[<type>, null]``.STRING
HIGHlibraries/python/mcp_use/server/utils/json_schema.py53 If *prop* contains a nullable ``anyOf`` of the form ``[<type>, null]``,STRING
HIGHlibraries/python/examples/server/server_example.py69 # mcp-use simplifies these to {"type": "string", "default": null} instead ofCOMMENT
HIGHlibraries/python/examples/server/server_example.py70 # Pydantic's {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null}COMMENT
Modern AI Meta-Vocabulary7 hits · 19 pts
SeverityFileLineSnippetContext
MEDIUMCONTRIBUTING.md200│ └── create-mcp-use-app/ # Project scaffolding CLICODE
MEDIUMlibraries/typescript/README.md58| **[create-mcp-use-app](#create-mcp-use-app)** | Project scaffolding tool | [![npm](https://img.shielCODE
MEDIUM…es/typescript/packages/create-mcp-use-app/src/utils.ts43// An empty result means it's safe to scaffold into `dir`.COMMENT
MEDIUM…es/typescript/packages/create-mcp-use-app/src/utils.ts64// Resolves what to scaffold given a raw user-supplied name.COMMENT
MEDIUM…eate-mcp-use-app/src/__tests__/failed-scaffold.test.ts8// Runs the built CLI (`pnpm build` first), like the scaffold e2e check.COMMENT
MEDIUMskills/openapi-to-mcp/references/code-templates.md30 // mcp-use and zod are already in the scaffoldCOMMENT
MEDIUMskills/openapi-to-mcp/references/code-templates.md33 // keep dev, build, start, deploy from the scaffold; just add this one:COMMENT
Verbosity Indicators9 hits · 18 pts
SeverityFileLineSnippetContext
LOW⚡…ector/src/client/components/shared/SchemaFormField.tsx84 // Step 1: Normalize anyOf unions (handles FastMCP optional fields with $ref)COMMENT
LOW⚡…ector/src/client/components/shared/SchemaFormField.tsx87 // Step 2: Resolve any remaining $refs at top levelCOMMENT
LOW⚡…ector/src/client/components/shared/SchemaFormField.tsx90 // Step 3: Extract enum valuesCOMMENT
LOW⚡…braries/typescript/packages/agent/src/agents/remote.ts262 // Step 1: Create a chat session for this agent (only if we don't have one)COMMENT
LOW⚡…braries/typescript/packages/agent/src/agents/remote.ts269 // Step 2: Execute the agent within the chat contextCOMMENT
LOW…braries/typescript/packages/client/src/react/useMcp.ts1465 // Step 2: Get the authorization response captured duringCOMMENT
LOW…braries/typescript/packages/client/src/react/useMcp.ts1480 // Step 3: Complete the OAuth flow by exchanging code for tokensCOMMENT
LOW⚡docs/generate_docs.py1828 # Step 2: Update docs.jsonCOMMENT
LOWdocs/generate_docs.py1780 # Step 1: Generate all API docsCOMMENT
Structural Annotation Overuse9 hits · 18 pts
SeverityFileLineSnippetContext
LOW⚡…ector/src/client/components/shared/SchemaFormField.tsx84 // Step 1: Normalize anyOf unions (handles FastMCP optional fields with $ref)COMMENT
LOW⚡…ector/src/client/components/shared/SchemaFormField.tsx87 // Step 2: Resolve any remaining $refs at top levelCOMMENT
LOW⚡…ector/src/client/components/shared/SchemaFormField.tsx90 // Step 3: Extract enum valuesCOMMENT
LOW⚡…braries/typescript/packages/agent/src/agents/remote.ts262 // Step 1: Create a chat session for this agent (only if we don't have one)COMMENT
LOW⚡…braries/typescript/packages/agent/src/agents/remote.ts269 // Step 2: Execute the agent within the chat contextCOMMENT
LOW…braries/typescript/packages/client/src/react/useMcp.ts1465 // Step 2: Get the authorization response captured duringCOMMENT
LOW…braries/typescript/packages/client/src/react/useMcp.ts1480 // Step 3: Complete the OAuth flow by exchanging code for tokensCOMMENT
LOW⚡docs/generate_docs.py1828 # Step 2: Update docs.jsonCOMMENT
LOWdocs/generate_docs.py1780 # Step 1: Generate all API docsCOMMENT
AI Structural Patterns18 hits · 16 pts
SeverityFileLineSnippetContext
LOW…ries/python/tests/unit/server/test_list_tool_format.py30CODE
LOWlibraries/python/mcp_use/agents/mcpagent.py69CODE
LOWlibraries/python/mcp_use/server/server.py78CODE
LOWlibraries/python/mcp_use/server/context.py113CODE
LOWlibraries/python/mcp_use/server/context.py71CODE
LOWlibraries/python/mcp_use/server/auth/middleware.py137CODE
LOWlibraries/python/mcp_use/telemetry/telemetry.py390CODE
LOWlibraries/python/mcp_use/client/config.py38CODE
LOWlibraries/python/mcp_use/client/client.py35CODE
LOWlibraries/python/mcp_use/client/client.py113CODE
LOWlibraries/python/mcp_use/client/client.py154CODE
LOWlibraries/python/mcp_use/client/connectors/sandbox.py66CODE
LOWlibraries/python/mcp_use/client/connectors/http.py31CODE
LOWlibraries/python/mcp_use/client/connectors/stdio.py29CODE
LOWlibraries/python/mcp_use/client/connectors/base.py527CODE
LOWlibraries/python/mcp_use/client/connectors/base.py555CODE
LOWlibraries/python/mcp_use/client/connectors/websocket.py241CODE
LOWlibraries/python/examples/server/server_example.py50CODE
AI Slop Vocabulary6 hits · 14 pts
SeverityFileLineSnippetContext
LOW…python/mcp_use/agents/managers/tools/connect_server.py34 # If we're already connected to this server, just returnCOMMENT
MEDIUMlibraries/python/mcp_use/telemetry/telemetry.py360 """Track comprehensive agent execution"""STRING
MEDIUMlibraries/python/mcp_use/client/middleware/metrics.py308 """Get all analytics data in one comprehensive report."""STRING
MEDIUMlibraries/typescript/packages/client/src/auth/popup.ts17// 3. A `storage` event for this flow's tokens key. This is the most robustCOMMENT
MEDIUM.github/workflows/inspector-e2e.yml48 # Run all modes for comprehensive testing (or single mode for manual dispatch)COMMENT
MEDIUM⚡.github/workflows/ci.yml9# This workflow provides comprehensive testing for both Python and TypeScriptCOMMENT
Fake / Example Data12 hits · 14 pts
SeverityFileLineSnippetContext
LOW⚡…/python/tests/unit/server/auth/test_auth_middleware.py166 tokens = {"user-token": {"email": "user@example.com", "name": "Test User"}}CODE
LOW⚡…/python/tests/unit/server/auth/test_auth_middleware.py175 assert data["claims"]["email"] == "user@example.com"CODE
LOW…/integration/servers_for_testing/conformance_server.py262 "name": {"type": "string", "default": "John Doe"},CODE
LOW…/integration/servers_for_testing/bearer_auth_server.py20 "email": "admin@example.com",CODE
LOW…pt/packages/inspector/tests/unit/manufact-auth.test.ts119 email: "user@example.com",CODE
LOW…pt/packages/inspector/tests/unit/manufact-auth.test.ts424 user: { id: "still-there", email: "user@example.com" },CODE
LOW…script/packages/inspector/tests/e2e/connection.test.ts926 await expect(nameField).toHaveValue("John Doe");CODE
LOW…script/packages/inspector/tests/e2e/connection.test.ts953 await expect(textContent).toContainText("John Doe");CODE
LOW…create-mcp-use-app/src/__tests__/dot-directory.test.ts182 JSON.stringify({ name: "placeholder", description: "" }, null, 2)CODE
LOW…create-mcp-use-app/src/__tests__/dot-directory.test.ts221 name: "placeholder",CODE
LOW…ript/packages/server/examples/conformance/src/index.ts357 name: z.string().default("John Doe"),CODE
LOW…braries/typescript/packages/client/src/react/useMcp.ts127 * const result = await mcp.callTool('send-email', { to: 'user@example.com' })COMMENT
Cross-Language Confusion (JS/TS)2 hits · 10 pts
SeverityFileLineSnippetContext
HIGH…/packages/inspector/src/client/utils/mcpClientUtils.ts423print(f"Available tools: {[tool.name for tool in tools]}")CODE
HIGH…/packages/inspector/src/client/utils/mcpClientUtils.ts427print(f"Available resources: {[resource.name for resource in resources]}")CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMlibraries/python/examples/simple_oauth_example.py21 # Option 2: If you already have a registered client_id, you can use it:COMMENT