Borrowing it
Nothing to install: this file belongs to michaelalber/grounded-code-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/michaelalber/grounded-code-mcp/main/AGENTS.mdgit clone --depth 1 https://github.com/michaelalber/grounded-code-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/michaelalber/grounded-code-mcp/agents-md)<a href="https://agentmods.dev/instructions/michaelalber/grounded-code-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/michaelalber/grounded-code-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/michaelalber/grounded-code-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/michaelalber/grounded-code-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02685 | $0.02685 |
| Opus 5.5 | $0.01074 | $0.01074 |
| Sonnet 5.5 | $0.00537 | $0.00537 |
| Haiku 4.5 | $0.00268 | $0.00268 |
Grade A, and why
grounded-code-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
grounded-code-mcp — Project Context
Global rules (TDD, security, quality gates, Python standards, AI behavior) are in
~/.config/opencode/AGENTS.mdand apply here automatically. This file contains only what is specific to this project.
Project Overview
- Name: grounded-code-mcp
- Purpose: Local MCP server providing RAG over a persistent knowledge base of vetted technical documentation; eliminates hallucination by grounding AI coding assistant responses in authoritative sources.
- Phase: Maintain
- Jira project key: N/A — tracked via GitHub issues
- Confluence space: N/A
- Definition of success: Any AI coding session using this server produces grounded, citation-backed responses with zero reliance on training-data guesses for covered domains.
Technology Stack
- Language: Python 3.10–3.12
- Framework: FastMCP (<3) for MCP server; Click + Rich for CLI
- Vector store: Qdrant (primary), ChromaDB (fallback)
- Document parsing: Docling ≥2.70.0
- Embeddings: Ollama — model:
snowflake-arctic-embed2(1024-dim, 8192-token context) - Configuration: TOML + Pydantic v2
- Test framework: pytest + pytest-asyncio + pytest-cov
- CI/CD: GitHub Actions —
.github/workflows/ci.yml(lint, type-check, test matrix 3.10–3.12, dep-audit) +security.yml(Semgrep, Bandit, CodeQL, Trivy) - Package manager: pip / hatchling build; runtime install via pipx
Architecture
- Pattern: Ingest pipeline → vector search → MCP tool layer. Transport is stdio (default) or HTTP (local only, binds
127.0.0.1). - Entry points:
src/grounded_code_mcp/__main__.py— Click CLI (ingest,serve,status,search)src/grounded_code_mcp/server.py— FastMCP server and all MCP tool handlers
- Key directories:
src/grounded_code_mcp/— production source (8 pipeline modules)tests/— pytest unit tests; integration tests marked@pytest.mark.integrationsources/— knowledge base documents organised by collection subdirectory.grounded-code-mcp/— runtime data: Qdrant storage,manifest.jsonscripts/— utility scripts (doc downloaders).github/workflows/— CI definitions
- Non-obvious constraints:
- CLI is installed via pipx, not
.venv. After any code change runpipx install ".[all]" --force. - Ollama must be running with
snowflake-arctic-embed2pulled before ingest or search. - Qdrant must be running (Docker Compose or system service) for vector operations.
- Ingest jobs must run sequentially — parallel ingest causes OOM. Never run two collections simultaneously.
- Collection names in queries use the bare suffix (e.g.,
"rust"); the server prependsgrounded_automatically. - Machine-specific config (Ollama host, Qdrant URL, port overrides) belongs in
~/.config/grounded-code-mcp/config.toml, never in the committedconfig.toml. - Flash Attention 2 (optional, GPU-only):
pip install flash-attn --no-build-isolationRequires CUDA toolkit and an Ampere+ GPU (RTX 30xx/40xx, A100, H100). Enable in config.toml:cuda_use_flash_attention2 = trueunder[docling].
- CLI is installed via pipx, not
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 185 lines · 2,685 tokens per session scan A a5aada6f7447
grounded-code-mcp AGENTS.md is an instructions file published in the GitHub repository michaelalber/grounded-code-mcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 2,685 tokens to every session, about $0.0107 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
grounded-code-mcp AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| grounded-code-mcp AGENTS.mdmichaelalber/grounded-code-mcp | Instructions file | 0 | 3mo ago | MIT | A | 2,685 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |