Suitable Loop
Analyzes git repositories, scoring commits by risk (complexity delta × blast radius × churn × size) and identifying hotspots, providing tools for commit analysis and blast radius assessment.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Suitable Loop index my codebase and give a summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Suitable Loop
Local production engineering platform — semantic code analysis, git risk scoring, and log correlation via MCP.
What it does
Suitable Loop indexes your Python codebase and exposes deep analysis through MCP tools that AI assistants can call:
Code Analysis — AST-based parsing, function/class extraction, call graph construction, cyclomatic complexity
Git Risk Scoring — Weighted risk scores per commit (complexity delta × blast radius × churn × size)
Log Correlation — Parse logs, group errors by signature, map stack frames to indexed code
Dependency Graph — NetworkX-powered call graphs, import trees, blast radius analysis
Related MCP server: agentmako
Quick Start
1. Add MCP server to your project
Create .mcp.json in your project root:
{
"mcpServers": {
"suitable-loop": {
"command": "uvx",
"args": ["suitable-loop"]
}
}
}That's it. uvx fetches the package from PyPI automatically — no manual install needed.
Local development? Point to a local checkout instead:
"args": ["--from", "/path/to/suitable-loop", "suitable-loop"]
2. Install slash commands (optional)
Clone the repo and copy the commands into your project:
git clone https://github.com/suitable-adventures/suitable-loop.git /tmp/suitable-loop
mkdir -p .claude/commands
cp /tmp/suitable-loop/.claude/commands/* .claude/commands/3. Restart Claude Code and start using it
/onboard # Get a full codebase orientation
/risk-report # Analyze recent commits by risk
/impact-check models.py # Check blast radius before changing a file
/debug-error "ConnectionResetError in db/pool.py"
/health-check # Full codebase health assessment
/trace-function my_function # Map a function's callers and calleesSlash Commands
Command | What it does |
| Index the codebase and produce a full orientation: structure, hotspots, complexity, blast radius |
| Score recent commits by risk, find hotspots, recommend where to focus review |
| Before changing a file: blast radius, who calls what, what could break |
| Correlate an error/traceback to source code paths |
| Full assessment: complexity, coupling, churn trends, actionable recommendations |
| Map a function's callers, callees, complexity, and role in the system |
| Bump version, tag, and publish a new release to PyPI |
MCP Tools
Code Analysis
Tool | Description |
| Index a Python project — parse AST, extract entities, build call graph |
| Look up a function/class/file by name with all relationships |
| Find all functions that call a given function |
| Find all functions called by a given function |
| Get import dependency tree for a file |
| Full-text search across indexed functions and classes |
| Top N most complex functions |
| High-level stats and most-connected modules |
Git Analysis
Tool | Description |
| Score recent commits by risk |
| Deep-dive a single commit |
| Files with high churn × high dependency count |
| Transitive impact of changing a file |
Log Analysis
Tool | Description |
| Parse log files, extract errors, group by signature |
| List distinct error groups by frequency |
| Full detail on an error group with code links |
| Map raw error text to code paths |
| Error frequency over time |
Utility
Tool | Description |
| Server status and entity counts |
| Incremental re-index (only changed files) |
Architecture
suitable_loop/
├── __init__.py # Package root
├── __main__.py # Entry point (python -m suitable_loop)
├── server.py # MCP server setup (FastMCP) + main() entry point
├── config.py # Configuration dataclasses
├── models.py # Data models (entities, edges)
├── db.py # SQLite database layer
├── analyzers/
│ ├── code_analyzer.py # AST parsing, call resolution
│ ├── git_analyzer.py # Commit analysis, risk scoring
│ └── log_analyzer.py # Log parsing, error grouping
├── graph/
│ └── engine.py # NetworkX graph engine
└── tools/
├── code_tools.py # MCP code analysis tools
├── git_tools.py # MCP git analysis tools
├── log_tools.py # MCP log analysis tools
└── util_tools.py # MCP utility toolsConfiguration
Environment variables:
Variable | Default | Description |
|
| SQLite database path |
|
| Logging level |
Default exclude patterns (files skipped during indexing):
.venv/,venv/,node_modules/,__pycache__/,migrations/,.git/
Development
For working on Suitable Loop itself:
cd suitable-loop
uv venv && uv pip install -e ".[dev]"
uv run pytestAvailable Tools
8 toolsdependency_treeC
Get the import dependency tree for a file, up to N levels deep.
Inputs: file_path (required), depth.
error_detailA
Get full detail on an error group: traceback, affected functions, sample log entries, and timeline.
Inputs: error_group_id (required).
find_callersC
Find all functions that call the given function.
Inputs: function_name (required).
get_error_groupsB
List all distinct error groups sorted by frequency. Each group includes exception type, occurrence count, and links to affected code.
Inputs: limit.
hotspot_reportB
Find code hotspots — files that change frequently AND are highly depended upon. These are the highest-risk areas of the codebase.
Inputs: repo_path (required), n_commits.
index_codebaseA
Index a Python codebase. Parses all .py files, extracts functions, classes, imports, and call relationships. Builds a semantic graph for querying. Use force=True to re-index even unchanged files.
Inputs: path (required), force.
ingest_logsA
Parse and store a log file or directory of log files. Auto-detects format (Python stdlib logging or JSON-per-line). Extracts errors, groups them by signature, and maps stack frames to indexed code.
Inputs: path (required).
search_codeB
Full-text search across indexed functions and classes.
Inputs: query (required), max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: indexing, searching, querying callers/dependencies, hotspot analysis, log ingestion, and error grouping. No two tools overlap in functionality.
Most tools follow a verb_noun pattern (e.g., index_codebase, find_callers, ingest_logs), but a few are noun_noun (error_detail, dependency_tree, hotspot_report), creating minor inconsistency. Overall pattern is still readable and intuitive.
With 8 tools, the set is well-scoped for a code analysis and debugging server. It covers indexing, searching, dependency analysis, and log-related error tracking without being bloated or insufficient.
The tool set covers core workflows: indexing, searching, dependency analysis, hotspot detection, log ingestion, and error inspection. A minor gap is the lack of a tool to list all indexed functions/classes, but search_code and dependency_tree can compensate.
Maintenance
Related MCP Connectors
Shared context for your codebase: a hosted code knowledge graph over MCP. Free plan, OAuth sign-up.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseAqualityAmaintenanceA local-first codebase intelligence tool that enables AI assistants to research codebases using semantic search, multi-hop relationship discovery, and structural parsing. It allows users to extract architectural patterns and institutional knowledge across 30+ programming languages through an MCP-compatible interface.22,267 PyPI1,464MIT
- AlicenseCqualityCmaintenanceLocal-first codebase intelligence engine providing AI coding agents with a typed MCP toolset for understanding and navigating code repositories.10054Apache 2.0
- AlicenseBqualityDmaintenanceLocal-first codebase context engine that parses code into a ranked dependency graph and serves it to AI tools via MCP for deep structural understanding.518 npm2MIT

Vibgrate AI Contextofficial
AlicenseNot gradedqualityBmaintenanceLocal-first MCP server that gives AI assistants codebase intelligence—code graph, drift analysis, vulnerability attribution, and version-correct library docs—all from the user's machine.775 npm6Apache 2.0