Prototyp · Vorschau: alle Server aus der offiziellen Registry, alle 30 Minuten synchronisiert. Bewertungen und Benutzerkonten folgen in einem späteren Schritt.
PopNx MCPMCP-Server für alle, die KI nutzen · in einfachen Worten erklärt

patchwork — Codebase Conventions for AI Agents

von SaiNarayana-BVersion 0.1.7i★ –iLäuft auf deinem Computer
Name in der Registryio.github.SaiNarayana-B/patchwork

Installieren

Überblick

Beschreibung vom Entwickler (englisches Original)

Scan any codebase, generate CONVENTIONS.md, expose conventions as MCP tools for AI agents.

Die drei Säulen von PopNx MCP

Diese drei werden nie zu einer Punktzahl zusammengefasst: Meinungen, Messungen und Beliebtheit sind verschiedene Dinge.

Was du damit machen kannst

Für diesen Server haben wir noch keine Zusammenfassung in einfacher Sprache geschrieben. Unten stehen die Fakten, die wir aus der Registry gelesen haben.

  • Verbindung: Läuft auf deinem Computer
  • Transport: stdio
  • Kategorie: Entwicklertools

Installation

Wähle die KI-App, die du nutzt, und kopiere die Einstellungen.

Bevor du installierst

  • Basischecks: 1 von 1 bestanden
  • Läuft auf deinem Computer mit den Rechten deines Benutzerkontos (Dateien, Netzwerk, Apps).
  • Die Registry nennt keinen Schlüssel zum Eintragen.

Du brauchst

  • PyPIuv für Python installiert (für den Befehl uvx)

Welche App nutzt du?

Wähle oben deine App. Wir merken sie uns, damit der Button beim nächsten Mal „In … installieren“ anzeigt.

Öffne Claude Desktop → Settings → Developer → Edit Config und füge dies in claude_desktop_config.json ein

{
  "mcpServers": {
    "patchwork": {
      "command": "uvx",
      "args": [
        "patchwork-conventions"
      ]
    }
  }
}

Führe das in deinem Terminal aus

claude mcp add patchwork -- uvx patchwork-conventions

In Cursor öffnen

Oder kopier die Einstellungen selbst

In .cursor/mcp.json in deinem Projekt oder in ~/.cursor/mcp.json einfügen

{
  "mcpServers": {
    "patchwork": {
      "command": "uvx",
      "args": [
        "patchwork-conventions"
      ]
    }
  }
}

Dein Browser fragt, ob er die App öffnen darf, dann zeigt die App die Einstellungen und bittet dich um Bestätigung. Schlüsselwerte bleiben leer, damit du sie selbst einträgst.

In VS Code öffnen

Oder kopier die Einstellungen selbst

In .vscode/mcp.json in deinem Projekt einfügen

{
  "servers": {
    "patchwork": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "patchwork-conventions"
      ]
    }
  }
}

Dein Browser fragt, ob er die App öffnen darf, dann zeigt die App die Einstellungen und bittet dich um Bestätigung. Schlüsselwerte bleiben leer, damit du sie selbst einträgst.

Dieser Server läuft auf deinem Computer, und ChatGPT kann sich nur mit Servern im Internet verbinden. Wähle eine andere App.

Deine Auswahl bleibt in einem Cookie auf diesem Gerät; kein Konto nötig.

Diese Einstellungen werden aus dem Registry-Eintrag des Entwicklers erzeugt. Wenn in der README etwas anderes steht, folge der README.

Was er kann

Läuft auf deinem Computer; die Tool-Liste erscheint nach der Installation in deiner KI-App.

Basischecksi

