Generated: 2026-07-04 02:26:26
| Function | File | Complexity | Nesting Depth | Risk |
|---|---|---|---|---|
| verify_token | mcp_common/auth/core.py | 14 | 2 | medium |
| FallbackChain.execute | mcp_common/llm/fallback.py | 14 | 5 | medium |
| create_ssl_context | mcp_common/websocket/tls.py | 12 | 3 | medium |
| ensure_dual_use | mcp_common/interfaces/__init__.py | 12 | 2 | medium |
| run | mcp_common/apple_script/bridge.py | 12 | 2 | medium |
| PromptToolkitBackend.prompt_choice | mcp_common/backends/toolkit.py | 11 | 5 | medium |
| sanitize_path | mcp_common/security/sanitization.py | 11 | 3 | medium |
| trim_description | mcp_common/tools/descriptions.py | 10 | 3 | medium |
| PromptToolkitBackend.select_file | mcp_common/backends/toolkit.py | 10 | 3 | medium |
| PythonHandler._extract_function | mcp_common/parsing/tree_sitter/handlers/python.py | 10 | 5 | medium |
Showing top 10 of 88 functions
✓ No dead code detected
Code fragments grouped by similarity
| File | Lines | Size |
|---|---|---|
| mcp_common/apple_script/bridge.py | 42-76 | 35 lines |
| mcp_common/auth/audit.py | 19-44 | 26 lines |
| mcp_common/auth/audit.py | 47-60 | 14 lines |
| mcp_common/auth/config.py | 26-72 | 47 lines |
| mcp_common/auth/config.py | 32-55 | 24 lines |
| mcp_common/auth/core.py | 26-34 | 9 lines |
| mcp_common/auth/core.py | 37-55 | 19 lines |
| mcp_common/auth/core.py | 58-95 | 38 lines |
| mcp_common/auth/decorator.py | 32-131 | 100 lines |
| mcp_common/auth/decorator.py | 39-129 | 91 lines |
| ... and 288 more clones | ||
Coupling Between Objects (CBO) metrics
| Class | File | CBO | Risk Level | Dependent Classes |
|---|---|---|---|---|
| ParseResult | mcp_common/parsing/tree_sitter/models.py | 6 | medium | BaseModel, SupportedLanguage, SymbolInfo, SymbolRelationship, ImportInfo, ComplexityMetrics |
| CodeGraphAnalyzer | mcp_common/code_graph/analyzer.py | 6 | medium | CodeNode, FileNode, Any, ImportNode, ClassNode, FunctionNode |
| PythonHandler | mcp_common/parsing/tree_sitter/handlers/python.py | 4 | low | SymbolInfo, SymbolRelationship, ImportInfo, ComplexityMetrics |
| LLMSettings | mcp_common/llm/config.py | 3 | low | ProviderConfig, BaseModel, Any |
| ContentHashLRUCache | mcp_common/parsing/tree_sitter/cache.py | 3 | low | T, CacheStats, CacheEntry |
| WebSocketMessage | mcp_common/websocket/protocol.py | 3 | low | BaseModel, MessageType, Any |
| TokenPayload | mcp_common/auth/core.py | 3 | low | Permission, datetime, Any |
| RuntimeComponents | mcp_common/server/runtime.py | 3 | low | RuntimeSnapshotManager, RuntimeCacheManager, HealthMonitor |
| DependencyWaiter | mcp_common/health.py | 3 | low | HealthCheckResult, HealthChecker, WaitResult |
| SymbolInfo | mcp_common/parsing/tree_sitter/models.py | 3 | low | BaseModel, SymbolKind, SupportedLanguage |
Showing top 10 of 100 classes
Project-wide module dependency graph metrics
| Severity | Size | Dependency Paths |
|---|---|---|
| LOW | 2 |
mcp_common.parsing.tree_sitter.core → mcp_common.parsing.tree_sitter.grammars
mcp_common.parsing.tree_sitter.grammars → mcp_common.parsing.tree_sitter.core
|
| # | Depth | Path |
|---|---|---|
| 1 | 5 | mcp_common.prompting.adapter → mcp_common.prompting.factory → mcp_common.backends.pyobjc → mcp_common.prompting.base → mcp_common.prompting.models |
| 2 | 4 | mcp_common.auth.decorator → mcp_common.auth.core → mcp_common.auth.identity → mcp_common.auth.exceptions |
| 3 | 4 | mcp_common.contracts → mcp_common.auth.core → mcp_common.auth.identity → mcp_common.auth.exceptions |
| 4 | 4 | mcp_common.parsing.tree_sitter.core → mcp_common.parsing.tree_sitter.grammars → mcp_common.parsing.tree_sitter.handlers.python → mcp_common.parsing.tree_sitter.models |
| 5 | 4 | mcp_common.parsing.tree_sitter.grammars → mcp_common.parsing.tree_sitter.core → mcp_common.parsing.tree_sitter.cache → mcp_common.parsing.tree_sitter.models |
| 6 | 4 | mcp_common.prompting.adapter → mcp_common.prompting.factory → mcp_common.prompting.base → mcp_common.prompting.models |
| 7 | 4 | mcp_common.prompting.adapter → mcp_common.prompting.factory → mcp_common.prompting.exceptions → mcp_common.prompting.models |
| 8 | 4 | mcp_common.prompting.adapter → mcp_common.prompting.factory → mcp_common.backends.pyobjc → mcp_common.prompting.base |
| 9 | 4 | mcp_common.prompting.adapter → mcp_common.prompting.factory → mcp_common.backends.pyobjc → mcp_common.prompting.exceptions |
| 10 | 4 | mcp_common.prompting.factory → mcp_common.backends.pyobjc → mcp_common.prompting.exceptions → mcp_common.prompting.models |
✓ No architecture violations