PlugWiki
pyscn logo

pyscn MCP Server: Setup for Claude Code, Cursor and Other Apps

OfficialLocal

Lets Claude, Cursor and other assistants analyze your Python code for complexity, dead code, duplicates and coupling.

pyscn MCP gives your assistant eight checks that run on Python files in a folder you point it at: complexity, dead code, duplicated code, class coupling and cohesion, and an overall 0 to 100 health score. It is the server bundled with the pyscn analyzer, runs on your computer, and needs no account or API key. Ask the assistant for a summary first, then drill into one check, since the full reports are long.

Good for

  • Python developers who want an assistant to find the worst parts of a codebase
  • Reviewers checking a pull request or an AI-written change for quality
  • Teams planning a refactor who need a health score to start from

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install pyscn MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the pyscn MCP server to Claude Code. Run this command:
    
    claude mcp add pyscn-mcp uvx -- pyscn-mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv.

Not available on Intel Macs through uvx: the project says PyPI wheels are Apple Silicon only. Use Homebrew or go install there.

From the project README. Source.

Tools

  • Runs every code-quality check on a Python file or folder

    Runs several analyses in one pass: complexity, dead code, duplicate code, class coupling and cohesion, import dependencies and code communities. You pick which ones and whether you want a short summary or the full report.

    Try: “Run a full pyscn analysis on ./src and summarize the worst problems.”

    Files · analyze_code

  • Finds Python functions that are too complex to maintain

    Measures cyclomatic complexity for each function and class scope and lists the ones above a limit you set (default 10).

    Try: “Which functions in ./app have a complexity above 15?”

    Files · check_complexity

  • Finds copy-pasted or near-identical Python code

    Compares code structure to spot duplicated blocks, even when names differ. You set the similarity cutoff (default 0.8) and the smallest block size to report.

    Try: “Find duplicated code in ./src that is at least 10 lines long.”

    Files · detect_clones

  • Shows classes that depend on too many other classes

    Counts how many other classes each class depends on (CBO) and reports the ones over your threshold (default 10).

    Try: “Which classes in ./src are too tightly coupled to others?”

    Files · check_coupling

  • Shows classes that do too many unrelated things

    Scores how well each class's methods share state (LCOM4). A high score suggests the class should be split.

    Try: “List classes in ./src with poor cohesion.”

    Files · check_cohesion

  • Finds code that can never run

    Builds a control-flow graph for each function and reports unreachable statements, filtered by a minimum severity (default warning).

    Try: “Find unreachable code in ./src.”

    Files · find_dead_code

  • Gives a 0 to 100 health score with a grade

    Returns one overall score and a grade, plus separate scores for complexity, dead code, duplication, coupling, cohesion, dependencies and architecture.

    Try: “What is the health score of this repo?”

    Files · get_health_score

  • Spots dependency-injection mistakes in Python classes

    Looks for constructors that take too many parameters (default limit 5), hidden dependencies, concrete dependencies and service-locator use.

    Try: “Check ./src for dependency injection anti-patterns.”

    Files · detect_di_antipatterns

Read from the source code

Permissions

low risk · 2 things to watch

Low risk

All eight tools only analyze Python files at the path you give and report back, and none of them are documented as changing code. They run on your machine and need no sign-in.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Reads every Python file under the path you give

    Each tool takes a file or folder path and analyzes the code in it. Point it at the project, not at your home folder. github.com

  • Source code goes to your AI app as results

    Findings include file paths and code locations, which your assistant then sees. Treat them like any code you paste into the chat. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Sign-in and keysNo account or API key. An optional PYSCN_CONFIG variable points to a .pyscn.toml settings file.

Questions

Is the pyscn MCP server official?

Yes. It ships from the pyscn project itself (ludo-technologies/pyscn) as the pyscn-mcp package, so it comes from the maker of the analyzer it exposes.

Does pyscn MCP need an API key?

No. It runs locally and has no sign-in. You can set PYSCN_CONFIG to a .pyscn.toml file to change thresholds; without it the server looks for .pyscn.toml, then pyproject.toml.

Does it work on an Intel Mac?

Not through uvx or pip. The project says PyPI wheels are built for Apple Silicon only, and Intel Mac users should install pyscn with Homebrew or go install instead.

Can it change my code?

No tool is documented as editing files. The eight tools only analyze and report, so the assistant has to make any fix itself.

Is there a Claude Code plugin?

Yes. The README offers a plugin that sets up the MCP server together with pyscn skills, as well as a one-line manual setup. Both are in the project README.

Is pyscn MCP free?

Yes. It is open source under the MIT license and runs on your machine.

Information

updated Nov 2, 2026

Publisher
Official
Package
pyscn-mcp
Registry
PyPI
Transport
stdio
Auth
None
Version
1.33.1
License
MIT
Last commit
Oct 29, 2026
Open issues
8
Listed in
Official MCP registry

WebsiteGitHubPyPIOfficial MCP RegistryChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 4
  1. github.com · github.com
  2. pypi.org · pypi.org
  3. github.com · github.com
  4. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.