About Koma Core MCP
Koma Core MCP exposes protected RAG storage to AI agents through public metadata search and tier-gated document retrieval. It is an in-memory reference implementation that demonstrates separating discovery from authorization.
Key features
- 01Search a public document index
- 02Retrieve full documents by source ID
- 03Require a matching access tier
- 04Filter search by category or tag
Use cases
- 01Let agents discover documents without exposing their content
- 02Retrieve documents according to user access tier
- 03Demonstrate authorization boundaries in a RAG workflow
MCP support
Exposes `search_docs` for metadata-only discovery and `retrieve_doc` for full content when the supplied `userTier` meets the document's tier.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y koma-core-mcpKOMA_MASTER_KEYSecretHKDF master key for content tokens (demo key fallback if unset)Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
2Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| tag | string | No | Filter by tag (e.g. "api", "guide") |
| limit | number | No | Maximum results to return. Default: 20 |
| category | string | No | Filter by category (e.g. "docs", "internal") |
Details
From the project READMEKoma Core MCP
Expose Koma Core's protected RAG storage as MCP tools for AI agents.
npm install koma-core-mcp
What it demonstrates
Discovery ≠ Authorization. Agents can search the public index, but retrieve private content only with the correct access tier.
| Tool | What it does | Access |
|---|---|---|
search_docs | Search the public index — returns metadata, never content | Public |
retrieve_doc | Fetch full content by source ID | Requires userTier ≥ document tier |
Setup
# Optional: set a master key for token derivation (default is a demo key)
export KOMA_MASTER_KEY=your-32-byte-minimum-secret
Claude Desktop
{
"mcpServers": {
"koma-core": {
"command": "npx",
"args": ["-y", "koma-core-mcp"]
}
}
}
Tools
search_docs
category(optional) — filter by categorytag(optional) — filter by taglimit(optional) — max results
Returns metadata only: displayName, category, tags, accessTier, preview. No content, no token.
retrieve_doc
sourceId(required) — the document source ID fromsearch_docsuserTier(required) —public|premium|enterprise
Returns full content only if userTier ≥ the document's tier.
Seed Data
Three demo documents are ingested on startup:
| sourceId | Tier |
|---|---|
guide-getting-started | public |
api-reference | premium |
internal-architecture | enterprise |
Security Boundary
This is an in-memory reference implementation — no persistence, demo master key. For production, implement the DatabaseAdapter interface against a real database and provide a real master key. See koma-core's README for the full security boundary.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.