> ## Documentation index
> Fetch the complete documentation index at: https://contextrepo.com/docs/llms.txt
> Use it to find every page before exploring further.

# Context Repo Documentation

> Official documentation for Context Repo, the AI context repository for prompts, documents, and collections. Set up authenticated MCP access, integrate the REST API, manage versioned prompt templates, and run semantic search across your knowledge base.

## Welcome to Context Repo

Context Repo is a **context repository** for AI agents and humans, a single home for the prompts, documents, and collections you reuse across compatible AI tools. The documentation here covers everything from a five-minute install to the deep mechanics of the 29-tool Model Context Protocol (MCP) server, the REST API, the dashboard, the Chrome extension, and the ChatGPT App.

These docs are written for two audiences in equal measure. Humans setting up Context Repo for the first time get task-oriented guides with screenshots, copy-paste commands, and one-click install paths. AI agents and crawlers get a clean H1→H2→H3 structure, an `/docs/llms.txt` section pack, a markdown `.md` variant of every resource article, and explicit `.well-known/` discovery surfaces so the same content is reachable through the channel that fits the consumer.

The fastest path to a working install is the [Quickstart](https://contextrepo.com/docs/getting-started/quickstart): sign up, save one prompt, connect your AI client, and run your first `find_items` call in under five minutes.

## What's in these docs

- [Getting Started](https://contextrepo.com/docs/getting-started): Sign up, create your first versioned prompt, choose a plan, and connect an AI assistant in under five minutes.
- [Dashboard](https://contextrepo.com/docs/dashboard): Manage prompts, documents, collections, semantic search, and per-user API keys from the web dashboard.
- [Concepts](https://contextrepo.com/docs/concepts/content-formats): Understand how Context Repo stores prompts, documents, and collections, and which file formats are supported at ingest.
- [MCP Server](https://contextrepo.com/docs/mcp): Connect through authenticated Streamable HTTP, ChatGPT OAuth, or the local stdio bridge.
- [API Reference](https://contextrepo.com/docs/api): Integrate the REST API at /v1 using Bearer JWTs (Clerk OAuth) or first-party gm\_\* API keys.
- [Webhooks](https://contextrepo.com/docs/webhooks): Outbound workspace-event webhooks are not yet available — see the page for the planned delivery surface and current alternatives.
- [Integrations](https://contextrepo.com/docs/integrations): Connect Context Repo to Grok or ChatGPT with OAuth, and install the Chrome extension for one-click capture.
- [FAQ](https://contextrepo.com/docs/faq): Plain-language answers to the questions humans and agents ask before signing up.

## How Context Repo works

Three primitives sit at the centre of the product: **prompts** (versioned templates with `${variable}` placeholders), **documents** (text artifacts parsed from 75+ source formats and chunked at three hierarchy levels), and **collections** (named groups that scope retrieval and access). Every primitive belongs to one authenticated user and carries its own version history on every content edit.

Four surfaces reach into the same repository and read from the same source of truth:

- The **dashboard** at `contextrepo.com/dashboard` for humans editing content directly.
- The **MCP server** at `contextrepo.com/mcp` with 29 tools (27 power tools plus the OpenAI Apps SDK `search` and `fetch` aliases) for Model Context Protocol clients. Grok uses the dedicated `contextrepo.com/grok-mcp` OAuth compatibility entrypoint to reach the same tools.
- The **REST API** under `/v1` for programmatic integrations that prefer plain HTTP.
- The **Chrome extension** for one-click capture from any open browser tab.

For the longer-form architecture walkthrough, see the resources cluster: [What Is an AI Context Repo for Agents?](https://contextrepo.com/resources/what-is-an-ai-context-repo-for-agents) and [Semantic Search and Deep Search: Two Retrieval Layers](https://contextrepo.com/resources/semantic-search-and-deep-search-two-retrieval-layers).

## Standards and protocols

Context Repo uses open standards so compatible AI tools can connect through documented transports and authentication methods:

- **[Model Context Protocol](https://modelcontextprotocol.io)** over streamable HTTP transport with JSON-RPC framing. The MCP server advertises all 29 tools at [`/.well-known/mcp.json`](https://contextrepo.com/.well-known/mcp.json) and a full tool catalogue at [`/.well-known/mcp/server-card.json`](https://contextrepo.com/.well-known/mcp/server-card.json).
- **[OAuth 2.1 with PKCE](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1)** for the MCP transport. The authorization-server metadata follows [RFC 8414](https://datatracker.ietf.org/doc/html/rfc8414), and protected-resource metadata follows [RFC 9728](https://datatracker.ietf.org/doc/html/rfc9728). The canonical metadata is at [`/.well-known/oauth-protected-resource/mcp`](https://contextrepo.com/.well-known/oauth-protected-resource/mcp), while Grok uses [`/.well-known/oauth-protected-resource/grok-mcp`](https://contextrepo.com/.well-known/oauth-protected-resource/grok-mcp).
- **[OpenAPI 3.1](https://spec.openapis.org/oas/v3.1.0)** for the REST API. The machine-readable spec is at [`/openapi.json`](https://contextrepo.com/openapi.json) and a YAML mirror is at [`/api/openapi.yaml`](https://contextrepo.com/api/openapi.yaml). See [`/docs/api/endpoints`](https://contextrepo.com/docs/api/endpoints) for the full reference and request/response examples.
- **OpenAI `text-embedding-3-small`** at 1536 dimensions for every prompt, document, and chunk in the index. The vector index is pinned to that dimension, so retrieval stays consistent across queries and ingest.
- **Three authentication modes** at the HTTP layer: Clerk session JWT, OAuth access token (`oat_*`), and first-party API key (`gm_*`). See [`/docs/api/authentication`](https://contextrepo.com/docs/api/authentication) for setup and scope rules.

## Documentation for AI agents

If you are an AI agent or a crawler reading these docs on behalf of someone else, here are the machine-readable surfaces designed for you:

- [`/docs/llms.txt`](https://contextrepo.com/docs/llms.txt): section-scoped llms.txt for the documentation subtree (this set of pages).
- [`/llms.txt`](https://contextrepo.com/llms.txt): site-wide context pack covering the marketing site, dashboard, MCP server, REST API, and resources cluster.
- [`/llms-full.txt`](https://contextrepo.com/llms-full.txt): the single-fetch full agent context pack.
- [`/.well-known/mcp.json`](https://contextrepo.com/.well-known/mcp.json): MCP server capability advertisement (SEP-1649).
- [`/.well-known/agent-card.json`](https://contextrepo.com/.well-known/agent-card.json): A2A agent skills catalogue.
- [`/AGENTS.md`](https://contextrepo.com/AGENTS.md): public agent-instructions file for any agent touching this codebase.
- [`/resources/<slug>.md`](https://contextrepo.com/resources): plain-markdown variant of every resource article, with Mermaid diagrams converted back to fenced ` ```mermaid ` blocks so agents see clean markdown instead of MDX JSX.

Use the surface that matches the consumer: the streamable HTTP MCP transport for live tool calls, the REST API for programmatic integration, the `llms.txt` packs for grounding, and the HTML docs for human readers.
