# Context Repo — Full Agent Context > Context Repo is the AI context management platform. Save prompts and > documents with version history, organize them in collections, and access > them from ChatGPT, Claude, Cursor, and 90+ MCP-compatible clients via a > 26-tool MCP server (28 registrations including OpenAI Apps SDK > search/fetch). This file inlines a curated, hand-authored, agent-readable knowledge pack. Other agent surfaces: - /llms.txt Index file (60-100 lines, llmstxt.org spec) - /openapi.json OpenAPI 3.1 spec for the 29 REST operations - /api/openapi.yaml YAML mirror of the OpenAPI spec - /index.md Markdown rendering of the homepage - /pricing.md Plain markdown pricing reference - /agent Machine-readable capability catalog (JSON or markdown) - /.well-known/mcp.json MCP discovery (SEP-1649) - /.well-known/agent.json OpenAI ai-plugin manifest - /.well-known/agent-card.json A2A Agent Card - /.well-known/mcp/server-card.json MCP server card (28 tools) - /.well-known/api-catalog RFC 9727 linkset - /.well-known/oauth-protected-resource/v1 RFC 9728 (REST) - /.well-known/oauth-protected-resource/mcp RFC 9728 (MCP) - /.well-known/oauth-authorization-server RFC 8414 ================================================================ WHEN TO USE CONTEXT REPO ================================================================ Use Context Repo when an agent needs to: 1. RETRIEVE A VERSIONED PROMPT TEMPLATE - Pull a stored prompt by id or by semantic search - Inspect or restore previous versions - Cross-reference prompt parameters and target model 2. SEARCH A USER'S OWN KNOWLEDGE WORKSPACE - Semantic / 1536-dim vector search across prompts, documents, collections - Literal title/description search when exact-match is required - Hierarchical "deep search" inside long documents (chunk-level) - Citation-ready Company-Knowledge results for ChatGPT Apps SDK 3. STORE NEW CONTEXT FROM AN AGENT WORKFLOW - Create / update prompts and documents (with auto-embedding) - Add items to collections for later retrieval - Capture web pages via Firecrawl ingestion - Process 75+ file formats via LlamaIndex Cloud 4. SYNC CONTEXT ACROSS CLIENTS - Same workspace visible from Claude, Cursor, ChatGPT, VS Code, Windsurf, Factory, Amp, Chrome Extension, and 90+ other MCP-compatible clients - REST API for non-MCP automation - Real-time sync via Convex subscriptions in the web dashboard ================================================================ WHEN NOT TO USE CONTEXT REPO ================================================================ - As a vector-DB SUBSTITUTE for a high-volume RAG pipeline (Context Repo is workspace-scoped; per-user storage is not unbounded.) - For GENERAL WEB SEARCH or live news retrieval (No web crawler or live index — use a search API.) - For TEAM-WIDE shared workspaces or org-level RBAC (Workspaces are per-user. Sharing is via JWT/API-key delegation, not multi-tenant team accounts.) - As a CONVERSATION HISTORY store for an LLM chat client (Use the client's own history; Context Repo stores reusable artifacts.) - As a CMS for human-rendered content (No WYSIWYG editor; markdown-only document model.) - For real-time STREAMING agent telemetry (Mutations are transactional; no event-stream surface today.) ================================================================ PLATFORM AT A GLANCE ================================================================ Built on: Next.js 15 (App Router, Turbopack) + Convex (real-time backend) + Clerk (auth + billing) + TypeScript strict mode License: Proprietary (https://contextrepo.com/policies) Status: Pre-launch SaaS; subscription-gated dashboard Region: Vercel global edge + Convex serverless Domain: contextrepo.com Support: support@contextrepo.com CONTENT MODEL prompts Versioned text templates with optional `${variable}` placeholder syntax (clients interpolate at call time). Per-prompt: title, description, content, target engine, parameters, change-log per version. documents Markdown / plain-text knowledge artifacts with full version history, automatic 1536-dim embeddings, and chunk-level "deep search" navigation. Origins: manual, file upload (75+ formats via LlamaIndex), web scrape (Firecrawl). collections Folders that group prompts and documents, optionally colored / iconed. Items can belong to multiple collections. Pro Max+ unlocks RAG chat across a collection. AUTH Clerk handles all user auth. Three Bearer-token shapes are accepted: - Session JWT (logged-in dashboard / extension users) - oat_* Clerk OAuth user-delegation token (ChatGPT MCP connector) - mt_* / ak_* Clerk M2M / Clerk-managed API key Plus first-party API key: - gm__ via header Authorization: API-Key gm_... JWT/oat_ tokens bypass scope gates; mt_/ak_ and gm_ keys MUST carry the requested scope (prompts.read, prompts.write, documents.read, documents.write, documents.scrape). Auth metadata: /.well-known/oauth-authorization-server (RFC 8414), /.well-known/oauth-protected-resource/v1 (REST, RFC 9728), /.well-known/oauth-protected-resource/mcp (MCP, RFC 9728). RATE LIMITS (per authenticated user, sliding window) scrape 10 requests / 60 s (POST /v1/documents/scrape) api 100 requests / 60 s (POST/PATCH/DELETE/PUT, search, pd/*) readonly 120 requests / 60 s (GET /v1/...; pd/read; pd/expand) Headers on 429 only: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (ISO 8601), Retry-After (seconds) Behavior is fail-open if Upstash Redis is unavailable. ================================================================ MCP SERVER ================================================================ Endpoint: https://contextrepo.com/mcp Transport: streamable-http (legacy SSE is disabled) Discovery: /.well-known/mcp.json (SEP-1649) Server card: /.well-known/mcp/server-card.json (28 tools) Auth: OAuth 2.1 (Clerk) OR Bearer API key npm package: context-repo-mcp npx: npx -y context-repo-mcp Cursor one-click install (deeplink): cursor://anysphere.cursor-deeplink/mcp/install?name=context-repo&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNvbnRleHQtcmVwby1tY3AiXSwiZW52Ijp7IkNPTlRFWFRSRVBPX0FQSV9LRVkiOiIifX0= Claude Desktop / generic MCP config: { "mcpServers": { "context-repo": { "command": "npx", "args": ["-y", "context-repo-mcp"], "env": { "CONTEXTREPO_API_KEY": "" } } } } TOOL CATEGORIES (28 registrations) USER (1) get_user_info authenticated user identity + permissions PROMPTS (7) search_prompts list / search prompts read_prompt full prompt body + variables create_prompt new prompt update_prompt edit (content edit -> new version) delete_prompt delete (irreversible) get_prompt_versions version history restore_prompt_version roll back to a past version DOCUMENTS (7) list_documents paginated list get_document full document body create_document new document (auto-embeds) update_document edit (content edit -> new version + re-index) delete_document delete (irreversible) get_document_versions version history restore_document_version roll back COLLECTIONS (7) list_collections paginated list get_collection membership + metadata create_collection new collection update_collection edit metadata delete_collection delete (items NOT deleted) add_to_collection attach items remove_from_collection detach items CATALOG SEARCH (1) find_items semantic OR literal across prompts / documents / collections OPENAI APPS SDK COMPANY-KNOWLEDGE (2) search flat citation-ready result set fetch full content of a single id DEEP SEARCH (3) deep_search vector-similarity inside document chunks deep_read single chunk with hierarchy metadata deep_expand navigate up / down / next / previous / surrounding from a chunk ================================================================ REST API (29 OPERATIONS UNDER /v1) ================================================================ Spec: https://contextrepo.com/openapi.json (OpenAPI 3.1, JSON) YAML: https://contextrepo.com/api/openapi.yaml Catalog: /.well-known/api-catalog (RFC 9727 linkset) TAGS prompts | documents | collections | search | progressive-disclosure | user OPERATIONS (29, with REST verbs) listCollections GET /v1/collections createCollection POST /v1/collections 201 + Location getCollection GET /v1/collections/{id} getCollectionItems GET /v1/collections/{id}/items updateCollection PATCH /v1/collections/{id} deleteCollection DELETE /v1/collections/{id} 200 + {success,id} addItemsToCollection POST /v1/collections/{id}/items removeItemsFromCollection PUT /v1/collections/{id}/items (PUT because DELETE-with-body is non-standard) listDocuments GET /v1/documents createDocument POST /v1/documents 201 + Location getDocument GET /v1/documents/{id} getDocumentVersions GET /v1/documents/{id}/versions updateDocument PATCH /v1/documents/{id} deleteDocument DELETE /v1/documents/{id} 200 + {success,id} restoreDocumentVersion POST /v1/documents/{id}/restore scrapeUrl POST /v1/documents/scrape 202 Accepted listPrompts GET /v1/prompts createPrompt POST /v1/prompts 201 + Location getPrompt GET /v1/prompts/{id} getPromptVersions GET /v1/prompts/{id}/versions updatePrompt PATCH /v1/prompts/{id} deletePrompt DELETE /v1/prompts/{id} 200 + {success,id} restorePromptVersion POST /v1/prompts/{id}/restore search GET /v1/search pdSearch POST /v1/pd/search pdExpand POST /v1/pd/expand pdRead GET /v1/pd/read/{chunkId} pdCreateSession POST /v1/pd/session getMe GET /v1/user/me STANDARD ENVELOPES Single resource: { "data": { ... } } List resource: { "data": [...], "pagination": { "cursor", "hasMore" } } Search: { "data": { "documents": [...], "prompts": [...], "collections": [...] }, "meta": { "query", "semantic", "latencyMs" } } Delete (M-048): { "success": true, "id": "" } Error: { "error": { "code": , "message": "", "details": } } RESPONSE STATUS CODES IN USE 200 success on GET / PATCH / search / DELETE (M-048) 201 resource created 202 scrape accepted (async) 400 validation / malformed input 401 unauthenticated / verification failed 403 insufficient permission scope 404 not found 413 payload too large 429 rate limit exceeded (with rate-limit headers) 500 internal error fallthrough ================================================================ PRICING ================================================================ 3-day free trial of the Pro plan. Pro $19.99 / mo (or $17.99 / mo billed annually) ChatGPT App, Claude Desktop MCP, OAuth MCP Server, API key access, Prompt / Document / Collection storage with version history, 75+ file format processing, semantic search, Chrome Extension. Pro Max $49.99 / mo (or $44.99 / mo billed annually) Everything in Pro + Collection Chat (RAG-powered Q&A with source citations), expanded storage limits, priority support. Ultimate $99.99 / mo (or $79.99 / mo billed annually) Everything in Pro Max + Eleven Labs audio generation, AI Workflows (scheduled automations), maximum storage capacity. Pricing source-of-truth: Clerk Billing dashboard. Live signup: https://contextrepo.com/pricing ================================================================ INTEGRATIONS (named, first-party) ================================================================ - Claude Desktop (MCP) - Cursor (MCP, one-click deeplink install) - ChatGPT (Custom GPT App, OAuth via Clerk) - VS Code (Copilot, MCP) - Windsurf (MCP) - Factory (MCP) - Amp (MCP) - Chrome Extension (Firecrawl-based web capture) - REST API client (Bearer / API-key) - context-repo-mcp npm package (standalone CLI / programmatic) 90+ additional MCP-compatible clients in the broader ecosystem are protocol-compatible. Concrete compatibility is bounded by support for the MCP "streamable-http" transport. ================================================================ ERROR HANDLING REFERENCE ================================================================ All REST and MCP errors use the same wire format: { "error": { "code": 400, "message": "Title is required when creating a prompt", "details": { "field": "title" } } } Common error scenarios: 400 Missing required field, invalid Convex ID, schema validation 401 Missing Authorization header, token verification failed 403 Token / API-key lacks the required scope for this operation (writes need prompts.write or documents.write; scrape accepts documents.scrape OR documents.write) 404 Resource not found OR resource not owned by the authenticated user (resources are workspace-scoped; cross-user access is impossible and surfaces as 404, not 403) 413 Body too large; field-level cap is 2 MB per content field 429 Rate limit exceeded; consult headers and Retry-After 500 Unexpected handler error; transient — retry idempotently if safe ================================================================ DESIGN CONSTRAINTS AGENTS SHOULD KNOW ================================================================ - Vector dimension: 1536 (text-embedding-3-small). Mismatched embeddings silently fail; agents that supply pre-computed vectors must match. - Document body cap: 2 MB per content field on the wire (REST_WIRE_FIELD_CAP_BYTES). Agents that construct large documents should chunk before upload. - Per-collection RAG chat is Pro Max+ — Pro tier gets storage but not chat-over-collection. - Prompts store `${variable}` placeholders verbatim. Interpolation is the CLIENT'S responsibility at call time. - Pagination cursors are opaque base64 strings; do not parse them. - Default page size is 20; max is 100. - DELETE returns 200 + {success,id}, not 204. This is intentional for MCP-client compatibility (M-048). - List endpoints return at most 100 items per page; agents that need full enumeration must follow `pagination.cursor` until `hasMore=false`. ================================================================ CONTACT ================================================================ Email: support@contextrepo.com X: https://x.com/contextrepo GitHub: https://github.com/Gitmaxd/context-repo-mcp Docs: https://contextrepo.com/docs Status: https://contextrepo.com/ (no dedicated status page yet) Last verified: 2026-04-27