MCP

tekmerdb-mcp is a Model Context Protocol server that bridges any MCP-compatible AI agent straight to the engine's HTTP API — the agent inserts facts, searches, and checks source reliability through normal tool calls, in plain language, with no API key and no cloud.

1 Nothing extra to install

tekmerdb-mcp ships in the same release tarball as the engine — Install already put it at /opt/tekmerdb/tekmerdb-mcp and enabled a tekmerdb-mcp.service systemd unit for it. There's no separate download or install step.

ls /opt/tekmerdb/tekmerdb-mcp
systemctl status tekmerdb-mcp

2 Pick a transport

Every mode talks to the engine at a hardcoded http://localhost:3000 — unlike tekmerdb-ingest, the MCP server must always run on the same machine as the engine. What changes between modes is how the agent reaches the MCP server itself.

ModeStarted withUse caseReachable from
stdio tekmerdb-mcp (default, no flag) Claude Desktop and other agents that spawn the binary as a local subprocess The same machine only — there's no network listener
SSE tekmerdb-mcp --sse Network-connected agents, remote clients, multi-user setups Any machine that can reach mcp_host:mcp_port (see Configure)

3 Connect Claude Desktop (stdio)

Add this to Claude Desktop's MCP server config:

{
  "mcpServers": {
    "tekmerdb": {
      "command": "/opt/tekmerdb/tekmerdb-mcp"
    }
  }
}

Restart Claude Desktop. The agent now has insert_pfo, search, get_pfo, get_source, register_source, and update_confidence available as tools.

4 Connect a remote agent (SSE)

sudo systemctl start tekmerdb-mcp
# or, run directly:
/opt/tekmerdb/tekmerdb-mcp --sse

Point the remote MCP client at:

http://<server-ip>:<mcp_port>/sse
⚠️ Impact: mcp_host defaults to 0.0.0.0 — reachable from the network out of the box — and SSE mode has no authentication. Only run it behind a firewall or on a trusted network.

5 Tools available to the agent

ToolWhat it does
insert_pfoInsert a new claim, with confidence and source. The source is registered automatically if it's new.
searchSemantic search for existing claims by natural-language query.
get_pfoRetrieve a specific claim by its UUID.
get_sourceLook up a source's reliability — effective weight, corroboration count, conflict count.
register_sourceRegister a new source ahead of time. Idempotent.
update_confidenceManually adjust a claim's confidence, with a documented reason for the audit trail.

6 Why this makes your agent more efficient

Without a memory layer, an agent either re-reads entire source documents every session or trusts everything a RAG pipeline hands back with equal weight — both cost context window and both waste reasoning on things already settled.

  • Recall instead of re-deriving. insert_pfo once when a fact is found; every future session calls search and gets it back instantly, instead of re-ingesting and re-reasoning over the same source material.
  • Smaller, targeted context. search returns only the k most relevant claims, not whole documents — fewer tokens spent per turn than stuffing raw retrieved text into the prompt.
  • Trust-weighted answers. get_source lets the agent check a source's track record before leaning on it, instead of treating every retrieved snippet as equally credible.
  • Self-correction with a paper trail. update_confidence lets the agent revise what it believes as new evidence arrives, with the reason captured for audit — instead of silently contradicting itself across sessions.