repogrammar_context
Integrates with OpenAI's Codex to deliver source-backed structural facts and bounded read plans.
Click on "Install 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.
Coding agents repeatedly read the same files to rediscover how a repository implements routes, fixtures, models, and data access. RepoGrammar turns those repeated implementations into a compact map of pattern families before an agent reads source broadly.
When repository evidence is strong, the agent gets representative examples,
source-backed metadata, and a hash-checked read plan. When it is not,
RepoGrammar returns a typed UNKNOWN with a recovery action instead of filling
the gap with a plausible guess.
The promise: less source rereading without pretending uncertain static evidence is fact.
repository source
│
▼
local evidence index ──► compatible pattern families ──► bounded read plan
│ │
└── freshness checks └──► UNKNOWN / PARTIAL_CONTEXT + recoveryWhy RepoGrammar
Pattern-aware | Evidence-gated | Agent-ready |
Finds how this repository repeatedly implements a role, not merely where a string appears. | Keeps provenance, freshness, unresolved semantics, and exceptions attached to every claim. | Serves compact context through a pattern-first CLI and one read-only MCP tool, |
RepoGrammar complements text search, semantic search, and symbol graphs. Those tools locate code; RepoGrammar adds a repository-local contract for deciding which repeated implementations are compatible, what still needs to be read, and when the answer must abstain.
Related MCP server: Graft
Quick start
RepoGrammar supports macOS and glibc-based Linux. Windows and musl Linux are not currently supported installation targets.
Prerequisites
Python 3.10 or later;
Bash;
curl,tar, andgzip; andnetwork access to GitHub Releases during installation.
Verify the required tools before installing:
python3 --version
bash --version
curl --version
tar --version
gzip --versionThe Python version must be 3.10 or later. Rust, Cargo, Node.js, Docker, an LLM, and API keys are not required for the binary installation path.
1. Download and install the CLI
Use a temporary directory so the installer files do not remain in a project:
mkdir -p /tmp/repogrammar-install
cd /tmp/repogrammar-install
curl -fsSLO \
https://github.com/SioYooo/RepoGrammar/releases/download/v0.4.3/install.sh
curl -fsSLO \
https://github.com/SioYooo/RepoGrammar/releases/download/v0.4.3/install.sh.sha256Verify the installer itself on macOS:
shasum -a 256 -c install.sh.sha256On Linux, use sha256sum -c install.sh.sha256 instead. Then install the CLI:
bash install.sh --version v0.4.3 --install-cli-only --yes
export PATH="$HOME/.local/bin:$PATH"
repogrammar versionThe expected output is repogrammar 0.4.3. The installer downloads and
checksum-verifies the matching native archive and bundled Python worker,
installs the managed command under $HOME/.local/bin, and records the product
receipt. It does not configure a coding agent or create repository-local
.repogrammar/ state.
To make the PATH change persistent, add this line once to ~/.zshrc for Zsh or
~/.bashrc for Bash, then start a new shell:
export PATH="$HOME/.local/bin:$PATH"2. Optionally connect a coding agent
Skip this step when only the CLI is needed. To detect an installed Codex or Claude Code client and configure the read-only RepoGrammar MCP server globally:
repogrammar install --target auto --scope global --yes --no-telemetryRestart an already-running coding-agent session after this command completes. Agent installation does not initialize a repository and does not edit global instruction files by default.
3. Initialize each repository
Every repository needs its own local RepoGrammar state and index:
cd /path/to/repository
repogrammar init --project "$PWD" --yes
repogrammar status \
--project "$PWD"init creates .repogrammar/, builds the active index, and starts that
repository's optional autosync daemon by default. Do not manually edit
.repogrammar/. For CI or a deterministic one-shot index, use:
repogrammar init \
--project "$PWD" \
--yes \
--no-autosync \
--progress neverRun init once in every additional repository. The CLI and coding-agent
integration are machine-level installations and do not need to be repeated.
There is no global repository scanner.
For machine-readable status and recovery guidance:
repogrammar status --project "$PWD" --json
repogrammar doctor --project "$PWD" --jsonFollow the reported recovery action instead of manually modifying
.repogrammar/. If the shell reports repogrammar: command not found, run
export PATH="$HOME/.local/bin:$PATH" and verify that
$HOME/.local/bin/repogrammar exists.
Already have Node.js? The same immutable version is also available through the thin npm launcher:
npx --yes --package @sioyooo/repogrammar@0.4.3 repogrammar versionSee the full quickstart
for advanced installation, CI, explicit instruction synchronization, manual
sync, and cleanup. Use repogrammar uninstall --dry-run to preview complete
managed-machine removal, repogrammar disconnect --target all --yes to remove
only agent integrations, and
repogrammar uninit --project /path/to/repository --yes to remove one
repository's local index.
Five-minute judge testing path
After cloning this repository and completing the installation above, run the following commands from the RepoGrammar repository root. This path exercises the installed release binary, repository initialization, storage readiness, family inventory, and one source-backed pattern lookup without requiring Rust or Cargo:
repogrammar version
repogrammar init \
--project "$PWD" \
--yes \
--no-autosync \
--progress never
repogrammar status --project "$PWD"
repogrammar families --project "$PWD"
repogrammar find \
"src/fixtures/python/release/v0_1/positive-strong-evidence/routes.py:7" \
--project "$PWD" \
--mode compact \
--verbosity minimalThe expected evidence is:
repogrammar versionreports0.4.3;status reports an initialized repository, available storage, and an active generation;
familiesreports ready implementation pattern groups; andfindreportspattern family found, identifiesPython · FastAPI Route, and returns a bounded source span to read. It still states that dynamic or runtime behavior remains unproven.
If coding-agent integration was enabled, verify the native MCP registration as an additional machine-level check:
codex mcp get repogrammar --json
# or: claude mcp get repogrammarFor the full recorded judge journey—including a target-repository patch, runtime test, stale-evidence rejection, explicit sync, and cleanup—follow the Build Week demo runbook.
What you get
Pattern families — repeated, compatible implementations with support, variation, exception, and counterexample context.
Metadata-first evidence — repo-relative paths, content hashes, bounded ranges, provenance, and unresolved obligations; source spans are opt-in.
Prioritized read plans — the smallest source-backed set the agent should inspect before making a change.
Static alignment — a conservative check of whether a target matches an evidenced family without upgrading static similarity into runtime proof.
Typed recovery — stale, ambiguous, dynamic, unsupported, and insufficient cases become
UNKNOWNorPARTIAL_CONTEXTwith an explicit next action.
Latest in 0.4.3
Area | Current behavior |
Onboarding |
|
Queries | Exact-first resolution also understands qualified concept phrases such as |
Conformance |
|
Freshness | Query-time hashes reject stale evidence; explicit |
Efficiency | Dependency-aware incremental sync and Python interface hashes avoid unnecessary rebuild work while full/incremental equivalence gates protect results. |
Metrics | Source-free query-outcome accounting reports estimated potential read displacement across outcomes; it is not measured token savings or a causal result. |
See the changelog for the complete version history and the CLI specification for the exact command contract.
How it stays trustworthy
Discover locally. Language adapters and bounded semantic workers extract structural facts without executing target-repository application code.
Qualify conservatively. Tree-sitter proposes candidates; syntax similarity alone cannot prove family membership.
Return metadata first. Results preserve hashes, bounded locations, provenance, evidence strength, and remaining read obligations.
Enforce freshness. Each repository owns its
.repogrammar/SQLite generations and optional daemon; there is no global repository scanner.Abstain by type. Unsupported confidence becomes an actionable typed result, not a hidden fallback.
The Rust implementation follows a dependency-inverted
core → ports → application → adapters → interfaces architecture. Read the
architecture overview
and MCP contract
for the deeper design.
Language and framework boundary
Language | Current evidence boundary |
Python — FastAPI, pytest, Pydantic, SQLAlchemy | Official Python-first scope with bounded framework-family context |
TypeScript / JavaScript — Express, Jest/Vitest, Mocha/ | Conservative exact-anchor preview; React and React Native remain unsupported |
Rust — internal patterns plus bounded serde, thiserror, Tokio, clap, and axum anchors | Structural preview; no macro expansion, trait-resolution, or runtime claim |
Java/Spring, C#, C/C++ | Conservative structural preview; no runtime or build-system equivalence claim |
Go, PHP, Ruby, Swift | File discovery only; not analyzed or supported |
RepoGrammar is pre-1.0. Its MCP API and preview analyzers remain experimental, and it is not a sound whole-program static analyzer or a runtime-equivalence oracle. Stable artifacts target macOS arm64/x86_64 and glibc Linux arm64/x86_64 at the documented minimum versions; Windows and musl are not public release targets.
RepoGrammar itself does not call an LLM, embeddings API, vector database, or cloud model. Python 3.10 or newer is required for the bounded Python analyzer; Rust/Cargo is not required for the verified release path. The exact safety and platform boundaries live in limitations.
Built with AI, directed by a human
RepoGrammar was developed through a human-directed GPT-5.6 workflow. ChatGPT helped plan and review the work; Codex implemented and tested scoped changes; the human maintainer owns the product insight, architecture, evidence policy, scope, review, merge authority, and public approvals.
OpenAI Build Week is a launch milestone, not the product boundary. Competition recording and submission material stays in the demo runbook and launch kit, leaving this README focused on the developer tool.
Community
Start with the general quickstart, Codex guide, or Claude Code guide.
Browse the documentation map and known limitations.
Report bugs or propose improvements with the repository's issue templates.
Review CONTRIBUTING, SECURITY, and the Code of Conduct before contributing.
RepoGrammar is licensed under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceLocal-first codebase intelligence engine providing AI coding agents with a typed MCP toolset for understanding and navigating code repositories.10051Apache 2.0
- AlicenseBqualityDmaintenanceLocal-first codebase context engine that parses code into a ranked dependency graph and serves it to AI tools via MCP for deep structural understanding.581MIT
- AlicenseDqualityBmaintenanceRead-only repository context explorer for coding agents. Provides repository exploration tools via CLI or MCP adapter.1GPL 3.0
- Alicense-qualityAmaintenancePrivacy-first, read-only repo intelligence for AI coding agents: scans local codebases and recommends MCP servers, repos, and research without sending data to the cloud.1Apache 2.0
Related MCP Connectors
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SioYooo/RepoGrammar'
If you have feedback or need assistance with the MCP directory API, please join our Discord server