Skip to main content
Glama
Aplomo MCP Server

Aplomo MCP Server

by marcmendez

Aplomo

One repository standard for Cursor, Codex, and Claude Code.

CI Python 3.12+ MIT

Coding agents are good at writing code. They are less reliable at proving that a new service, class, or module belongs in this repository instead of duplicating something that already exists.

Aplomo gives Cursor, Codex, and Claude Code the same repository-aware workflow. You describe the change normally; Aplomo finds the canonical design patterns, searches for reusable implementations, requires a justification before another abstraction is introduced, and reviews the final diff for duplication and missing validation.

"Add invoice retries and tests"
              │
              ▼
     Cursor / Codex / Claude Code
              │
              ├─ one repository preflight
              │  pattern catalog · bounded search · architecture
              ├─ reuse candidate or justify a new abstraction
              ├─ implementation with focused tests
              └─ duplicate · boundary · test · secret review
                         │
                         ▼
              your repository remains in control

Aplomo does not proxy prompts, choose a model, or upload repository contents. Its current MCP tools are read-only and its hook events stay in a local, gitignored file.

Why teams use it

  • One source of truth. Put engineering rules in .engineering/; Aplomo generates the native files each supported agent expects.

  • Normal requests. No prompt prefix, wrapper chat, or new task syntax.

  • Less integration drift. The same preflight and final review follow a request when a developer changes coding assistants.

  • Pattern reuse first. The agent sees relevant implementations before inventing another abstraction.

  • No-copy gate. A new class, service, interface, or module must reuse a candidate or state why its responsibility or lifecycle is materially different.

  • Design patterns are repository-owned. .engineering/patterns.md records canonical implementations and when they should be extended.

  • Bounded reads. Every repository search reports its file and character budget, actual consumption, and whether the result was truncated.

  • Safe adoption. Existing configuration that Aplomo does not own is preserved and reported instead of silently overwritten.

  • Local by default. Repository analysis and lifecycle metadata stay on the machine or cloud agent running the task.

Related MCP server: mcp-codebase-intelligence

Install in a repository

Requirements: Python 3.12 or newer, Git, and either uv or pipx.

uv tool install git+https://github.com/marcmendez/aplomo.git
cd your-repository
aplomo init --agents cursor codex claude

With pipx, replace the first command with:

pipx install git+https://github.com/marcmendez/aplomo.git

Restart or reopen the coding assistant so it loads the new project integration. From then on, make the same requests you already make:

Add pagination to the users endpoint and cover the edge cases with tests.

The generated launcher is pinned to Aplomo's isolated Python environment. It does not rely on the PATH inherited by a desktop app.

Choose only the agents you use

aplomo init --agents cursor
aplomo init --agents codex claude

Agent

Native integration

Guide

Cursor

project rule, MCP server, lifecycle hooks

Cursor setup

Codex

AGENTS.md, skill, MCP server, lifecycle hooks

Codex setup

Claude Code

CLAUDE.md, skill, MCP server, lifecycle hooks

Claude Code setup

Cursor Cloud

Cursor Cloud runs in its own VM. It does not inherit the Aplomo installation or MCP process from your laptop.

  1. Commit .engineering/ and the generated Cursor files.

  2. In the cloud environment setup, install Aplomo and regenerate the machine-local launcher:

    uv tool install git+https://github.com/marcmendez/aplomo.git
    aplomo install
  3. Add an stdio MCP server in the Cursor dashboard or Cloud Agent API with:

    command: ./.engineering/aplomo-runtime
    args:    mcp --root .

The command runs inside the Cloud VM and reads that checkout only. Cursor documents the VM model and supported MCP transports in its Cloud Agent capabilities and Cloud Agent API.

What gets installed

.engineering/config.yaml is the source of truth; everything else is a native adapter or local runtime file.

your-repository/
├── .engineering/
│   ├── config.yaml              # agents and enabled integrations
│   ├── architecture.yaml        # boundaries and repository rules
│   ├── patterns.md              # canonical patterns and extension rules
│   ├── decisions/               # architecture decisions
│   ├── aplomo-runtime           # machine-local launcher, gitignored
│   └── events.jsonl             # local lifecycle events, gitignored
├── .cursor/                     # Cursor adapters
├── .codex/                      # Codex adapters
├── .claude/                     # Claude Code adapters
├── .agents/skills/              # portable agent skill
├── AGENTS.md                    # managed Aplomo section for Codex
└── CLAUDE.md                    # managed Aplomo section for Claude Code

Change .engineering/config.yaml, then regenerate rather than editing generated adapters:

aplomo install

The reuse-before-create contract

Aplomo treats a new abstraction as a decision, not as the default output of a coding agent.

  1. aplomo_prepare_change returns the repository map, relevant architecture, the pattern catalog, and a bounded search for existing implementations.

  2. The agent starts from the canonical implementation listed in .engineering/patterns.md when one applies.

  3. Before adding a class, service, interface, or module, aplomo_validate_abstraction searches for candidates.

  4. If candidates exist, the result is needs_justification. The agent must extend one or explain the materially different responsibility or lifecycle.

  5. aplomo_review_diff checks tracked and untracked files for duplicate class/interface/type declarations, missing tests, possible secrets, and excessive diff size.

This does not pretend that lexical analysis can prove two implementations are semantically identical. It creates an explicit, reviewable gate at the point where duplication usually enters the codebase.

See Patterns, abstraction gates, and read budgets for the status contract, operating guidance, and known limits.

Maintain the pattern catalog

Each entry in .engineering/patterns.md names the responsibility, canonical implementation, extension rule, exception rule, and validation:

## Retry policy

