# Reported issues for pyscn

Pod holds 15 of 15 problems reported by people outside the maintainer team. Issues filed by the project's own owners, members and collaborators are excluded entirely — a maintainer's release checklist is not a warning to a prospective user.

Back to [pyscn](/mcp/pyscn).

## Most discussed

### Add unit tests for MCP server handlers

## Task

Add unit tests for MCP server handlers in `mcp/handlers_test.go`

## What to test

6 handlers in `mcp/handlers.go`:
- `HandleAnalyzeCode`
- `HandleCheckComplexity`
- `HandleDetectClones`
- `HandleCheckCoupling`
- `HandleFindDeadCode`
- `HandleGetHealthScore`

## Example

```go
func TestHandleAnalyzeCode(t *testing.T) {
    deps := &Dependencies{/* ... */}
    request := mcp.CallToolRequest{
        Params: mcp.CallToolRequestParams{
            Arguments: map[string]interface{}{
       

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/187) · 2025-10-14 · closed · 10 comments

### [FEATURE]  Is there a plan to integrate MCP?

May I ask if there are any plans to integrate MCP in the future, using ddd mode, modular development, and AI loop for testing? If you don't have any plans, can I fork the project and submit PR?

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/181) · 2025-10-13 · closed · outside contributor · 2 comments

### [FEATURE] Integrate nesting depth metric into analyze command

**Description**:
  PR #143 implemented the nesting depth calculation logic. We should now integrate it into the `pyscn analyze`
  command to make it available to users.

  **Proposed Implementation**:
  - Add `NestingDepth int` field to `ComplexityMetrics` struct
  - Call `CalculateMaxNestingDepth()` in complexity analysis
  - Include nesting depth in all output formats (JSON, HTML, CSV, YAML)
  
  **Background**:
  #143 implemented the core nesting depth calculation. This issue is about exposin

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/146) · 2025-10-08 · closed · 2 comments

### [BUG][auto] cbo-enum-member-inflation-module-qualified: CBO still double-counts enum members accessed via a module alias

## Description

Issue #593 / PR #594 fixed CBO's enum-member double-counting for the *direct-import* case (`from mod import RuleMode` then `RuleMode.BLOCKING`), where the import binding itself is the enum class name. But the same double-counting bug still occurs for the **module-qualified** case: `import mod as alias` (or `from pkg import _enums as reflection`) then `alias.EnumClass.MEMBER`. Here the enum class (`alias.EnumClass`) and each enum member access (`alias.EnumClass.MEMBER`) are still 

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/667) · 2026-07-21 · closed · 1 comment

### [BUG] Claude code plugin does not work?

## Describe the bug
I had previously used the MCP with claude code successfully. Upon switching laptops and having to reconfigure my claude setup, I used the plugin. I found the plugin to not actually work?

Installing the `pyscn-mcp` plugin in Claude Code loads the **skill** but not the **MCP server**. `/reload-plugins` reports `0 plugin MCP servers`, and none of the `get_health_score` / `analyze_code` / `check_complexity` / … tools become available. The skill (`skills/SKILL.md`) instructs the 

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/509) · 2026-06-02 · closed · external user · 1 comment

### [communities] AI-agent context map + MCP docs

Part of #564. **Phase 2**, **depends on stable community JSON (#584) and community risk score (#602)**.

## Problem

Discussion #563 and issue #564 call for helping AI coding/review agents know **which files to inspect together**. Phase 1 JSON lists all modules per community but is verbose for large repos and is not surfaced well in MCP defaults (`output_mode: summary` omits `community_analysis`).

## Scope

### AI context map output

Add a compact **`community_context_map`** (name TBD) optimize

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/604) · 2026-06-25 · closed · 0 comments

### [communities] community risk score + Health Score integration

Part of #564. **Phase 2**, **depends on package and layer mismatch metrics**.

## Problem

Phase 1 exposes modularity (Q), bridge modules, and cross-community edge counts, but communities do not affect `HealthScore` and there is no single "community health" signal for CI or dashboards.

## Scope

### Community risk score

Define a **community risk / quality score** (0–100) derived from Phase 1 + Phase 2 mismatch metrics, e.g.:

- Low modularity Q
- High bridge-module count or cross-community edg

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/602) · 2026-06-25 · closed · 0 comments

### [communities] layer mismatch scoring

Part of #564. **Phase 2**, **depends on the package mismatch issue** and existing architecture analysis (`deps` / `[architecture]` layers).

## Problem

pyscn already validates configured layer rules (allow/deny) via architecture analysis. Community detection surfaces *inferred* clusters from imports. Phase 2 should quantify disagreement between **configured layers** and **inferred communities**.

Example questions:
- Does the `api` layer's modules cluster together, or do they leak into an `infr

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/601) · 2026-06-25 · closed · 0 comments

