Borrowing it
Nothing to install: this file belongs to jeanibarz/knowledge-base-mcp-server. 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/jeanibarz/knowledge-base-mcp-server/main/CLAUDE.mdgit clone --depth 1 https://github.com/jeanibarz/knowledge-base-mcp-serverWrote 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/jeanibarz/knowledge-base-mcp-server/claude-md)<a href="https://agentmods.dev/instructions/jeanibarz/knowledge-base-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/jeanibarz/knowledge-base-mcp-server/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.
<a href="https://agentmods.dev/instructions/jeanibarz/knowledge-base-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/jeanibarz/knowledge-base-mcp-server/claude-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.01564 | $0.01564 |
| Opus 5.5 | $0.00626 | $0.00626 |
| Sonnet 5.5 | $0.00313 | $0.00313 |
| Haiku 4.5 | $0.00156 | $0.00156 |
Grade A, and why
knowledge-base-mcp-server CLAUDE.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 today.
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 — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
knowledge-base-mcp-server — Agent Instructions
Local-first knowledge-base MCP server and kb CLI backed by embedded FAISS indexes and pluggable embedding providers (HuggingFace, Ollama, or OpenAI).
Working on this repo
Build / test / run
npm install
npm run build # tsc → build/index.js (chmod +x, stdio-executable)
npm test # build + test:parallel (--maxWorkers=4) + test:serial (--runInBand) — must stay green
npm run dev # node --watch --import tsx src/index.ts for iteration
node build/index.js # runs the server over stdio (clients launch it this way)
Key architecture
- Transport:
src/KnowledgeBaseServer.tsstarts stdio by default and can opt into SSE or streamable HTTP viaMCP_TRANSPORT. HTTP/SSE mode requiresMCP_AUTH_TOKENand defaults to loopback. - MCP tool surface: tools are registered in
KnowledgeBaseServer.registerTools(). Current tools includelist_knowledge_bases,retrieve_knowledge,ask_knowledge,list_models,kb_stats,diff_index,find_related,list_facets,recommend_knowledge_base,export_citations,add_document,delete_document, andreindex_knowledge_base. - CLI surface:
src/cli.tsis thekbdispatcher. Command-specific behavior lives insrc/cli-*.ts; shared command-independent logic belongs in*-core.tshelpers. - Embeddings:
FaissIndexManageris constructed for a concrete(provider, modelName)pair. Provider defaults come fromEMBEDDING_PROVIDERplus provider-specific model env vars. - Index layout:
$FAISS_INDEX_PATH/active.txtselects a model id. Each model stores metadata and versioned FAISS data under$FAISS_INDEX_PATH/models/<model_id>/. Seemodel-storage-layout.ts(paths, sentinel) andmodel-resolution.ts(active-model resolution) — they decide and enforce this layout, so read them before changing any index path. - Indexing strategy: per-file SHA256 hashes and chunk manifests in
<kb>/.index/let a refresh skip content that has not changed, so re-indexing costs embedding calls only for what moved. To stop concurrent writers from corrupting an index, mutating refreshes take a per-model write lock and save new index versions atomically. - Logging:
logger.tswrites only to stderr (and optionallyLOG_FILE). Writing to stdout corrupts the JSON-RPC stream — this is a landed bug, never reintroduceconsole.loginside the server process.
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.
- today Changed · +20 tokens per session 4ed4cd1ff8b6
- 11d ago Changed · +16 tokens per session 68de7b33fd28
- 14d ago Changed · +5 tokens per session bce7c883e6a8
- 2mo ago Changed · +43 tokens per session e08887c7f1f3
- 2mo ago First seen · 68 lines · 1,480 tokens per session scan A 0f2d523c9cfd
knowledge-base-mcp-server CLAUDE.md is an instructions file published in the GitHub repository jeanibarz/knowledge-base-mcp-server (53 stars, last pushed yesterday), licensed Unlicense. It adds 1,564 tokens to every session, about $0.0063 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-30.
knowledge-base-mcp-server CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge-base-mcp-server CLAUDE.mdjeanibarz/knowledge-base-mcp-server | Instructions file | 53 | yesterday | Unlicense | A | 1,564 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | 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 |