Sponsored by Deepsite.site

Context Repo Mcp Server

Created By
ContextRepoa month ago
*One workspace for your prompts, documents, and collections — accessible from every AI client you use.* Context Repo is an AI context management platform for capturing, organizing, versioning, and searching the knowledge artifacts you use with AI tools. This MCP server exposes **28 tools** that give Claude, Cursor, ChatGPT, Factory, Windsurf, Codex, Claude Code, and any other MCP-compatible client direct read-and-write access to your personal workspace — no copy-paste, no context loss between conversations. ## Features - **Prompts** — Full CRUD with version history, rollback, and semantic search across your prompt library - **Documents** — Markdown and plain-text storage with automatic chunking and 1536-dim vector embeddings - **Collections** — Named folders that group prompts and documents into project-scoped contexts - **Catalog Search** — `find_items` returns ranked results across prompts, documents, and collections in a single call (semantic by default, literal fallback) - **Deep Search** — Hierarchical document navigation: search ranked passages, then expand up to parents, down to children, or sideways to siblings for token-efficient exploration of long content - **Version History** — Every content edit creates a new version; restore any prompt or document to any previous state - **Real-time Sync** — Changes propagate instantly via Convex live queries; AI clients always see the latest content - **ChatGPT Apps Ready** — `search` and `fetch` are OpenAI Apps SDK Company-Knowledge eligible; `find_items` carries an optional `ui://` resource for inline result rendering ## Tools (28 total) | Category | Tools | |---|---| | User Info (1) | `get_user_info` | | Prompts (7) | `search_prompts` · `read_prompt` · `create_prompt` · `update_prompt` · `delete_prompt` · `get_prompt_versions` · `restore_prompt_version` | | Documents (7) | `list_documents` · `get_document` · `create_document` · `update_document` · `delete_document` · `get_document_versions` · `restore_document_version` | | Collections (7) | `list_collections` · `get_collection` · `create_collection` · `update_collection` · `delete_collection` · `add_to_collection` · `remove_from_collection` | | Catalog (1) | `find_items` | | Deep Search (3) | `deep_search` · `deep_read` · `deep_expand` | | ChatGPT Apps (2) | `search` · `fetch` | ## Authentication Two ways to connect: 1. **API Key** — Generate a scoped `gm_*` key at [contextrepo.com/dashboard/settings](https://contextrepo.com/dashboard/settings). Per-key permissions: `prompts.read`, `prompts.write`, `documents.read`, `documents.write`, `documents.scrape`. Sent as `Authorization: Bearer gm_...`. 2. **Clerk OAuth 2.0** — RFC 9728 protected-resource metadata at `/.well-known/oauth-protected-resource/mcp`, RFC 8414 authorization-server metadata at `/.well-known/oauth-authorization-server`. Standard OAuth flow for clients that support it. ## Use Cases - **Prompt library that follows you.** Stop copy-pasting prompts between Claude, Cursor, and ChatGPT. Maintain one canonical version, retrieve it from any client. - **Personal knowledge base.** Save research articles, documentation, and AI conversations with the [Context Repo Chrome Extension](https://contextrepo.com/chrome-extension), then pull them in as grounded context inside your AI tools. - **Project-scoped collections.** Separate workspaces per client, repo, or topic so an AI assistant only sees what's relevant to the task at hand. - **Version-controlled prompts.** Track how prompts evolve, A/B test variants, and roll back when an "improvement" turns out worse. - **Long-document exploration.** Deep Search navigates book-length documents passage by passage instead of dumping them into context — every chunk carries parent/child/sibling links the agent can walk. ## Compatibility Streamable HTTP transport, MCP spec ≥ 2025-03-26. Verified with Claude Desktop, Cursor, ChatGPT (via the OpenAI Apps SDK), Factory, Windsurf, Codex, Claude Code, VS Code (Continue), and Amp. Any MCP-compatible client should work. ## Resources - Website: [contextrepo.com](https://contextrepo.com) - Documentation: [contextrepo.com/docs](https://contextrepo.com/docs) - Pricing & free trial: [contextrepo.com/pricing](https://contextrepo.com/pricing) - Agent discovery: [contextrepo.com/llms.txt](https://contextrepo.com/llms.txt) - API reference: [contextrepo.com/openapi.json](https://contextrepo.com/openapi.json)
Content

Context Repo MCP Server

npm version Install to Cursor License: MIT

An MCP (Model Context Protocol) server that enables any MCP-compatible client to interact with your Context Repo prompts, documents, and collections — with progressive disclosure search for hierarchical document navigation.

Compatible MCP Clients

This server works with any MCP-compatible application, including:

What is MCP?

The Model Context Protocol is an open standard that allows AI assistants to securely connect to external data sources and tools. This server enables MCP clients to manage your Context Repo content directly.

Features

  • Semantic Search - Natural language search across all your content with AI-powered relevance matching
  • Prompt Management - Full CRUD with version history: list, view, create, update, delete, and restore prompts
  • Document Management - Full CRUD with version history: list, view, create, update, delete, and restore documents
  • Collection Management - Full CRUD: list, view, create, update, delete collections, plus add/remove items
  • Version History - View and restore previous versions of prompts and documents
  • Progressive Disclosure Search - Hierarchical document search with 3-level chunking (document → section → paragraph) and directional navigation
  • Secure Authentication - API key-based authentication

Prerequisites

  • Node.js 18 or higher
  • An MCP-compatible client application
  • Context Repo account with an API key

Installation

Option 1: Install globally from npm

npm install -g context-repo-mcp

Option 2: Run directly with npx

No installation needed - configure your MCP client to use npx (see configuration examples below).

Getting an API Key

  1. Sign in to Context Repo
  2. Go to SettingsAPI Keys
  3. Click Create API Key
  4. Select permissions:
    • prompts.read - For prompt management
    • documents.read - For document and collection access
  5. Copy the key (starts with gm_)

Client Configuration

Claude Desktop

Step 1: Locate the Configuration File

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Step 2: Open the Configuration File

macOS:

# Open in your default editor
open -e "$HOME/Library/Application Support/Claude/claude_desktop_config.json"

# Or create it if it doesn't exist
mkdir -p "$HOME/Library/Application Support/Claude"
touch "$HOME/Library/Application Support/Claude/claude_desktop_config.json"

Windows: Navigate to %APPDATA%\Claude\ in File Explorer and open or create claude_desktop_config.json.

Step 3: Add the Context Repo Server

Add the context-repo entry to your mcpServers object:

{
  "mcpServers": {
    "context-repo": {
      "command": "npx",
      "args": ["-y", "context-repo-mcp"],
      "env": {
        "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
      }
    }
  }
}

If you already have other MCP servers configured, add context-repo alongside them:

{
  "mcpServers": {
    "existing-server": {
      "command": "...",
      "args": ["..."]
    },
    "context-repo": {
      "command": "npx",
      "args": ["-y", "context-repo-mcp"],
      "env": {
        "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
      }
    }
  }
}

Step 4: Restart Claude Desktop

macOS: Press Cmd+Q to fully quit, then reopen Claude Desktop.

Windows: Press Alt+F4 or right-click the system tray icon and quit, then reopen.

Step 5: Verify Connection

  1. Open a new conversation in Claude Desktop
  2. Look for the MCP tools indicator (hammer icon 🔨) in the bottom-right of the input box
  3. Click it to see "context-repo" listed with a green status

Cursor IDE

One-Click Install: Visit contextrepo.com/mcp-server and click the "Install to Cursor" button.

Manual Configuration:

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "context-repo": {
      "command": "npx",
      "args": ["-y", "context-repo-mcp"],
      "env": {
        "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
      }
    }
  }
}

Factory.ai Droid CLI

Factory's Droid CLI can auto-install MCP servers directly from a prompt. Simply paste this into any Droid session:

Install the following MCP Server to Droid using the NPX method.  
MCP: https://github.com/Gitmaxd/context-repo-mcp
API Key: <YOUR CONTEXT REPO API KEY>

Replace <YOUR CONTEXT REPO API KEY> with your actual API key (starts with gm_).

Droid will automatically install and configure the MCP server - no restart required.

Prefer manual configuration? You can add the Context Repo MCP server directly to your Droid MCP configuration file using the same JSON format shown in the Other MCP Clients section below.

Other MCP Clients

The general configuration pattern for any MCP client:

{
  "command": "npx",
  "args": ["-y", "context-repo-mcp"],
  "env": {
    "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
  }
}

Or if installed globally:

{
  "command": "context-repo-mcp",
  "env": {
    "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
  }
}

Available Tools

Once connected, your MCP client can use these tools:

Prompts (7 tools)

