{
  "name": "Context Repo MCP Server",
  "description": "29-tool MCP server for AI context management — prompts, documents with required numeric revision CAS, collections, semantic search, deep search, ChatGPT App compatibility through OpenAI Apps SDK Company Knowledge (search/fetch), and synthesized cited reasoning.",
  "version": "2.0.3",
  "serverUrl": "https://contextrepo.com/mcp",
  "transport": "streamable-http",
  "authentication": {
    "type": "oauth2",
    "authorization_server": "https://contextrepo.com/.well-known/oauth-authorization-server",
    "protected_resource": "https://contextrepo.com/.well-known/oauth-protected-resource/mcp",
    "methods": [
      {
        "type": "oauth2",
        "authorization_server": "https://contextrepo.com/.well-known/oauth-authorization-server",
        "protected_resource": "https://contextrepo.com/.well-known/oauth-protected-resource/mcp"
      },
      {
        "type": "api_key",
        "header": "Authorization",
        "scheme": "API-Key gm_..."
      }
    ]
  },
  "documentationUrl": "https://contextrepo.com/docs",
  "resources": [
    {
      "uri": "contextrepo://openapi",
      "description": "Public OpenAPI 3.1 specification for the Context Repo REST API."
    },
    {
      "uri": "ui://search-results",
      "description": "Optional MCP Apps search-results UI, registered only when the server feature flag is enabled.",
      "conditional": true
    }
  ],
  "tools": [
    { "name": "get_user_info", "description": "Gets information about the authenticated Context Repo user." },
    { "name": "search_prompts", "description": "List prompts in the authenticated user's workspace. The optional search value filters the fetched page by title or description only. For literal prompt-body or semantic matching, use find_items." },
    { "name": "read_prompt", "description": "Get the full details of a specific prompt including its content and variables." },
    { "name": "create_prompt", "description": "Create a new prompt template." },
    { "name": "update_prompt", "description": "Update an existing prompt; content edits create a new version row." },
    { "name": "delete_prompt", "description": "Permanently delete a prompt. This action cannot be undone." },
    { "name": "get_prompt_versions", "description": "List every recorded prompt version with its change log and a content preview of up to 200 characters." },
    { "name": "restore_prompt_version", "description": "Restore a prompt to a previous version." },
    { "name": "list_documents", "description": "List a page of documents belonging to the authenticated user." },
    { "name": "get_document", "description": "Get document content up to the REST response limit and available canonical revision metadata: revision/currentVersion, contentHash, lastChangedAt, snapshotCompleteness, actor, origin, and ETag. Use deep_search for targeted retrieval from large documents." },
    { "name": "create_document", "description": "Create a new text document." },
    { "name": "update_document", "description": "Update canonical document fields with required `expectedRevision` from get_document or the latest successful acknowledgement. Makes one atomic REST write with no preflight GET. On REVISION_MISMATCH, read and reapply against the latest content. Documents using managed editing must use the REST coordination workflow. Returns a compact acknowledgement; no-op writes do not create another revision." },
    { "name": "delete_document", "description": "Permanently delete a document. This action cannot be undone." },
    { "name": "get_document_versions", "description": "Get the version history of a document." },
    { "name": "restore_document_version", "description": "Restore a version with required `expectedRevision`, the current document revision rather than the target version number. Makes one atomic REST write with no preflight GET. On REVISION_MISMATCH, read and reapply against the latest content. Documents using managed editing must use the REST coordination workflow. Returns a compact acknowledgement and may warn LEGACY_PARTIAL_SNAPSHOT." },
    { "name": "list_collections", "description": "List a page of collections belonging to the authenticated user." },
    { "name": "get_collection", "description": "Get collection details and, by default, up to 50 member items." },
    { "name": "create_collection", "description": "Create a new collection to organize prompts and documents." },
    { "name": "update_collection", "description": "Update a collection's metadata." },
    { "name": "delete_collection", "description": "Delete an empty collection. The collection must be empty; remove all member items first. Removing items from the collection does not delete the prompts or documents." },
    { "name": "add_to_collection", "description": "Add documents or prompts to a collection." },
    { "name": "remove_from_collection", "description": "Remove documents or prompts from a collection." },
    { "name": "find_items", "description": "Search the user's own workspace for prompts, documents, and collections matching a query. Read-only. Returns grouped item-level matches with type-specific IDs; semantic mode includes scores, and snippets appear only when available. Literal mode (semantic=false) searches titles, descriptions, and indexed document body text via hierarchical chunks — full-body literal matching, eventually consistent with chunking; for passage-level retrieval inside documents, use deep_search. The separate search compatibility tool can also return prompts in semantic results; deep_search operates on document chunks only. Returns up to 10 matches per type (prompts, documents, collections) per call." },
    { "name": "search", "description": "OpenAI Apps SDK Company Knowledge search returning citation-ready results compatible with the ChatGPT App." },
    { "name": "fetch", "description": "OpenAI Apps SDK Company Knowledge fetch returning full prompt content, document content up to the REST response limit, or collection metadata with up to 50 member items for an id from `search`. Use deep_search for targeted retrieval from large documents." },
    { "name": "deep_search", "description": "Search within document content using vector similarity and return ranked, hierarchical chunks." },
    { "name": "deep_read", "description": "Retrieve a single document chunk with full content and hierarchy metadata." },
    { "name": "deep_expand", "description": "Navigate the document hierarchy from a chunk in 5 directions (up, down, next, previous, surrounding)." },
    { "name": "reason", "description": "Ask a question and get a best-effort cited answer with inline citations and non-exhaustive limitations. Disagreements appear as ordinary cited statements in the answer. Read-only; document content only." }
  ]
}
