mcpField
K
Koma Core MCP

Koma Core MCP

Local
github.comMemory & Knowledge13Updated 2w ago

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

  1. 01Search a public document index
  2. 02Retrieve full documents by source ID
  3. 03Require a matching access tier
  4. 04Filter search by category or tag

Use cases

  1. 01Let agents discover documents without exposing their content
  2. 02Retrieve documents according to user access tier
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"swnotmetal-koma-core": {
"command": "npx",
"args": [
"-y",
"koma-core-mcp"
],
"env": {
"KOMA_MASTER_KEY": "<KOMA_MASTER_KEY>"
}
}
}
}
Run commandnpx -y koma-core-mcp
Environment variables to set
KOMA_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.

Packages
npmkoma-core-mcp0.1.1

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
tagstringNoFilter by tag (e.g. "api", "guide")
limitnumberNoMaximum results to return. Default: 20
categorystringNoFilter by category (e.g. "docs", "internal")

Details

From the project README

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

ToolWhat it doesAccess
search_docsSearch the public index — returns metadata, never contentPublic
retrieve_docFetch full content by source IDRequires 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 category
  • tag (optional) — filter by tag
  • limit (optional) — max results

Returns metadata only: displayName, category, tags, accessTier, preview. No content, no token.

retrieve_doc
  • sourceId (required) — the document source ID from search_docs
  • userTier (required) — public | premium | enterprise

Returns full content only if userTier ≥ the document's tier.

Seed Data

Three demo documents are ingested on startup:

sourceIdTier
guide-getting-startedpublic
api-referencepremium
internal-architectureenterprise

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

Markdown supported

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.