ToolDescription
search_promptsList all prompts belonging to the authenticated user with optional keyword search
read_promptGet full prompt details including content, variables, and engine target
create_promptCreate a new prompt template with ${variableName} syntax support
update_promptUpdate an existing prompt with automatic version history tracking
delete_promptPermanently delete a prompt and all its version history
get_prompt_versionsGet version history with change logs, timestamps, and version IDs
restore_prompt_versionRestore a prompt to a previous version (non-destructive, creates new version)

Documents (7 tools)

ToolDescription
list_documentsList all documents with optional collection filter and keyword search
get_documentGet full document content, title, tags, and metadata
create_documentCreate a new text or markdown document with optional tags
update_documentUpdate a document with automatic version history and re-indexing
delete_documentPermanently delete a document, its versions, and search index entries
get_document_versionsGet version history with change logs, timestamps, and version IDs
restore_document_versionRestore a document to a previous version with re-indexing (non-destructive)

Collections (7 tools)

ToolDescription
list_collectionsList all collections with names, descriptions, item counts, and IDs
get_collectionGet collection details with optional item membership list
create_collectionCreate a new collection with optional color and emoji icon
update_collectionUpdate collection name, description, color, or icon
delete_collectionDelete a collection (items are preserved, only the folder is removed)
add_to_collectionAdd documents or prompts to a collection (items can belong to multiple)
remove_from_collectionRemove items from a collection (items themselves are not deleted)

Search (1 tool)

ToolDescription
find_itemsDiscover prompts, documents, and collections by semantic similarity or keyword match

Progressive Disclosure (3 tools)

ToolDescription
deep_searchSearch within document content returning ranked, hierarchical chunks with session deduplication
deep_readRetrieve a single chunk with full content, hierarchy metadata, and navigation IDs
deep_expandNavigate the document hierarchy in 5 directions (up, down, next, previous, surrounding)

The find_items tool enables natural language search across your entire Context Repo. Instead of requiring exact keyword matches, it understands the meaning of your query.

How It Works

Semantic search uses AI embeddings to understand the meaning behind your query:

  1. Your query is converted to a vector embedding (numerical representation of meaning)
  2. Content is matched against document/prompt embeddings stored in Context Repo
  3. Results are ranked by semantic similarity (relevance score 0-1)
  4. Collections are scored based on the relevance of their contained items

Parameters

ParameterTypeRequiredDefaultDescription
querystringYes-Natural language search query
typestringNo"all"Filter: "prompts", "documents", "collections", or "all"
semanticbooleanNotrueUse semantic search. Set false for literal matching

Relevance Scoring

Results are filtered by relevance score (0.0 to 1.0):

ScoreInterpretation
0.7+Excellent match - highly relevant
0.5-0.7Good match - likely relevant
0.35-0.5Moderate match - possibly relevant
< 0.35Filtered out (below threshold)

Default threshold: 0.35 - Results below this score are not returned.

Example Queries

Finding related content:

"Search for my meeting notes"
"Find prompts about code review"
"What documents do I have about API design?"

Filtering by type:

"Search for 'project planning' in documents only"
"Find collection with my research materials"

Literal search (exact match):

"Search for 'README.md' with semantic disabled"

Tips for Better Results

  1. Be descriptive - "prompts for writing technical documentation" works better than "docs"
  2. Use natural language - Ask questions like you would to a colleague
  3. Include context - "meeting notes from last sprint" is more precise than "notes"

The deep_search, deep_expand, and deep_read tools enable hierarchical document exploration. Instead of returning whole documents, progressive disclosure returns the most specific matching chunk (paragraph, section, or document level) and lets you navigate the hierarchy around it.

How It Works

Documents are organized into a 3-level hierarchy:

Document → Section → Paragraph
  1. Documents are chunked into a 3-level hierarchy (document, section, paragraph)
  2. Vector search finds the most specific matching level for your query
  3. Navigate the hierarchy using expand directions (up, down, next, previous, surrounding)
  4. Sessions track seen chunks for deduplication across iterative searches

The Three-Tool Workflow

  • Step 1: deep_search — Find relevant chunks matching your query
  • Step 2: deep_expand — Navigate to related content (parent sections, child paragraphs, siblings)
  • Step 3: deep_read — Get full details and metadata on a specific chunk

deep_search Parameters

