- Home
- MCP servers
- Complexipy
Complexipy
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"onenightcarnival-complexipy-mcp": {
"command": "uvx",
"args": [
"complexipy-mcp"
]
}
}
}You run a dedicated MCP server that leverages the complexipy library to analyze cognitive complexity in Python codebases. It can scan entire directories or individual files, returning clean JSON data that you can feed into other tools or dashboards for quick insights and quality gating.
How to use
Start the MCP server and connect an MCP client to obtain JSON results that describe cognitive complexity at the file and function level. You can scan entire codebases or single files, and you’ll get a machine-friendly list of files that exceed your chosen complexity threshold, including per-function details and line ranges.
Typical usage patterns include: scanning a whole Python project to identify hotspots, inspecting a single file to understand the most complex functions, and sorting or filtering results to focus remediation efforts. The output is pure data, designed for automation and integration with your existing quality pipelines.
How to install
Prerequisites you need to have before starting:
- A runtime tool for MCP servers, such as uvx or uv, installed on your system.
Step-by-step setup:
# Quick start: run the server directly with uvx
uvx complexipy-mcp
# Local development: run the server via the MCP runtime
uv run complexipy-mcp
# Claude Desktop (remote configuration example)
uvx complexipy-mcp
Additional notes
If you are configuring multiple run modes, you can use the following two stdio configurations to cover both quick-start and local development approaches. Each configuration runs the same MCP server but via different runtimes.
{
"type": "stdio",
"name": "complexipy",
"command": "uvx",
"args": ["complexipy-mcp"]
}
{
"type": "stdio",
"name": "complexipy",
"command": "uv",
"args": ["--directory", "/ABSOLUTE/PATH/TO/complexipy-mcp", "run", "complexipy-mcp"]
}
Available tools
scan_directory
Recursively scans a directory for Python files whose cognitive complexity exceeds a configurable threshold and returns a JSON list of files with their complexity data and per-function breakdown.
scan_file
Analyzes a single Python file to determine cognitive complexity and returns a JSON object describing the file's overall complexity and function-level details.