Skip to main content
Glama

Complexipy MCP Server

A Model Context Protocol (MCP) server that wraps complexipy to provide cognitive complexity analysis for Python codebases. This server uses the complexipy Python API for accurate and robust analysis.

Features

  • Directory Scanning: Recursively analyze all .py files in a directory and filter by complexity threshold.

  • File Scanning: Analyze a single Python file.

  • Data Processing: Uses pandas for efficient data filtering and sorting.

  • Clean Output: Returns JSON formatted results (list of objects).

  • No Emojis: Pure data output suitable for machine consumption.

  • Stdio Transport: Uses standard input/output for communication, making it compatible with most MCP clients.

Related MCP server: codescan-mcp

Installation & Usage

Quick Start

You can run the server directly using uvx (no installation required):

uvx complexipy-mcp

Configuration for Claude Desktop

Add the following configuration to your MCP client settings (e.g., claude_desktop_config.json):

{
  "mcpServers": {
    "complexipy": {
      "command": "uvx",
      "args": [
        "complexipy-mcp"
      ]
    }
  }
}

Local Development

  1. Clone the repository.

  2. Install dependencies:

    uv sync
  3. Run the server locally:

    uv run complexipy-mcp

Local Configuration for Claude Desktop

If you are developing locally, point the configuration to your local setup:

{
  "mcpServers": {
    "complexipy": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/complexipy-mcp",
        "run",
        "complexipy-mcp"
      ]
    }
  }
}

Tools

scan_directory

Scans a directory for files exceeding a cognitive complexity threshold.

  • Arguments:

    • directory_path (string): Absolute path to the directory to scan.

    • threshold (integer): Complexity limit (default: 15).

  • Returns: JSON string containing a list of files that exceed the threshold.

    [
      {
        "file_path": "/abs/path/to/file.py",
        "complexity": 25,
        "functions": [
          {
            "name": "function_name",
            "complexity": 10,
            "line_start": 5,
            "line_end": 15
          }
        ],
        "status": "exceeds_threshold"
      }
    ]

scan_file

Scans a single file for cognitive complexity.

  • Arguments:

    • file_path (string): Absolute path to the file.

    • threshold (integer): Complexity limit (default: 15).

  • Returns: JSON string containing the result if it exceeds the threshold.

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    C
    maintenance
    Enables comprehensive security vulnerability scanning and code quality analysis for Python applications. Provides detailed reports with scoring, actionable suggestions, and comparison tracking specifically designed for backend developers working with frameworks like Django, Flask, and FastAPI.
    5
    1
  • A
    license
    -
    quality
    D
    maintenance
    Scans codebases for TODOs, FIXMEs, code complexity, file stats, and dependencies, generating a health report with a letter grade. Zero configuration required.
    10
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Provides comprehensive code quality analysis with quantitative metrics, historical trends, and refactoring risk prediction for C#, Python, and TypeScript codebases.
    7
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Exposes boyter/scc code counting and complexity analysis to LLM agents via read-only tools like counting lines, finding top files, and cost estimation.
    7
    BSD 3-Clause

View all related MCP servers

Related MCP Connectors

  • Scan code for quantum-vulnerable cryptography and get NIST post-quantum migration guidance.

  • Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.

  • Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Onenightcarnival/complexipy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server