Documentation

MCP Server

The Context-Fabric MCP (Model Context Protocol) server enables AI assistants like Claude to query corpora directly. This is functionality unique to Context-Fabric—it has no Text-Fabric equivalent.

What is MCP?

The Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. Context-Fabric's MCP server exposes corpus operations as tools that AI assistants can invoke.

Why Use the MCP Server?

  • Natural language queries: Ask questions in plain English instead of writing code
  • Iterative exploration: Refine queries conversationally based on results
  • No programming required: Researchers can access corpus data without Python knowledge
  • AI-assisted analysis: Let Claude help interpret patterns and suggest follow-up queries

Getting Started

  1. Install: pip install context-fabric[mcp]
  2. Configure: Add to your Claude Desktop configuration
  3. Query: Start asking questions about your corpus

See Server Setup for detailed installation instructions.

Available Tools

The MCP server provides 11 tools organized into three categories:

Discovery Tools

  • list_corpora - List loaded corpora
  • describe_corpus - Corpus structure overview
  • list_features - Browse available features
  • describe_feature - Feature details with sample values
  • get_text_formats - Text encoding samples

Search Tools

  • search - Pattern-based search with multiple output modes
  • search_continue - Paginate through results
  • search_csv - Export results to CSV file
  • search_syntax_guide - Query syntax documentation

Data Access Tools

  • get_passages - Retrieve text by section reference
  • get_node_features - Batch feature lookup

Tutorials

Guides