grounded-code-mcp: Instructions file for Claude Code

CLAUDE.md

grounded-code-mcp CLAUDE.md is an instructions file for Claude Code from michaelalber/grounded-code-mcp. It costs 3,429 tokens per session, scanned B, original, MIT.

A project-specific instruction file for grounded-code-mcp, a local server that lets coding assistants search trusted technical documents. It also records the project's purpose, tools, structure, and working rules such as TDD, or test-driven development.

In plain words
What is it for?
Use it when working on grounded-code-mcp so responses and code changes follow its architecture, technology choices, testing rules, and security requirements.
Why use it?
It gives Claude Code the project's context and standards, reducing guesses about how the codebase works or how changes should be made.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is michaelalber/grounded-code-mcp's own configuration. It tells Claude Code how to work on grounded-code-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything grounded-code-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/michaelalber/grounded-code-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/michaelalber/grounded-code-mcp

Made for: Claude Code.

Wrote 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.

agentmods badge for grounded-code-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/michaelalber/grounded-code-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/michaelalber/grounded-code-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/michaelalber/grounded-code-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/michaelalber/grounded-code-mcp/claude-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.

agentmods 80×15 button for grounded-code-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/michaelalber/grounded-code-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/michaelalber/grounded-code-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,429 This file is loaded in full into every session.
When invoked 3,429 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.03429 $0.03429
Opus 5.5 $0.01372 $0.01372
Sonnet 5.5 $0.00686 $0.00686
Haiku 4.5 $0.00343 $0.00343

Measured 2mo ago against content hash 995353596492, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

grounded-code-mcp CLAUDE.md scanned grade B with 1 finding 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo launchctl kickstart -k system/<launchdaemon-label>
CLAUDE.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Global rules (TDD, security, quality gates, Python standards, AI behavior) are in ~/.claude/CLAUDE.md and 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, convert, 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.integration
    • sources/ — knowledge base documents organised by collection subdirectory
    • .grounded-code-mcp/ — runtime data: Qdrant storage, manifest.json
    • scripts/ — utility scripts (doc downloaders)
    • .github/workflows/ — CI definitions
  • Non-obvious constraints:
    • CLI is installed via pipx, not .venv. After any code change run pipx install ".[all]" --force.
    • Ollama must be running with snowflake-arctic-embed2 pulled 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 prepends grounded_ automatically.
    • Machine-specific config (Ollama host, Qdrant URL, port overrides) belongs in ~/.config/grounded-code-mcp/config.toml, never in the committed config.toml.
    • convert runs Docling on binary sources and writes foo.pdf.md sidecars. Run before ingest on GPU machines; ingest then reads the sidecar and skips Docling entirely.
    • flash-attn is not in pyproject.toml — manual install only: pip install flash-attn --no-build-isolation. Requires CUDA toolkit + Ampere+ GPU. Enable via cuda_use_flash_attention2 = true in [docling].

Read the full file on GitHub · 212 lines

Changes

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.

  1. 2mo ago First seen · 212 lines · 3,429 tokens per session scan B 995353596492

Subscribe to this mod's changes

grounded-code-mcp CLAUDE.md is an instructions file published in the GitHub repository michaelalber/grounded-code-mcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 3,429 tokens to every session, about $0.0137 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

grounded-code-mcp CLAUDE.md compared with instructions from other repositories

grounded-code-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grounded-code-mcp CLAUDE.mdmichaelalber/grounded-code-mcpInstructions file03mo agoMITB3,429Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode