TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/exegia/corpora-py/llms.txt
Use this file to discover all available pages before exploring further.
cf-mcp command starts a FastMCP 2 server that exposes 11 corpus query tools to any MCP-compatible AI client. Assistants like Claude and GPT can use these tools to search annotated religious texts, retrieve passages, inspect node features, and paginate large result sets — all through the Model Context Protocol without writing a single line of Python.
The 11 Tools
| Category | Tool | Description |
|---|---|---|
| Discovery | list_corpora | List loaded corpora and the active one |
| Discovery | describe_corpus | Node types with counts, section hierarchy |
| Discovery | list_features | Browse features, filter by node type |
| Discovery | describe_feature | Metadata + top values by frequency |
| Discovery | get_text_formats | Available text encodings with samples |
| Search | search | Pattern search — results / count / statistics / passages |
| Search | search_continue | Paginate large result sets via cursor |
| Search | search_csv | Export results to a local CSV file |
| Search | search_syntax_guide | Inline query syntax documentation |
| Data | get_passages | Retrieve text by section reference |
| Data | get_node_features | Batch feature lookup for a list of nodes |
Starting the Server
Pass at least one--corpus flag pointing to a local corpus directory. The server defaults to stdio transport, which is the right choice for Claude Desktop and other local MCP clients.
Server Instructions
When a client first connects, the server sends this instruction string to orient the AI agent:“Query annotated text corpora via Context-Fabric. Start withThis primes the agent with the recommended discovery-first workflow before it makes any tool calls.describe_corpus()to understand the structure, thenlist_features()to see what data is available, thensearch()with a template to find patterns, thenget_passages()to read the matching text.”
Programmatic Use
You can embed the MCP server directly in a Python script by importingmcp and corpus_manager from the exegia.mcp package:
corpus_manager.load() resolves the path, loads the corpus via Context-Fabric, and registers it as the default. Calling mcp.run() blocks and serves requests until the process is terminated.
Transports
stdio, SSE, and streamable HTTP — when to use each and how to configure them.
Multi-Corpus
Load multiple named corpora in one server session and switch between them.
AI Workflow
The recommended six-step sequence for AI agents exploring a corpus.
Search Tool
Full reference for the
search() tool and its return types.