Wir prüfen Informationen, die jeder sehen kann; den Code haben wir nicht gelesen. Checks, die nicht zutreffen, werden nicht mitgezählt. · Geprüft am 6. Nov. 2026

  • ✓ Bestanden

    Entwickler passt zum Repo

    Der Registry-Name wurde mit dem GitHub-Konto SaiNarayana-B bestätigt, dem das Repo gehört

  • … Noch nicht geprüft

    Wird noch gepflegt

    Dieses Repo haben wir noch nicht von GitHub gelesen

  • … Noch nicht geprüft

    Hat eine Lizenz

    Dieses Repo haben wir noch nicht von GitHub gelesen

  • – Nicht zutreffend

    Endpunkt antwortet

    Dieser Server läuft auf deinem Computer; es gibt keinen Endpunkt im Internet

  • – Nicht zutreffend

    Anmeldung mit OAuth

    Läuft auf deinem Computer und nutzt stattdessen lokale Einstellungen

  • … Noch nicht geprüft

    Keine versteckten Anweisungen in Tool-Beschreibungen

    Läuft auf deinem Computer; Tool-Listen können wir nur von Endpunkten im Internet lesen

Im Vergleich mit anderen in Entwicklertoolsi

  • Mehr Sterne als 0 % der anderen 1387 Server in dieser Kategorie
  • Neuer in der Registry veröffentlicht als 28 % der anderen 1387 Server in dieser Kategorie
  • Basischecks gleich gut wie oder besser als bei 100 % der anderen 1387 Server in dieser Kategorie

Verglichen mit allen aktiven Servern dieser Kategorie in der Registry. Sterne zählen nur, wenn dem Herausgeber das Repo gehört.

Häufige Fragen

Ist patchwork — Codebase Conventions for AI Agents sicher?

Er hat 1 von 1 zutreffenden Basischecks bestanden. Den Code haben wir nicht gelesen. Bevor du einen Schlüssel oder Token hinzufügst, sieh nach, welche Zugriffe der Server verlangt, und nutze einen Schlüssel, der nur die Berechtigungen hat, die du brauchst.

Welche Schlüssel oder Codes braucht er?

Die Registry nennt keinen erforderlichen Schlüssel, manche Server bitten dich aber bei der ersten Nutzung, dich anzumelden.

Läuft er auf meinem Computer oder in der Cloud?

Er läuft auf deinem Computer. Deine KI-App startet ihn bei Bedarf, und die Daten laufen nicht über die Server des Entwicklers (außer der Server ruft selbst einen Onlinedienst auf).

Wird er noch gepflegt?

Das GitHub-Repo wurde zuletzt – geändert, und die neueste Version (0.1.7) kam vor 4 Monaten in die Registry.

Welche Apps können ihn nutzen?

Apps, die MCP unterstützen, etwa Claude Desktop, Claude Code, Cursor und VS Code. Außerdem brauchst du Python (uv) auf deinem Computer.

Was kann ich stattdessen nutzen?

In derselben Kategorie: GitHub, Desktop Commander, Cloudflare MCP

Alternativen

Server derselben Kategorie von anderen Entwicklern, sortiert nach Sternen.

So liest du eine Karte:★ GitHub-SterneiDrei Säulen: Bewertungen · Checks · NutzungiAktualisiert = neueste Version in der Registry veröffentlichti

GitHub

von github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

Computer oder Cloud★ 34.245MITAktualisiert vor 3 Tagen
Installieren

Desktop Commander

von wonderwhy-er

MCP server for terminal commands, file operations, and process management

Läuft auf deinem Computer★ 10.225MITAktualisiert vor 15 Tagen
Installieren

Cloudflare MCP

von cloudflare

Cloudflare MCP servers

Läuft in der Cloud★ 4.446Apache-2.0Aktualisiert vor 14 Monaten
Installieren

README vom Entwickler

README öffnen

Unverändert aus dem Repo des Entwicklers übernommen. PopNx MCP hat den Inhalt weder geprüft noch empfiehlt es ihn. HTML, Bilder und Skripte wurden entfernt. Links führen von dieser Website weg.

patchwork

Mine your codebase. Generate CONVENTIONS.md. Stop AI agents from making up your style.


Every team that uses AI coding assistants hits the same wall: Claude writes `getUserById` in a codebase that uses `get_user_by_id`. Cursor creates `components/userCard.tsx` in a project that uses `user-card.tsx`. The agent invented a response shape that doesn't match the rest of the API.

