Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

Explore

  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Tags index
  • Submit a server
  • Pricing

Learn

  • Guides hub
  • What is MCP?
  • Install guide
  • Troubleshooting
  • Security
  • Blog
  • Blog RSS

Tools

  • All tools
  • Config generator
  • Config validator
  • MCP playground
  • OpenAPI β†’ MCP
  • Badge generator

For agents

  • API docs
  • Trust & traffic
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
  • Remote MCP β†— (opens in a new tab)

Company

  • About
  • Contact
  • X (@AllMCPs) β†— (opens in a new tab)
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on Buildlist
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’» Developer Tools
  3. Patchwork β€” Codebase Conventions for AI Agents
P
Health: Not checked yetWe have not completed a health check for this listing yet.Last checked 8/11/2026, 12:13:11 AM

Patchwork β€” Codebase Conventions for AI Agents

Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View Repository

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

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Install Config Generator

Choose your client
claude_desktop_config.json
{
  "mcpServers": {
    "patchwork-codebase-conventions-for-ai-agents": {
      "command": "npx",
      "args": [
        "-y",
        "patchwork-codebase-conventions-for-ai-agents"
      ]
    }
  }
}

πŸ’‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Install Directory Badge Claim listing AlternativesπŸ’» More in Developer Tools

Documentation Overview

patchwork

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

PyPI License: MIT Python 3.9+ agent-skills MCP


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

Terminal
pip install patchwork-conventions
cd your-project
patchwork scan

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

markdown
# 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

bash
# 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)

bash
patchwork scan      # run once
# CONVENTIONS.md is automatically read by Claude Code

Option 2: Append to CLAUDE.md

bash
patchwork scan --claude-md

Option 3: MCP server

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

config.json
{
  "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):

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

Cursor β€” add to .cursor/mcp.json in your project root:

config.json
{
  "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)

bash
# 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

server.ts
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:

Terminal
pip install 'patchwork-conventions[full]'

How it works

server.ts
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

bash
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

Related MCP Servers

View all in Developer Tools View all alternatives
  • Claude Task Master logoClaude Task Master

    AI-powered task management system for AI-driven development. Features PRD parsing, task expansion, multi-provider support (Claude, OpenAI, Gemini, Perplexity, xAI), and selective tool loading for optimized context usage.

    πŸ’» Developer Tools7 views
    Compare vs Claude Task Master β†’
  • CodeNib logoCodeNib

    Ranked codebase search and static symbol navigation for coding agents.

    πŸ’» Developer Tools0 views
    Compare vs CodeNib β†’
  • Q
    Quiz Generator Ai Mcp

    AI-powered quiz generator ai MCP server for agents. Supports generate quiz, validate answers...

    πŸ’» Developer Tools0 views
    Compare vs Quiz Generator Ai Mcp β†’
  • A
    Ai Netcafe

    Compare LLM cost & latency on one prompt, translate PDF keeping layout, cited research, make PPTX

    πŸ’» Developer Tools0 views
    Compare vs Ai Netcafe β†’

Frequently Asked Questions about Patchwork β€” Codebase Conventions for AI Agents

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "patchwork-codebase-conventions-for-ai-agents": { "command": "npx", "args": ["-y", "patchwork β€” Codebase Conventions for AI Agents"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPatchwork β€” Codebase Conventions for AI Agents AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/patchwork-codebase-conventions-for-ai-agents?style=directory)](https://allmcps.com/mcp/patchwork-codebase-conventions-for-ai-agents)
HTML Embed
<a href="https://allmcps.com/mcp/patchwork-codebase-conventions-for-ai-agents"><img src="https://allmcps.com/api/badge/patchwork-codebase-conventions-for-ai-agents?style=directory" alt="Patchwork β€” Codebase Conventions for AI Agents on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ’»Developer Tools
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
0/4 checks healthy over the last 6h
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
27Quality signal: Emerging Β· 27/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership8/20
Documentation & tools11/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge β€” we recheck it stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ’» Developer Tools β†’Best MCP servers for Developers β†’Alternatives to Patchwork β€” Codebase Conventions for AI Agents β†’Install in Claude DesktopInstall in CursorInstall in VS Code