{{ config.title }}

# eruka-mcp

MCP server for Eruka context memory. Tells AI agents what it knows, thinks, what's stale, and what it doesn't know.

Open Eruka Dashboard →

cargo install eruka-mcp

## Knowledge States

Every piece of context has a confidence state — AI agents receive constraint text that prevents hallucination:

State | Confidence | Meaning | Agent Behavior
--- | --- | --- | ---
CONFIRMED | 1.0 | User verified ground truth | Use directly
INFERRED | 0.45-0.85 | AI extracted, high confidence | Use with caveat
UNCERTAIN | 0.05-0.30 | Was confirmed, now stale | Flag as possibly outdated
UNKNOWN | 0.0 | Needed but missing | DO NOT fabricate

### 13 MCP Tools

Read, write, search context. Detect gaps. Get constraints. Assess quality. Compress for token efficiency. All via JSON-RPC over stdio or SSE.

### Anti-Hallucination

Constraint injection prevents AI agents from making things up. Before generation, Eruka checks readiness and injects: `"DO NOT fabricate: revenue. This field is UNKNOWN."`

### Service Key Auth

Authenticate with `eruka_sk_*` service keys. Scope enforcement (read/write/admin). Input validation with length limits. Per-key rate limiting.

### Tier Gating

Free tier: 8 core tools. Pro tier: +temporal queries, research. Enterprise: all 13 tools including compression and quality scoring.

## Tools Reference

Tool | Description | Tier
--- | --- | ---
`eruka_get_context` | Read context fields by path or prefix | Free
`eruka_write_context` | Write a field with knowledge state | Free
`eruka_search_context` | Hybrid keyword + vector search | Free
`eruka_get_completeness` | Category coverage report | Free
`eruka_get_gaps` | List missing knowledge areas | Free
`eruka_detect_gaps` | Detect gaps with constraint text | Free
`eruka_get_constraint` | Anti-hallucination constraint for a task | Free
`eruka_get_voice` | Brand voice and tone guidelines | Free
`eruka_get_related` | Knowledge graph traversal | Pro
`eruka_add_relationship` | Add entity relationship | Pro
`eruka_get_context_compressed` | Token-efficient compressed context | Enterprise
`eruka_query_temporal` | Time-range context queries | Pro
`eruka_research_gap` | Auto-research missing knowledge | Enterprise

## Quick Start

    # Install
    cargo install eruka-mcp

    # Set environment
    export ERUKA_API_URL=https://eruka.dirmacs.com
    export ERUKA_API_KEY=eruka_sk_your_key_here

    # Add to Claude Desktop (~/.config/claude/claude_desktop_config.json)
    {
      "mcpServers": {
        "eruka": {
          "command": "eruka-mcp",
          "args": ["--api-url", "https://eruka.dirmacs.com", "--api-key", "eruka_sk_..."]
        }
      }
    }

    # Add to Claude Code
    claude mcp add eruka -- eruka-mcp --api-url https://eruka.dirmacs.com --api-key eruka_sk_...

## Architecture