# cite - Full MCP Documentation > cite is the citation layer for agentic workflows: an open citation graph of documents, annotations, and the edges between them. It exposes a Model Context Protocol (MCP) server so agents can list corpuses, search documents and annotations, and follow citation edges. Released as OpenContracts since 2019; rebranded as cite for the v3 release line. ## MCP Server Overview cite exposes a read-only MCP server so that AI assistants can access public corpuses, documents, annotations, and discussion threads without authentication. - Global endpoint: https://cite.opensource.legal/mcp/ - Corpus-scoped endpoint: https://cite.opensource.legal/mcp/corpus/{corpus_slug}/ - Protocol: JSON-RPC 2.0 (MCP specification 2025-03-26) - Transport: Streamable HTTP (recommended), SSE (deprecated) - Authentication: None required (public data only) - Rate limit: 100 requests/minute per IP - Security: Read-only, slug-based identifiers, no internal IDs exposed ## Connecting ### Claude Desktop (Global Access) Add to `~/.config/Claude/claude_desktop_config.json`: ```json { "mcpServers": { "cite": { "command": "npx", "args": ["mcp-remote", "https://cite.opensource.legal/mcp/"] } } } ``` ### Claude Desktop (Corpus-Scoped) ```json { "mcpServers": { "my-corpus": { "command": "npx", "args": ["mcp-remote", "https://cite.opensource.legal/mcp/corpus/MY_CORPUS_SLUG/"] } } } ``` ### Direct HTTP (curl) ```bash curl -X POST https://cite.opensource.legal/mcp/ \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' ``` ## Tools Reference ### list_public_corpuses List public corpuses visible to anonymous users. Parameters: - limit (int, default 20, max 100): Number of results - offset (int, default 0): Pagination offset - search (string, optional): Filter by title or description Returns: { total_count, corpuses: [{ slug, title, description, document_count, created }] } Example request: ```json { "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "list_public_corpuses", "arguments": { "limit": 10 } }, "id": 1 } ``` ### list_documents List documents in a public corpus. Parameters: - corpus_slug (string, required): Corpus identifier - limit (int, default 50, max 100): Number of results - offset (int, default 0): Pagination offset - search (string, optional): Filter by title or description Returns: { total_count, documents: [{ slug, title, description, file_type, page_count, created }] } ### get_document_text Retrieve full extracted text from a document. Parameters: - corpus_slug (string, required): Corpus identifier - document_slug (string, required): Document identifier Returns: { document_slug, page_count, text } ### list_annotations List annotations on a document with optional filtering. Parameters: - corpus_slug (string, required): Corpus identifier - document_slug (string, required): Document identifier - page (int, optional): Filter by page number - label_text (string, optional): Filter by label text - limit (int, default 100, max 100): Number of results - offset (int, default 0): Pagination offset Returns: { total_count, annotations: [{ id, page, raw_text, annotation_label: { text, color, label_type }, structural, created }] } ### search_corpus Semantic vector search within a corpus. Falls back to text search if embeddings are unavailable. Parameters: - corpus_slug (string, required): Corpus identifier - query (string, required): Search query text - limit (int, default 10, max 50): Number of results Returns: { query, results: [{ type, slug, title, similarity_score }] } ### list_threads List discussion threads in a corpus or document. Parameters: - corpus_slug (string, required): Corpus identifier - document_slug (string, optional): Filter to a specific document - limit (int, default 20, max 100): Number of results - offset (int, default 0): Pagination offset Returns: { total_count, threads: [{ id, title, message_count, is_pinned, is_locked }] } ### get_thread_messages Retrieve all messages in a thread. Parameters: - corpus_slug (string, required): Corpus identifier - thread_id (int, required): Thread identifier - flatten (bool, default false): Return flat list instead of tree Returns: { thread_id, title, messages: [{ id, content, author, created_at, replies? }] } ## Resources Reference Resources use URI patterns for direct content access via the `resources/read` method. ### corpus://{corpus_slug} Corpus metadata including title, description, document count, label set, and timestamps. ### document://{corpus_slug}/{document_slug} Document metadata and full extracted text. Returns JSON with fields: slug, title, description, file_type, page_count, text_preview (first 500 characters of extracted text), full_text (complete extracted text), created (ISO 8601 timestamp), corpus (corpus slug). The text_preview field is useful for quick inspection without consuming the full text, which can be large. ### annotation://{corpus_slug}/{document_slug}/{annotation_id} Annotation details including raw text, label, page number, bounding box coordinates, and created timestamp. ### thread://{corpus_slug}/threads/{thread_id} Discussion thread with hierarchical message tree. Example: ```json { "jsonrpc": "2.0", "method": "resources/read", "params": { "uri": "document://my-corpus/contract-2024" }, "id": 1 } ``` ## REST Search API A lightweight JSON search endpoint is available at `https://cite.opensource.legal/api/search/` for crawlers and integrations that prefer simple HTTP GET over GraphQL or MCP. ### GET /api/search/ Parameters (query string): - q (string, required): Search query text - corpus (string, optional): Corpus slug to scope the search - limit (int, optional, default 10, max 50): Number of results Example: ```bash curl 'https://cite.opensource.legal/api/search/?q=indemnification&corpus=my-corpus&limit=5' ``` Returns: { query, corpus?, results: [{ type, slug, title, description, similarity_score }] } When a corpus is specified, semantic vector search is attempted first and falls back to text matching. Without a corpus, the endpoint searches across all public corpus titles/descriptions and document titles/descriptions. ## Corpus-Scoped Endpoints When using `https://cite.opensource.legal/mcp/corpus/{corpus_slug}/`, the `corpus_slug` parameter is automatically injected into all tool calls. The `list_public_corpuses` tool is replaced by `get_corpus_info` which returns detailed information about the scoped corpus. Scoped endpoints are ideal for sharing - the URL contains the corpus context, so collaborators do not need to know the corpus slug. ## Available Collections The following public corpuses are currently available on this instance: ### DGCL New - Slug: `DGCL-New` - Documents: 2 - Corpus-scoped MCP: `https://cite.opensource.legal/mcp/corpus/DGCL-New/` ### No. 24-413 — Department of Education, et al. v. Career Colleges and Schools of Texas - Slug: `No-24-413-Department-of-Education-et-al-v-Career-Colleges-and-Schools-of-Texas` - Documents: 27 - Corpus-scoped MCP: `https://cite.opensource.legal/mcp/corpus/No-24-413-Department-of-Education-et-al-v-Career-Colleges-and-Schools-of-Texas/` ### No. 25-332 — Donald J. Trump, President of the United States, et al. v. Rebecca Kelly Slaughter, et al. - Slug: `No-25-332-Donald-J-Trump-President-of-the-United-States-et-al-v-Rebecca-Kelly-Slaughter-et-al` - Documents: 186 - Corpus-scoped MCP: `https://cite.opensource.legal/mcp/corpus/No-25-332-Donald-J-Trump-President-of-the-United-States-et-al-v-Rebecca-Kelly-Slaughter-et-al/` ### South Carolina - Slug: `South-Carolina` - Documents: 1251 - Description: Exploring South Carolina's Legal Framework Executive Summary South Carolina's legal corpus encapsulates a robust set of regulations designed to provide clarity and structure across various domains, including governance, public welfare, and economic development. This overview highlights key themes that emerge from the extensive collection of legal documents. Key Themes Administrative Law: Focuses on state governance through the South Carolina Administrative Law Court and related procedures, ensuring fair adjudication and rule-making. Public Finance: Governs the state's financial operations, including bonds, public funds, and financial accountability, supporting economic stability and growth. Local Governance: Outlines the roles and responsibilities of municipal entities, ensuring effective local administration and facilitating community-centric governance. Public Welfare: Laws such as the Omnibus Adult Protection Act reflect South Carolina's commitment to protecting vulnerable populations and strengthening social safety nets. Detailed Insights The South Carolina Code is a living document, regularly updated to reflect contemporary needs and challenges. Key insights include: Legal Code Management: The Code Commissioner plays a crucial role in maintaining the integrity of South Carolina's legal code, ensuring it remains current and comprehensive. Economic Incentives: Initiatives like the High Growth Small Business Job Creation Act aim to bolster economic development through strategic financial measures. Conclusion The South Carolina legal framework is a testament to the state's commitment to governance, economic stability, and public welfare. By maintaining a comprehensive and adaptive legal code, South Carolina ensures that it meets the evolving needs of its citizens and supports a robust economic environment. - Corpus-scoped MCP: `https://cite.opensource.legal/mcp/corpus/South-Carolina/` ### SpaceX (Space Exploration Technologies Corp.) - Form S-1 IPO Registration Statement - Slug: `New-Import-5` - Documents: 20 - Description: SpaceX (Space Exploration Technologies Corp.) - Form S-1 IPO Registration Statement SEC EDGAR Form S-1 registration statement (IPO prospectus) filed by Space Exploration Technologies Corp., CIK 0001181412, accession 0001628280-26-036936, filed 2026-05-20. Includes the prospectus plus resolved exhibits. Generated by edgar-fetch (V2 corpus-export pipeline). Filings: 1 Documents: 19 Cross-filing references resolved: 18 Annotation-anchored relationships emitted: 18 Scrape timestamp: 2026-05-21T03:40:02.126689+00:00 Query cik: 0001181412 filing_type: S-1 date: 2026-05-20 - Corpus-scoped MCP: `https://cite.opensource.legal/mcp/corpus/New-Import-5/` ## Architecture ``` MCP Client <--JSON-RPC 2.0--> ASGI Router (/mcp/*) | +--------+--------+ | | Global Server Corpus-Scoped Server (all corpuses) (single corpus, cached) | | +--------+--------+ | Django ORM visible_to_user() (AnonymousUser) ``` ## Links - [Source code](https://github.com/Open-Source-Legal/cite) - [Project home](https://cite.opensource.legal) - [MCP specification](https://modelcontextprotocol.io)