Skip to content

MCP Server

Hyper-Extract ships an MCP server so MCP-capable assistants (Claude Desktop, IDE agents, etc.) can query and export your Knowledge Abstracts over the Model Context Protocol.

It is read + export only — it never creates, mutates, or deletes a KA.


Install & Run

pip install 'hyperextract[mcp]'

# start the server (stdio transport)
he-mcp
# equivalent:
python -m hyperextract.mcp_server

The server reads your LLM/embedder configuration from ~/.he/config.toml — the same config the CLI uses, so run he config init ... first (see Configuration).


Connect it to an MCP client

Point your MCP client at the he-mcp command. For a Claude Desktop–style config:

{
  "mcpServers": {
    "hyper-extract": {
      "command": "he-mcp"
    }
  }
}

Tools

Tool Description Needs index Needs LLM
list_templates List available extraction templates
info Stats for a KA (template, counts, chunks, timestamps; include_sources for ledger rows)
search Semantic retrieval over a KA embedder
ask RAG question-answering over a KA
export_obsidian Export a KA to an Obsidian vault embedder
export_graphml Export a KA to GraphML (same as he export graphml) embedder
export_csv Export a KA to CSV tables (same as he export csv) embedder
export_jsonld Export a KA to JSON-LD (same as he export jsonld) embedder
export_cypher Export a KA to Cypher (same as he export cypher) embedder

All tools take a ka_path (a directory created by he parse). search/ask require an index — build it with he build-index.

export_obsidian requires the Obsidian export feature (see he export obsidian). If it is unavailable, the tool returns an explanatory message instead of failing. export_graphml / export_csv / export_jsonld / export_cypher use the same exporters as the CLI (see he export).


Example session

list_templates()                        → [{name: "general/biography_graph", ...}, ...]
info(ka_path="./tesla_kb")              → {nodes: 48, edges: 70, index_built: true, ...}
search(ka_path="./tesla_kb",
       query="War of Currents")          → {nodes: [...], edges: [...]}
ask(ka_path="./tesla_kb",
    question="Who were Tesla's rivals?")  → "Thomas Edison ..."
export_obsidian(ka_path="./tesla_kb",
                output="./vault")          → "Exported 49 notes to ./vault"
export_jsonld(ka_path="./tesla_kb",
              output="./tesla.jsonld")     → "Exported JSON-LD to ./tesla.jsonld"
export_cypher(ka_path="./tesla_kb",
              output="./tesla.cypher")     → "Exported Cypher to ./tesla.cypher"