ParameterTypeRequiredDefaultDescription
querystringYes-The search query for vector similarity matching
limitnumberNo10Maximum number of results to return
sessionIdstringNoauto-createdSession ID for result deduplication across searches
collectionIdstringNo-Filter results to a specific collection
documentIdstringNo-Filter results to a specific document

deep_expand Parameters

ParameterTypeRequiredDefaultDescription
chunkIdstringYes-The chunk ID to expand from (from deep_search or deep_expand results)
directionstringYes-Navigation direction: up, down, next, previous, or surrounding
countnumberNoserver defaultNumber of chunks to return

deep_read Parameters

ParameterTypeRequiredDefaultDescription
chunkIdstringYes-The chunk ID to read (from deep_search or deep_expand results)

Direction Reference

DirectionDescription
upGet the parent chunk (paragraph → section → document)
downGet child chunks (document → sections, section → paragraphs)
nextGet next sibling at the same level
previousGet previous sibling at the same level
surroundingGet nearby chunks for a context window

Auto-Session Deduplication

deep_search automatically creates a session on the first call. Subsequent searches within the same connection exclude previously returned chunks, enabling iterative refinement without seeing duplicate results. Providing an explicit sessionId overrides the auto-session behavior.

Difference from find_items

find_itemsdeep_search
ResultsFlat matches across prompts, documents, and collectionsHierarchical chunk results within documents
Best forFinding which document contains somethingFinding the exact paragraph or section and navigating around it
NavigationNone — returns top-level matchesFull hierarchy navigation via deep_expand

Example Queries

Finding content:

"Search for chunks about authentication"
"Find paragraphs mentioning API rate limits"

Navigating:

"Expand down from this section to see its paragraphs"
"Go up from this paragraph to see the full section"

Deep inspection:

"Read chunk [chunkId] for full details"

Tips for Best Results

  1. Start with deep_search then use deep_expand to navigate the hierarchy
  2. Use sessions for iterative refinement — auto-created by default, so repeated searches automatically skip already-seen chunks
  3. Use deep_read when you need full metadata — section path, word count, heading text, and navigation IDs
  4. Filter by collectionId or documentId to narrow scope before searching

Example Usage

Try these commands with your MCP client:

Prompts

"List all my prompts"
"Search for prompts about code review"
"Create a prompt called 'Bug Report' for documenting software bugs"
"Show me the details of prompt [ID]"
"Update prompt [ID] with a new description"
"Delete prompt [ID]"
"Show me the version history of prompt [ID]"
"Restore prompt [ID] to version [VERSION_ID]"

Documents

"List all my documents"
"Show me document [ID]"
"Create a document called 'Meeting Notes' with today's discussion"
"Update the title of document [ID]"
"Delete document [ID]"
"Show me the version history of document [ID]"
"Restore document [ID] to version [VERSION_ID]"

Collections

"What collections do I have?"
"Create a collection called 'Project Alpha' with a blue color"
"Show me collection [ID] with all its items"
"Add document [ID] to collection [ID]"
"Remove prompt [ID] from collection [ID]"
"Delete collection [ID]"
"Search for documents about authentication"
"Find prompts related to code review"
"What do I have about project planning?"
"Search my collections for research materials"

Progressive Disclosure

"Search for chunks about API authentication"
"Expand down from chunk [ID] to see child paragraphs"
"Expand up from this paragraph to see the full section"
"Read chunk [ID] for full details and hierarchy metadata"
"Search for more results about authentication" (with auto-session dedup)

Troubleshooting

Server not connecting

  1. Verify your config JSON is valid
  2. Ensure you completely restarted your MCP client
  3. Check that Node.js 18+ is installed: node --version

Authentication errors

  • Verify your API key starts with gm_
  • Check the key hasn't expired in Context Repo dashboard
  • Ensure the key has required permissions

Test manually

CONTEXTREPO_API_KEY=gm_your_key_here npx context-repo-mcp

You should see the startup banner. Press Ctrl+C to exit.

Development

git clone https://github.com/Gitmaxd/context-repo-mcp.git
cd context-repo-mcp
npm install
npm test                                    # Run test suite (Vitest)
CONTEXTREPO_API_KEY=gm_your_key npm start

License

MIT - see LICENSE

Server Config

{
  "mcpServers": {
    "context-repo": {
      "command": "npx",
      "args": [
        "-y",
        "context-repo-mcp"
      ],
      "env": {
        "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
Serper MCP ServerA Serper MCP Server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Playwright McpPlaywright MCP server