You write a CLAUDE.md manually. It goes stale in two weeks. You write it again.

patchwork automates this. It scans your actual source code using AST analysis and detects what your team really does — not what you think you do.


What it detects

CategoryWhat's mined
NamingFunctions, classes, variables, constants, files — with confidence score and real examples
ImportsAbsolute vs relative, path aliases (@/, src/), barrel files, destructuring style
StructureSource root, test layout, feature vs layer organisation, monorepo detection
Error Handlingtry/except vs Result types, logging framework, custom exception naming, propagation style
TestingFramework, assertion style, mocking library, coverage tool, fixture patterns
API PatternsResponse shape, route param style, ORM, async pattern, GraphQL/gRPC presence
Git WorkflowCommit message style, branch naming, co-change file pairs
Tech StackFrameworks, package manager, linters, formatters, type checker, build tool, scripts

Quick start

pip install patchwork-conventions

cd your-project patchwork scan

That's it. You'll get a CONVENTIONS.md like this:

# CONVENTIONS.md

Auto-generated by patchwork on 2026-06-25

Tech Stack

Language: python Runtime: Python >=3.11 Package Manager: uv Frameworks: fastapi, sqlalchemy Linters: ruff Formatters: ruff, black

Naming Conventions

Python
  • Functions: snake_case (97% consistent)
  • Examples: get_user, parse_response, create_session
  • Classes: PascalCase (100% consistent)
  • Examples: UserService, AuthHandler, DatabaseClient
  • Constants: SCREAMING_SNAKE
  • Examples: MAX_RETRIES, API_BASE_URL
  • Files: snake_case
  • Private prefix: _
  • Test functions: prefix test_

Project Structure

Source root: src/ Organisation: layer-based Tests: separate (tests/)

Key directories:

  • src/ — source root
  • tests/ — test suite
  • migrations/ — database migrations

Error Handling

Python
  • Pattern: try/except
  • Propagation: raise
  • Logging: structlog
  • Custom exception naming: Error suffix
  • ValidationError, AuthError, NotFoundError

Testing Conventions

Python
  • Framework: pytest
  • Coverage: 34 test files / 89 source files (38% ratio)
  • Assertions: assert(...)
  • Coverage tool: pytest-cov
  • Patterns: fixtures, factories

Git Conventions

  • Commit style: conventional commits
  • Examples: feat(auth): add JWT refresh, fix(api): handle null user
  • Branch naming: feature/name + fix/name

Why not argus or sourcebook?

Featurepatchworkargussourcebook
AST-based naming analysis✅ tree-sitter❌ filesystem only❌ not done
Confidence scores✅ per-category❌❌
Real examples from your code✅❌❌
Counter-examples (inconsistencies)✅❌❌
Error handling pattern mining✅❌❌
API response shape detection✅❌❌
Co-change file pairs✅❌✅
Convention checking (check cmd)✅❌❌
MCP server with 8 tools✅❌✅ (4 tools)
Watch mode✅✅ (sync)✅
Zero LLM required✅✅✅ (layer A)
Open source / MIT✅✅❌ BSL

Commands

# Generate CONVENTIONS.md

patchwork scan

Generate for a specific path

patchwork scan /path/to/project

Generate AGENTS.md

patchwork scan --agents-md

Append to CLAUDE.md

patchwork scan --claude-md

Output JSON (for programmatic use)

patchwork scan --json

