# pyscn

[BASE product page](<https://base.akulich.dev/en/library/avc-87-pyscn/>) · [Resource](<https://github.com/ludo-technologies/pyscn>)

ID: avc\-87\-pyscn · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

A Python static analyzer that detects duplicates, complex functions, unreachable code, and architectural issues\. Creates HTML/JSON reports and provides agent skills and an optional MCP server\.

## Type

Tool

## Entry type

tool

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-access>)

The local CLI, skills, and pyscn\-mcp are free under MIT and require no LLM/API for analysis itself\.

## [Paid features and costs](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-access>)

Polyscan GitHub App is a separate service: the README lists free weekly audit reports for public repositories\. Check other workflows' terms separately\. Commercial support, integrations, and consulting are available by contacting the developers; the README does not state their costs\. An external AI agent may have its own costs\.

## [Access and limitations](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-access>)

The local CLI, skills, and pyscn\-mcp are free under MIT and require no LLM/API for analysis itself\. Polyscan GitHub App is a separate service: the README lists free weekly audit reports for public repositories\. Check other workflows' terms separately\. Commercial support, integrations, and consulting are available by contacting the developers; the README does not state their costs\. An external AI agent may have its own costs\.

## [Use cases](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-tasks>)

- Check Python code after AI generation
- Find refactoring candidates and circular imports

## Tech stack

- Python

## Category IDs

- quality
- skills
- integrations

## Subcategory IDs

- quality\.review
- quality\.performance
- skills\.development
- integrations\.code

## Tags

- Python
- Static analysis
- MCP

## [Selection purpose](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-selection>)

Check Python code after AI generation

## [Choose this when](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-selection>)

- Check Python code after AI generation
- Find refactoring candidates and circular imports

## [Requirements](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-selection>)

- Access to Python source files\. Installation is documented through uv/pipx or a ready\-made Go binary; the Intel Mac PyPI wheel was removed in v1\.5\.1, and the README suggests Homebrew or go install\. MCP requires a compatible client and a path to pyscn\-mcp/uvx\.

## [Limitations](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-selection>)

- Costs and limits of free use: Polyscan GitHub App is a separate service: the README lists free weekly audit reports for public repositories\. Check other workflows' terms separately\. Commercial support, integrations, and consulting are available by contacting the developers; the README does not state their costs\. An external AI agent may have its own costs\.
- Terms of use: MIT for pyscn code: use, modification, and distribution are permitted with copyright and permission notices retained\. Code is provided without warranties; the hosted App and commercial support have separate terms\.

## [Questions before use](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-faq>)

### What can you use for free in pyscn?

The local CLI, skills, and pyscn\-mcp are free under MIT and require no LLM/API for analysis itself\.

### What additional costs might arise with pyscn?

Polyscan GitHub App is a separate service: the README lists free weekly audit reports for public repositories\. Check other workflows' terms separately\. Commercial support, integrations, and consulting are available by contacting the developers; the README does not state their costs\. An external AI agent may have its own costs\.

### What terms of use matter for pyscn?

MIT for pyscn code: use, modification, and distribution are permitted with copyright and permission notices retained\. Code is provided without warranties; the hosted App and commercial support have separate terms\.

### Which environment can you use pyscn in?

pyscn analyzes Python; HTML and JSON are report formats\. The engine is built on Go and tree\-sitter\. For JavaScript/TypeScript, the README refers to other Polyscan analyzers; an HTML report does not mean analysis of HTML/CSS\.

### How do you get started with pyscn?

For the task “Check Python code after AI generation,” submit a bounded section with its context and criteria for review\. A possible first run: pyscn analyze src/ for an HTML report, or pyscn analyze \-\-json \-\-output \- src/ for JSON processing\. Assess findings by their impact; confirm the problem in the code or a reproducible example\. Fix confirmed causes and repeat the same check on the changed result\.

### What should you consider when choosing pyscn?

The skills support Codex, and MCP exposes the same analysis\. Verify static findings before changing or deleting code\.

### Is MCP required for pyscn?

The MCP server is an optional way to expose analysis to an agent\. The CLI produces static reports; skills for coding environments and the Polyscan GitHub App are available separately\.

### How can pyscn be used in CI?

