kb-mcp
Allows searching and retrieving Confluence pages, including full document content, through MCP tools like search_confluence and get_document.
Allows searching code from GitHub source files, with syntax-aware chunking and retrieval through MCP tools like search_code and get_document.
Allows searching and retrieving JIRA issues and comments, with support for code links and full thread retrieval via MCP tools like search_jira and get_document.
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., "@kb-mcpsearch for checkpoint restore stall"
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.
Anatomy of a Knowledge Base
An open-source, runnable teaching implementation of the architecture in Cerebras's "How We Built Our Knowledge Base". Not affiliated with Cerebras; inspired by their write-up. Everything here is real and runnable against a fictional company, Helios: real Postgres, real pgvector, real local embeddings, real Cerebras calls if you bring a key, and a fixture corpus (Confluence, JIRA, GitHub, a bucket of docs) sized to actually demonstrate cross-source retrieval instead of just describing it.
flowchart TD
subgraph Sources
CONF[Confluence fixtures]
JIRA[JIRA fixtures]
GH[GitHub fixtures]
BUCKET[Bucket fixtures]
end
CONF --> DIST[Distillation: LLM extractors]
JIRA --> DIST
BUCKET --> DIST
GH --> CHUNK[Chunking: no LLM, syntax boundaries]
DIST --> EMB[(embeddings table: pgvector + tsvector)]
CHUNK --> EMB
EMB --> RET[Five retrievers in parallel]
RET --> FUSE[RRF fusion, dedupe, per-parent cap]
FUSE --> RERANK[LLM rerank, 0 to 10]
RERANK --> EXPAND[Context expansion, post-rank]
EXPAND --> SYN[Planner, executor, synthesis]
SYN --> SURF[CLI, MCP server, web UI]Four sources feed one Postgres table. Confluence and JIRA and the bucket go through LLM distillation so a noisy transcript becomes a searchable artifact; GitHub goes through a syntax-aware chunker instead, no LLM required. Every query then runs five retrievers in parallel, fuses them with reciprocal rank fusion, optionally reranks the survivors with an LLM, and only expands context for candidates that made the final cut. packages/core implements all of it once; the CLI, MCP server, and web UI are thin clients over the same functions, not three separate reimplementations.
Quickstart
podman compose up -d # or docker compose up -d, starts Postgres and pgvector
pnpm install
cp .env.example .env # add a Cerebras key (free tier: cloud.cerebras.ai), or skip for retrieval-only
pnpm kb init
pnpm kb ingest # 5 to 45 min with a key, tier-dependent; ~3 min raw-text mode without one
pnpm kb search "why does checkpoint restore stall?" --project helios-eng --explainThat last command returns real ranked evidence in seconds, with or without a key. With one, --explain also shows LLM rerank scores.
Related MCP server: Atlassian MCP Server
Three surfaces, one library
CLI (packages/cli): kb search --explain, kb get, kb ask --trace, kb who-knows. Real, trimmed:
1. HEL-482: Checkpoint restore stalls after manifest load on 128-shard clusters (jira://HEL-482)
2. HEL-482 comment by Priya Natarajan (jira://HEL-482)
3. Runbook: NFS Mount Troubleshooting / Symptoms of a bad mount (confluence://HELIOS/HEL-008)MCP server: Claude Code discovers it from the committed .mcp.json the moment it opens the repo; any other MCP client adds it with claude mcp add kb -- pnpm --dir /path/to/repo kb-mcp or its equivalent. Eight LLM-free tools (search, get_document, search_confluence, search_jira, search_code, who_knows, list_projects, status) that any MCP client orchestrates itself, with input schemas generated from the parameters each tool actually reads. search returns ranked guesses; get_document dereferences any result's url into the full artifact, the whole JIRA thread, every section of a page, an entire source file. JIRA rows also carry links: file paths distillation extracted from the thread, existence-checked, ready to hand back to get_document for a code-grounded hop. The full operating pattern an agent should run is docs/11-agent-playbook.md. Real search_code({ query: "HELIOS_PREFETCH_DEPTH" }) result:
src/checkpoint/loader.ts:19 /** Warm the shard cache ahead of restore. Prefetch depth is read from
src/config/env.ts:16 /** HELIOS_PREFETCH_DEPTH controls how many shards the checkpoint loaderWeb UI: pnpm web, then open localhost:8787. One page, SSE-streamed. Real event from /api/ask:
event: answer
data: {"stage":"answer","text":"Checkpoints are retained for 14 days, as a decision in May 2026
reduced the retention from the previously documented 30 days [4][5][6]..."}Full tour, with a worked MCP transcript and the SSE-to-UI mapping: docs/07-surfaces.md.
Eval
pnpm eval grades fourteen golden questions against retrieval alone (no LLM); pnpm eval --live adds Cerebras rerank. Two are questions the corpus deliberately cannot answer: raw fusion always fills its row budget, so only a scoring layer can say "nothing relevant here", and the abstention questions hold rerank to exactly that. Two more are hop trajectories graded on terminal evidence: search must surface the incident ticket, the ticket's distilled links must dereference through get_document, and the landing file must contain the flag or error the question is really about. Real scorecards from this store:
golden eval, retrieval only: 10/12 passed, 2 skipped, MRR 0.48
golden eval, live rerank: 14/14 passed, MRR 0.69Retrieval-only misses restore-stall (the code chunk lands just outside the fused top 10) and paraphrase-serving (no shared vocabulary with the fixture), and skips the abstention pair it cannot grade; live rerank recovered both misses on this run and scored every row of both unanswerable questions at or below 3 of 10. The MRR number is the early-warning trend: an expected hit sliding from rank 2 to rank 9 moves it long before a miss flips a PASS to FAIL. Rerank is an LLM call and the corpus comes from LLM distillation, so neither number is fixed: re-ingesting the same fixtures reorders results, and this scorecard has moved between 8 and 10 of 10 across runs, which is exactly why the eval exists instead of a one-off spot check. See docs/05-fusion-rerank.md for a reproducible worked example of rerank demoting a code chunk on this same question.
Models
Stage | Model | Env override | Why |
Distillation |
|
| strongest structured extraction, runs once per document |
Planner |
|
| tool selection is a cheap classification pass |
Rerank |
|
| fastest model fits a batched 0-to-10 scoring call |
Synthesis |
|
| the user-facing cited answer deserves the strongest writer |
Embeddings are local and free: Xenova/bge-small-en-v1.5 via @huggingface/transformers, 384 dimensions, no key required for ingestion or retrieval-only search.
Docs
Page | What it teaches |
the vertical stack and reading order | |
one table, why it wins, the metadata field inventory | |
the connector contract, idempotency, three layers of fault isolation | |
embed the artifact not the transcript, a real thread walked end to end | |
five retrievers, two measured surprises about IDF and full-text | |
RRF with real fixture numbers, rerank's honest miss | |
planner, executor, synthesis, and a real trust-boundary callout | |
CLI, MCP, web UI, and what degrades without a key | |
every demo simplification, named, next to its production fix | |
a fifth source, in under 60 lines | |
the onboarding path: run it, read one search, then design | |
the operating pattern for AI agents: signals, hops, abstention | |
the maintainer's page: invariants, the change-to-file map, verification, operational lessons |
What this is not
No authentication, no authorization, no audit trail. No live connectors: every source is a fixture reader over static files, not a Confluence, JIRA, GitHub, or S3 API integration. No tombstones, no partitioning, no read replicas. This is a teaching implementation of the collection and query pillars, deliberately, with every simplification named instead of hidden: see docs/08-scaling.md for the full list and what each one costs at real scale.
License
MIT. See 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
- Flicense-qualityDmaintenanceAn MCP server implementation for interacting with self-hosted Confluence Data Center or Server instances via search, content retrieval, and optional write operations. It features space auto-discovery, audit logging, and granular access control for secure enterprise collaboration.
- Flicense-qualityDmaintenanceEnables AI assistants to search and retrieve data from Jira and Confluence directly within MCP-compatible IDEs. It provides tools for managing Jira tickets and Confluence pages using OAuth 2.0 authentication and Hexagonal Architecture.
- AlicenseAqualityCmaintenanceProvides MCP tools to search, retrieve, and answer questions from the public Open Finance Brasil Confluence documentation using BM25-based local indexing.4MIT
- Alicense-qualityCmaintenanceMCP server for searching and retrieving pages from Atlassian Confluence.361MIT
Related MCP Connectors
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Agentic search over your Dewey document collections from any MCP-compatible client.
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/gabrielrojasnyc/anatomy-of-a-knowledge-base'
If you have feedback or need assistance with the MCP directory API, please join our Discord server