Print to stdout (don't write file)

patchwork scan --stdout

Limit to specific languages

patchwork scan --lang python --lang typescript

Re-scan and update, preserving manual edits

patchwork update

Show what would change

patchwork diff

Print detected conventions to terminal

patchwork show

Auto-watch mode (regenerate on change)

patchwork watch

Start MCP server

patchwork serve --stdio # for Claude Code patchwork serve --port 3742 # HTTP mode


Claude Code integration

Option 1: CONVENTIONS.md (recommended)
patchwork scan      # run once

CONVENTIONS.md is automatically read by Claude Code

Option 2: Append to CLAUDE.md
patchwork scan --claude-md
Option 3: MCP server

Claude Code — add to ~/.claude.json (or run claude mcp add interactively):

{

"mcpServers": { "patchwork": { "command": "patchwork", "args": ["serve", "/path/to/your/project", "--stdio"] } } }

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{

"mcpServers": { "patchwork": { "command": "patchwork", "args": ["serve", "/path/to/your/project", "--stdio"] } } }

Cursor — add to .cursor/mcp.json in your project root:

{

"mcpServers": { "patchwork": { "command": "patchwork", "args": ["serve", ".", "--stdio"] } } }

Then your AI agent can use 8 on-demand tools:

ToolWhen to use
patchwork_scanGet complete conventions overview
patchwork_namingBefore writing new identifiers
patchwork_structureBefore creating new files/directories
patchwork_stackWhen choosing libraries or commands
patchwork_errorsBefore writing error handling
patchwork_testingBefore writing test files
patchwork_gitBefore writing commit messages
patchwork_checkValidate a proposed name
Option 4: Claude Code skill (SKILL.md)

Copy SKILL.md from this repo to ~/.claude/skills/patchwork/SKILL.md to get /patchwork slash commands.


Watch mode (CI/auto-update)

# Keep CONVENTIONS.md updated as you code

patchwork watch &

Or in CI — fail if conventions changed

patchwork diff || (patchwork update && git add CONVENTIONS.md && git commit -m "chore: update conventions")


Python API

from patchwork import scan

from patchwork.scanner import ScanOptions from pathlib import Path

Full scan

report = scan(ScanOptions(root=Path(".")))

Render to markdown

print(report.to_markdown())

Render to JSON

import json data = json.loads(report.to_json())

Access specific results

naming = report.naming.get("python") print(f"Functions: {naming.functions.style} ({naming.functions.confidence:.0%})") print(f"Examples: {naming.functions.examples}")

structure = report.structure print(f"Source root: {structure.source_root}") print(f"Organisation: {structure.organisation}")


Supported languages

LanguageAST (tree-sitter)Fallback regex
Python✅ full✅
TypeScript✅ full✅
JavaScript✅ full✅
Go✅ (with full extra)✅
Rust✅ (with full extra)✅
Java✅ (with full extra)✅
Ruby, PHP, C#, C++❌✅ regex only

Install full language support:

pip install 'patchwork-conventions[full]'

How it works

your codebase

│ ▼ ConfigDetector ← reads package.json, pyproject.toml, go.mod, Cargo.toml │ ▼ File discovery ← respects .gitignore, skips node_modules etc. │ ▼ Per-language AST ← tree-sitter parses every file into a syntax tree │ ├── NamingMiner → extracts function/class/variable names, classifies style ├── ImportMiner → detects import patterns, aliases, barrel files ├── StructureMiner → analyses directory layout, test co-location ├── ErrorHandlingMiner → detects try/catch patterns, logging, custom exceptions ├── TestingMiner → identifies framework, assertion style, mocking ├── APIPatternMiner → finds response shapes, ORMs, route styles └── GitPatternMiner → mines commit history, branches, co-change pairs │ ▼ ConventionReport │ ├── CONVENTIONS.md (default) ├── AGENTS.md (--agents-md) ├── CLAUDE.md (--claude-md, appends) └── JSON (--json)

All analysis is 100% local — no API calls, no telemetry, no data leaves your machine.


Performance

On a 1,000-file TypeScript monorepo:

  • Without tree-sitter: ~0.8s
  • With tree-sitter (full AST): ~2.1s

On a 500-file Python project:

  • ~1.1s

Results are deterministic — same codebase always produces the same output.


Contributing

git clone https://github.com/yourusername/patchwork

cd patchwork pip install -e '.[dev]' pytest

Pull requests welcome. See CONTRIBUTING.md.


License

MIT — free for personal and commercial use.


Topics

claude-code · agent-skills · mcp · context-engineering · hallucination-detection · code-conventions · static-analysis · tree-sitter · developer-tools · ai-coding

PopNx fragen