- Responsibility: decide whether a failed operation can be retried
- Canonical implementation: `src/shared/retry.py`
- Extend when: another workflow follows the same attempt and status rules
- Create a new abstraction only when: retry lifecycle or ownership is different
- Validation: `tests/shared/test_retry.py`

Read management

Repository-wide reads are not free: they add latency, consume model context, and become noisy in large monorepos. Aplomo uses a configurable source-read budget instead of blindly loading the tree:

context:
  max_files: 80
  max_chars: 200000
  max_matches: 12

Candidate files are ranked deterministically by path and query relevance. Each result includes files_available, files_read, chars_read, the configured limits, truncated, and a stop_reason such as complete, match_limit, file_budget, or character_budget.

If truncated is true, “no candidate found” means only “none was found inside this budget.” The agent should refine the query first and widen the budget deliberately only when the scoped search is insufficient. This keeps routine requests cheap without turning the budget into a false proof that no pattern exists.

Plugin and CLI

This repository includes a portable Agent Plugin manifest and Aplomo review skill. The skill can fall back to an agent's native search, test, and diff tools. The CLI installation above adds the full local experience: native project configuration, the repository-aware MCP server, hooks, and the PATH-independent runtime launcher.

The split is deliberate. A public hosted MCP server would require sending repository context to a remote service; Aplomo keeps that context where the coding agent is already running.

Evidence, not promises

The release gate currently covers:

  • 37 automated tests on Python 3.12 and 3.13;

  • 6 deterministic acceptance checks for three-agent configuration, safe installation, byte-for-byte regeneration, MCP initialize/list/call, real subprocess startup, and real hook persistence;

  • a clean-wheel installation into a fresh Git repository in CI;

  • manifest/version synchronization and read-only tool annotations.

We also publish the first paired Codex pilot instead of turning it into a marketing claim. Across three small tasks, baseline and Aplomo both passed all 10 hidden checks. Aplomo used two MCP review calls per task, 23% more uncached-plus-output tokens, and 44% more wall time in this single-run sample. It did not establish token savings or a quality uplift. The useful conclusion is narrower: the workflow reached parity while enforcing the same repository checks, and its overhead is now measured. See the benchmark method and pilot result. That pilot measured the 1.0 workflow; the bounded-read and abstraction-gate additions are covered deterministically and still need a repeated agent benchmark.

That benchmark is intentionally reproducible:

uv run python benchmarks/run_codex.py --repetitions 3 --output benchmark-results.json

We will only claim productivity or quality improvements after repeated, representative tasks show them.

Commands

aplomo init      Detect the stack, create .engineering/, and install adapters
aplomo install   Regenerate managed adapters from .engineering/config.yaml
aplomo doctor    Check configuration, generated files, and the real MCP runtime
aplomo eval      Run deterministic acceptance checks
aplomo hook      Normalize one lifecycle event
aplomo mcp       Run the repository-aware MCP server over stdio

Development and support

git clone https://github.com/marcmendez/aplomo.git
cd aplomo
uv sync --python 3.12
uv run pytest -q
uv run aplomo eval
uv build

Read CONTRIBUTING.md before changing generated integrations. Bugs and feature requests belong in GitHub Issues; security reports follow SECURITY.md.

License

MIT

Available Tools

7 tools
aplomo_find_existing_patternsA
Read-onlyIdempotent

Search a bounded set of source files for existing implementations before adding an abstraction.

Inputs: query (required), limit.

aplomo_prepare_changeC
Read-onlyIdempotent

Prepare one coding request with repository structure, relevant existing patterns, and architecture rules in a single call.

Inputs: request (required), query.

aplomo_review_architectureA
Read-onlyIdempotent

Summarize architecture configuration and repository structure for an architecture review.

Inputs: no named parameters.

aplomo_review_diffA
Read-onlyIdempotent

Review the current git diff for risky size, secrets, and missing test changes.

Inputs: no named parameters.

aplomo_review_planB
Read-onlyIdempotent

Check whether an implementation plan covers patterns, scope, compatibility, and validation.

Inputs: plan (required).

aplomo_understand_repoB
Read-onlyIdempotent

Detect technologies and summarize modules and symbols in the repository.

Inputs: no named parameters.

aplomo_validate_abstractionB
Read-onlyIdempotent

Require reuse or an explicit responsibility/lifecycle justification before adding an abstraction.

Inputs: proposed_name (required), responsibility (required), justification.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Tools are mapped to distinct workflow phases (understanding, pattern search, change preparation, abstraction validation, plan/architecture/diff review), so misselection is unlikely. The only mild overlap is between understand_repo and review_architecture, which both involve summarizing repository structure.

    Naming Consistency5/5

    All tools share the aplomo_ prefix and use a consistent verb_noun snake_case pattern (prepare_change, understand_repo, review_plan, etc.). The pattern makes the action of each tool predictable from its name.

    Tool Count5/5

    Seven tools is a tight, well-scoped set for a code-review and change-preparation server. Each tool covers a distinct step without redundancy or bloat.

    Completeness5/5

    The set covers the full intended workflow: understanding the repo, finding existing patterns, preparing a change, validating abstractions, and reviewing the plan, architecture, and diff. No obvious dead ends or critical missing operations for the server's apparent review/preparation purpose.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI coding agents with structured access to indexed codebases via semantic search, symbol analysis, and file reading tools.
      13
      Server Side Public , v 1
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a semantic understanding of your codebase by parsing with tree-sitter and building a graph of symbols and dependencies. Enables AI assistants to navigate code, analyze changes, and discover architecture using 18 tools with minimal context overhead.
      16 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to retrieve compact structural codebase context through repository architecture summaries, AST symbol extraction, cyclomatic complexity scoring, and TODO/FIXME hotspot search.
      1
      MIT