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.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Transports: stdio vs HTTP
  • State of MCP (stats)
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • 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 BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs 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 BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’» Developer Tools
  3. Patchwork β€” Codebase Conventions for AI Agents
Patchwork β€” Codebase Conventions for AI Agents logo
Health: ActiveRecent health check succeeded.Last checked 9/22/2026, 11:01:19 PM

Patchwork β€” Codebase Conventions for AI Agents

User RatingsBe the first to rate and review this MCP server! 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 RepositoryVisit Website

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
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β€” we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "patchwork-codebase-conventions-for-ai-agents": {
      "command": "uvx",
      "args": [
        "patchwork-conventions"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

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

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Developer Tools View all alternatives
  • Openapi MCP Server logoOpenapi MCP Server

    Connect any HTTP/REST API server using an Open API spec (v3)

    πŸ’» Developer Tools3 views
    Compare vs Openapi MCP Server β†’
  • 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 Tools8 views
    Compare vs Claude Task Master β†’
  • Andrea9293 MCP logoAndrea9293 MCP

    Local-first document management and semantic search for AI coding agents

    πŸ’» Developer Tools2 views
    Compare vs Andrea9293 MCP β†’
  • Next Devtools MCP logoNext Devtools MCP
    Verified

    Official Next.js MCP server for coding agents. Provides runtime diagnostics, route inspection, dev server logs, docs search, and upgrade guides. Requires Next.js 16+ dev server for full runtime features.

    πŸ’» Developer Tools5 views
    Compare vs Next Devtools MCP β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

Last commit
3mo ago
Most recent push to the default branch.
Directory activity
1 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

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": "uvx", "args": ["patchwork-conventions"] } }

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
RuntimePython
Last updatedJun 25, 2026
11/15 checks healthy over the last 46d
Views1
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.
GitHub stars0
GitHub Star CountTotal stargazers on GitHub representing community popularity (0 stars).
Last commit3mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Jun 25, 2026
36Quality signal: Fair Β· 36/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 ownership10/20
Documentation & tools16/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.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev Β· patchwork-conventions (PyPI)

β˜… 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 unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge 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 CodeSetup guides for all 13 MCP clients