# OpenContracts > OpenContracts is an open-source document analytics platform for analyzing, annotating, and querying complex documents. It provides a Model Context Protocol (MCP) server for AI agent access. ## MCP Server This instance exposes a read-only MCP server that AI agents can connect to for accessing public corpuses, documents, annotations, and discussion threads. - Endpoint (global): https://api.staging.glitnirhealth.com/mcp/ - Endpoint (corpus-scoped): https://api.staging.glitnirhealth.com/mcp/corpus/{corpus_slug}/ - Protocol: JSON-RPC 2.0 (MCP spec 2025-03-26) - Auth: None required (public data only) - Rate limit: 100 requests/minute per IP ### Connecting Use any MCP-compatible client. For Claude Desktop, add to config: ```json { "mcpServers": { "opencontracts": { "command": "npx", "args": ["mcp-remote", "https://api.staging.glitnirhealth.com/mcp/"] } } } ``` ### Available Tools - `list_public_corpuses`: List all public corpuses (paginated, searchable) - `list_documents`: List documents in a corpus - `get_document_text`: Get full extracted text from a document - `list_annotations`: List annotations on a document (filter by page or label) - `search_corpus`: Semantic vector search within a corpus - `list_threads`: List discussion threads in a corpus - `get_thread_messages`: Get messages in a thread (flat or hierarchical) ### Available Resources (URI-based) - `corpus://{corpus_slug}` - Corpus metadata - `document://{corpus_slug}/{document_slug}` - Document with text - `annotation://{corpus_slug}/{document_slug}/{annotation_id}` - Annotation details - `thread://{corpus_slug}/threads/{thread_id}` - Discussion thread ## REST Search API A simple JSON search endpoint at `https://api.staging.glitnirhealth.com/api/search/?q=QUERY` is available for crawlers and lightweight integrations. ## Available Collections - **Utah Medicaid** (slug: `Utah-Medicaid`, 3 documents): Hello, these are all the Utah Medicaid documents corpus. - **Safeway 340B - Contract Pharmacy Agreements (Deprecated)** (slug: `Safeway-340B`, 7 documents): Safeway docs - **NWHS 340B Drug Discount Program Combined** (slug: `NWHS-340B-Drug-Discount-Program-2`, 8 documents): NWHS 340B Drug Discount Program all pdfs combined by year in order - **CVS - Contract Pharmacy Agreements** (slug: `CVS-Contract-Pharmacy-Agreements`, 1 documents): CVS Contract Pharmacy Agreements - **Hi School - Contract Pharmacy Agreements** (slug: `Hi-School-Contract-Pharmacy-Agreements`, 4 documents): Hi School - Contract Pharmacy Agreements - **Kroger - Contract Pharmacy Agreements** (slug: `Kroger-Contract-Pharmacy-Agreements`, 1 documents): Kroger - Contract Pharmacy Agreements - **Walgreens - Contract Pharmacy Agreements** (slug: `Walgreens-Contract-Pharmacy-Agreements`, 3 documents): Walgreens - Contract Pharmacy Agreements - **Walmart - Contract Pharmacy Agreements** (slug: `Walmart-Contract-Pharmacy-Agreements`, 3 documents): Walmart - Contract Pharmacy Agreements - **Walgreens - Third Party Administrator Agreements** (slug: `Walgreens-Third-Party-Administrator-Agreements`, 2 documents): Walgreens - Third Party Administrator Agreements - **Wellpartner - Third Party Administrator Agreements** (slug: `Wellpartner-Third-Party-Administrator-Agreements`, 4 documents): Wellpartner - Third Party Administrator Agreements - **Safeway 340B - Contract Pharmacy Agreements** (slug: `Safeway-340B-Contract-Pharmacy-Agreements`, 6 documents): Safeway docs ## Links - [Full MCP documentation](https://api.staging.glitnirhealth.com/llms-full.txt) - [Source code](https://github.com/Open-Source-Legal/OpenContracts) - [Project documentation](https://contracts.opensource.legal)