repogrammar_context
Integrates with OpenAI's Codex to deliver source-backed structural facts and bounded read plans.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@repogrammar_contextfind context for app/routes.py"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RepoGrammar
Repository conventions for coding agents.
Documentation · Quickstart · Changelog · Contributing
RepoGrammar indexes repeated implementations in your repository and gives coding
agents a source-backed read plan: examples of how this codebase implements a
route, fixture, model, or data-access role, with the evidence behind each match.
When the evidence is insufficient, it returns UNKNOWN with a recovery action.
It runs locally and exposes a pattern-first CLI and one read-only MCP tool. There are no LLM calls, API keys, embeddings, or cloud services in the analysis path. Python 3.10+ is required for the bundled Python analyzer.

Recorded from a real CLI run on a fixture repository; playback is slowed for readability.
Quick start
Requires Python 3.10+, Bash, curl, tar, and gzip. macOS and glibc Linux
are supported. Rust, Cargo, Node.js, Docker, and API keys are not required.
1. Install — copy and run
This single block downloads the pinned installer, verifies its checksum, and installs the CLI. It does not alter coding-agent settings or index a repository.
(
set -eu
install_tmp="$(mktemp -d)"
trap 'rm -rf "$install_tmp"' EXIT
cd "$install_tmp"
curl -fsSLO https://github.com/SioYooo/RepoGrammar/releases/download/v0.5.0/install.sh
curl -fsSLO https://github.com/SioYooo/RepoGrammar/releases/download/v0.5.0/install.sh.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c install.sh.sha256
else
shasum -a 256 -c install.sh.sha256
fi
bash install.sh --version v0.5.0 --install-cli-only --yes
) &&
export PATH="$HOME/.local/bin:$PATH"
repogrammar versionAdd the export PATH line to ~/.zshrc or ~/.bashrc once to keep the command
available in new terminals. Expected version: 0.5.0.
2. Index your project
From your project's directory:
repogrammar initThat is all: init builds the current project's index and starts background
updates. There is no global repository scanner. Run init once in each project.
The explicit form repogrammar init --project "$PWD" --yes does the same thing;
use --no-autosync for CI or a one-shot index.
3. Connect your coding agent (optional)
repogrammar install --target auto --scope global --yes --no-telemetryRestart the coding-agent session after connecting. Choose a specific client with
--target codex, --target claude-code, or --target opencode.
I want to… | Guide |
Install, update, or troubleshoot | |
Connect Codex | |
Connect Claude Code | |
Connect opencode | |
See every command | Run |
Understand evidence and limits | |
Remove the installation |
Related MCP server: Repo Context Forge
When should I index again?
Situation | Action |
First time in a project |
|
Normal edits while autosync is running | Nothing; updates run in the background |
Autosync is stopped, or you want an immediate update |
|
You need a full rebuild, or recovery guidance requests one |
|
You are unsure whether the index is ready |
|
index remains available for compatibility. Use init to start, sync for
ordinary changes, and resync to rebuild. Do not repeatedly run init after
normal edits.
Usage
Find examples for an exact repository location:
repogrammar find "path/to/routes.py:7" --project "$PWD" --mode compact
repogrammar families --project "$PWD"
repogrammar sync --project "$PWD"Start with an exact path or symbol when available. Framework-qualified queries
such as FastAPI route are also supported. See the CLI reference
for the complete commands and the MCP contract
for coding-agent integration.
Background updates
init starts a daemon for that repository. On macOS and Linux, native file
notifications coalesce edits before a sync. Idle native operation reconciles
metadata periodically instead of rescanning the tree every second. Git-ignored
untracked directories are pruned before fingerprint traversal, while tracked
files and ignore exceptions remain visible.
If native watching fails, autosync logs the fallback and polls with bounded
idle backoff. Failed syncs retry with bounded backoff even without another edit.
File notifications are hints; explicit sync and query-time hashes remain the
freshness authority. These changes reduce background work; no battery-life
percentage is claimed.
repogrammar autosync status --project "$PWD"
repogrammar autosync stop --project "$PWD"
repogrammar autosync start --project "$PWD"For CI or one-shot analysis, initialize with --no-autosync. See the
autosync contract for intervals and recovery.
How it works
repository → local index → pattern families → examples + bounded read plan
└──────────→ UNKNOWN + recovery actionRepository conventions: find compatible implementations and their exceptions.
Verifiable context: every result carries provenance and freshness checks.
Incremental updates: native filesystem events wake autosync; changes use the existing incremental indexer. Periodic reconciliation and polling fallback handle unavailable watchers.
Agent integration: connect Codex, Claude Code, or opencode through MCP.
Text search finds strings; symbol graphs connect declarations and references. RepoGrammar adds evidence about repeated implementation patterns. Use them together. Static alignment is not proof of runtime equivalence.
Scope and limitations
The official language focus is Python: FastAPI, pytest, Pydantic, and SQLAlchemy. Other languages have bounded structural or dependency-inventory capabilities; these are not full language support. The strict Top-20 qualification program remains 0/20 complete. Read the language audit for the evidence and unresolved gates.
RepoGrammar is pre-1.0. It is not a sound whole-program analyzer, and neither a syntax match nor a dependency declaration proves behavior. Dynamic dispatch, unsupported frameworks, stale indexes, and incomplete semantics can result in abstention. Read known limitations before relying on a result.
Public binary targets are macOS arm64/x86_64 and glibc Linux arm64/x86_64. Windows and musl Linux are not supported installation targets.
Development
cargo build --locked
cargo test --workspace --all-featuresRead CONTRIBUTING.md and the testing policy for the full checks. Architecture and specifications live in docs/. Report bugs through GitHub Issues; report security issues according to SECURITY.md.
License
MIT.
This server cannot be deployed
Maintenance
Related MCP Connectors
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Related MCP Servers
- AlicenseDqualityDmaintenanceRead-only repository context explorer for coding agents. Provides repository exploration tools via CLI or MCP adapter.1GPL 3.0
- AlicenseAqualityBmaintenanceMCP server that inspects local codebases and generates source-grounded context packs for coding agents, with tools for repository search, symbols, dependencies, Git analysis, and context generation.6MIT
- FlicenseNot gradedqualityAmaintenanceLocal-first MCP toolkit that provides coding agents focused repository context via read_file, search_files, and edit_file tools, reducing token usage and task cost.1-

Euthynosofficial
AlicenseNot gradedqualityBmaintenanceA local, read-only MCP server that provides AI coding agents with structural evidence about a repository, including dependency analysis and impact assessment, while naming the boundary of every answer without any LLM calls.44 npmApache 2.0