## Most recent

### Misleading 'disabled by default' comments for architecture analysis (clarify SOT)

## Summary

The default-enabled state of **architecture analysis** is defined in multiple places with **conflicting values**, and the struct-level defaults carry comments that contradict the actual runtime behavior. This is a documentation/consistency cleanup — no behavior change is required.

## Background

For the `analyze` command, whether architecture analysis runs is gated **solely** by `AnalyzeExecutionConfig.SystemAnalyzeArchitecture`:

- **No config file** → `defaultAnalyzeExecutionConfi

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/524) · 2026-06-06 · closed · 0 comments

### feat: add LCOM4 (Lack of Cohesion of Methods) metric

## Summary

Add LCOM4 (Lack of Cohesion of Methods) metric to measure class cohesion by analyzing whether methods in a class share instance variables using a graph-based approach.

## Background

LCOM is one of the classic OO metrics proposed by Chidamber & Kemerer (1994). It complements the existing CBO (coupling) metric by measuring internal class quality.

### LCOM4 Algorithm (Hitz & Montazeri)

1. Build a graph where nodes = methods and edges connect methods that share instance variables
2. 

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/334) · 2026-02-13 · closed · 0 comments

### feat: Publish as Claude Code plugin marketplace

## Summary

Publish pyscn-mcp as a Claude Code plugin marketplace.

## Background

- Anthropic's official marketplace (`anthropics/claude-plugins-official`) is primarily for partner companies; individual developer tools are unlikely to be accepted
- Publishing as a self-hosted marketplace is the realistic approach

## Required Work

### 1. Add directory structure

```
pyscn/
├── .claude-plugin/
│   ├── marketplace.json    # Marketplace definition
│   └── plugin.json         # Plugin manifest
└──

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/279) · 2026-01-10 · closed · 0 comments

### Fix binary auto-detection in create_wheel.sh for pyscn_mcp package

## Problem

The binary auto-detection logic in `create_wheel.sh` (lines 449-498) doesn't work correctly for `pyscn_mcp` package:

- `bin_base` is hardcoded to `src/pyscn/bin` (should use `src/pyscn_mcp/bin` for pyscn_mcp)
- Always searches for both binaries (pyscn_mcp package only needs pyscn-mcp binary)

## Current Impact

**None** - `build_platform_wheel.sh` always explicitly specifies binaries with `--binary` flag, so auto-detection is never used.

## Future Risk

If someone runs `create_whee

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/201) · 2025-10-18 · closed · 0 comments

### Add MCP Integration section to README

## Task

Add a "MCP Integration" section to the main README.md to showcase pyscn's AI assistant integration capabilities.

## Background

pyscn now supports MCP (Model Context Protocol), allowing AI assistants like Claude Code and Cursor to directly analyze Python code quality. This is a major feature but not documented in the main README.

## Steps

1. Try out the MCP server 

2. Add README section 

3. Reference existing docs 

- `mcp/README.md` (604 lines) - Full MCP documentation
- `docs/MCP

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/188) · 2025-10-14 · closed · 0 comments

### Add pyscn-mcp binary to PyPI release workflow

## Problem

The current Python release workflow (`python/scripts/build_platform_wheel.sh`) only builds the `pyscn` binary but not the `pyscn-mcp` binary. This means that when we release to PyPI, users won't be able to use `uvx pyscn-mcp`.

The MCP server implementation is already merged (#184), but it won't be included in PyPI releases.

## Current Behavior

In `python/scripts/build_platform_wheel.sh`:
- Line 144, 153, 157: Only builds `cmd/pyscn`
- The `pyscn-mcp` binary from `cmd/pyscn-mcp` is

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/185) · 2025-10-14 · closed · 0 comments

### Add configurable grouping modes for clone detection

## Summary
Add support for multiple grouping strategies in clone detection to allow users to choose between different trade-offs of precision vs recall.

## Background
Currently only transitive grouping (connected components) is supported. This can lead to unwanted chaining effects. We need to support multiple grouping modes for different use cases.

## Requirements
Implement the following grouping modes:
- `connected`: Current transitive grouping (high recall)
- `star`: Star/Medoid constraint (

[Read the thread](https://github.com/ludo-technologies/pyscn/issues/81) · 2025-09-10 · closed · 0 comments

The remaining reports are on [the project's issue tracker](https://github.com/ludo-technologies/pyscn/issues).