pyscn check performs a pass/fail check with configurable thresholds, such as \-\-max\-complexity 15 and \-\-max\-cycles 0; \-\-select chooses analyses\. pyscn init creates \.pyscn\.toml\. A possible process: first choose thresholds appropriate to the project, then add check to the pipeline and examine the reasons for each failure separately; a successful quality gate does not replace functional tests\.

### Which architectural problems can pyscn detect?

The README describes circular imports, layer\-rule violations with clean/layered/hexagonal/MVC presets, module communities, CBO coupling, and LCOM4 cohesion\. These are structural metrics and candidates for investigation, not proof that every flagged module needs rewriting\.

### How are MCP settings selected?

pyscn\-mcp uses TOML settings\. PYSCN\_CONFIG specifies an explicit file; without it, discovery proceeds upward from the working directory, prioritizing \.pyscn\.toml over \[tool\.pyscn\] in pyproject\.toml\. YAML/JSON and separate home/XDG paths are not searched\. An invalid PYSCN\_CONFIG does not cause analyze\_code to silently switch to another file: this call reports a configuration error\.

## Sources for the selection guide

- [https://github\.com/ludo\-technologies/pyscn](<https://github.com/ludo-technologies/pyscn>)
- [https://docs\.codescan\.dev/](<https://docs.codescan.dev/>)
- [https://raw\.githubusercontent\.com/ludo\-technologies/pyscn/HEAD/README\.md](<https://raw.githubusercontent.com/ludo-technologies/pyscn/HEAD/README.md>)
- [https://raw\.githubusercontent\.com/ludo\-technologies/pyscn/HEAD/LICENSE](<https://raw.githubusercontent.com/ludo-technologies/pyscn/HEAD/LICENSE>)
- [https://docs\.codescan\.dev/pyscn/](<https://docs.codescan.dev/pyscn/>)
- [https://raw\.githubusercontent\.com/ludo\-technologies/pyscn/HEAD/mcp/README\.md](<https://raw.githubusercontent.com/ludo-technologies/pyscn/HEAD/mcp/README.md>)

## [Possible workflow](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-scenario>)

Example workflow with pyscn: Check Python code after AI generation\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- A diff or a small section of code, and a description of the expected behavior\.
- The tech stack version and a reproducible example of the issue or a baseline measurement\.
- A Python project or source directory; analysis settings in \.pyscn\.toml or \[tool\.pyscn\] in pyproject\.toml\. JavaScript/TypeScript are covered by other analyzers in the Polyscan family\.

## Steps

1. For the task “Check Python code after AI generation,” submit a bounded section with its context and criteria for review\. A possible first run: pyscn analyze src/ for an HTML report, or pyscn analyze \-\-json \-\-output \- src/ for JSON processing\.
2. Assess findings by impact; confirm each issue in the code or a reproducible example\.
3. Fix confirmed causes and repeat the same check on the changed result\.

## Check your result

- Findings identify a specific cause and consequence; unconfirmed assumptions are kept separate\.
- The improvement is measured or confirmed through behavior; recommendations match the project's version\.

## [License](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-license>)

MIT for pyscn code: use, modification, and distribution are permitted with copyright and permission notices retained\. Code is provided without warranties; the hosted App and commercial support have separate terms\.

## License explanations for the specified scope

### MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed\-source commercial product\. When sharing copies or substantial portions of the code, retain the license text and copyright notice\. You do not need to open\-source your entire project; the author provides no warranties\.

[License terms](<https://opensource.org/license/mit>)

## [Usage details](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-notes>)

The skills support Codex, and MCP exposes the same analysis\. Verify static findings before changing or deleting code\.

## [Sources](<https://base.akulich.dev/en/library/avc-87-pyscn/#resource-sources>)

- [Source code](<https://github.com/ludo-technologies/pyscn>)
- [Documentation](<https://docs.codescan.dev/>)
- [Official source](<https://raw.githubusercontent.com/ludo-technologies/pyscn/HEAD/README.md>)
- [Code license](<https://raw.githubusercontent.com/ludo-technologies/pyscn/HEAD/LICENSE>)
- [Python analyzer documentation](<https://docs.codescan.dev/pyscn/>)
- [MCP setup and analyses](<https://raw.githubusercontent.com/ludo-technologies/pyscn/HEAD/mcp/README.md>)

## Editorial review date

2026\-10\-03

## Editorial review scope

Purpose and published terms were reviewed against the cited primary sources\. This product page does not confirm execution or testing in every environment\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
