Context Repo Mcp Server
@gitmaxd
About Context Repo Mcp Server
*One workspace for your prompts, documents, and collections — accessible from every AI client you use.*
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"context-repo": {
"command": "npx",
"args": [
"-y",
"context-repo-mcp"
],
"env": {
"CONTEXTREPO_API_KEY": "gm_your_api_key_here"
}
}
}
}Tools
27Get information about the authenticated user, including their profile details and API key permissions. Returns the user's name, ID, external ID, authentication method, and permission scopes. Use this to verify your identity, check what permissions your API key has, or confirm authentication status.
List prompts belonging to the authenticated user with optional full-text (literal) match on title, description, and content. For semantic / natural-language matching of prompts, use find_items. Use this to browse your prompt library, find templates by keyword, or get prompt IDs needed for read_prompt, update_prompt, and delete_prompt operations.
Get the full details of a specific prompt including its content and variables. Returns the complete prompt template text, metadata, engine target, and variable definitions. Use after search_prompts or find_items to inspect a prompt before using or editing it.
Create a new prompt template. Requires title, description, content, and target engine. The created prompt is immediately available via search_prompts and find_items, and can be organized into collections with add_to_collection.
Update an existing prompt. Only provide the fields you want to change. Updates that modify `content` create a new version in the prompt's history (reviewable with get_prompt_versions, rollbackable with restore_prompt_version). Title-only or description-only updates do not bump the version.
Permanently delete a prompt. This action cannot be undone. The prompt and all its version history will be removed. Use read_prompt first to confirm you have the correct prompt before deleting.
Get the version history of a prompt. Shows all previous versions with change logs. Returns version IDs, timestamps, author names, and content previews. Use the returned versionId with restore_prompt_version to roll back to any previous state.
Restore a prompt to a previous version. Creates a new version with the restored content. Use get_prompt_versions first to find the versionId to restore. The restoration is non-destructive -- it creates a new version rather than deleting intermediate versions.
List all collections belonging to the authenticated user. Returns collection names, descriptions, item counts, and IDs. Collections are folders that organize prompts and documents into groups. Use the returned collectionId with get_collection, update_collection, or add_to_collection.
Get details of a specific collection including its items. Returns the collection's name, description, color, icon, and (by default) the prompts and documents it contains. Set includeItems to false to retrieve only the metadata without the membership list.
Create a new collection to organize prompts and documents. Collections act as folders with optional color and emoji icon for visual organization. After creation, use add_to_collection to populate it with existing prompts or documents. Requires `documents.write` API key scope (collections are gated by the same scope as documents).
Update a collection's metadata. Change the collection's name, description, color code, or emoji icon. Only provide the fields you want to change. Does not affect the prompts and documents inside the collection. Requires `documents.write` API key scope (collections are gated by the same scope as documents).
Delete a collection. Items in the collection are NOT deleted -- only the organizational folder is removed. The prompts and documents that were in the collection remain accessible via search_prompts, list_documents, and find_items. Requires `documents.write` API key scope (collections are gated by the same scope as documents).
Add documents or prompts to a collection. Specify the collectionId, an array of item IDs, and whether they are 'document' or 'prompt' type. Items can belong to multiple collections. Returns counts of items added and items already in the collection. Requires `documents.write` API key scope (collections are gated by the same scope as documents).
Remove documents or prompts from a collection. This only removes the association -- the items themselves are not deleted and remain accessible. Specify the collectionId, an array of item IDs, and whether they are 'document' or 'prompt' type. Requires `documents.write` API key scope (collections are gated by the same scope as documents).
List all documents belonging to the authenticated user. Returns document titles, statuses, and IDs. Supports filtering by collection and keyword search. Use the returned document IDs with get_document, update_document, or delete_document for further operations.
Get the full content of a specific document. Returns the complete document text, title, tags, and metadata. Use after list_documents or find_items to read a document's content. For granular content exploration, use deep_search and deep_read instead.
Create a new text document. Supports plain text or markdown content with optional tags for categorization. The document is automatically indexed for semantic search via find_items and deep_search. Returns the created document's ID.
Update an existing document. Only provide fields you want to change. Updates that modify `content` create a new version in the document's history (reviewable with get_document_versions) and trigger re-indexing for semantic search. Title-only updates do not bump the version.
Permanently delete a document. This action cannot be undone. The document, all its version history, and its search index entries will be removed. Use get_document first to confirm you have the correct document before deleting.
Get the version history of a document. Shows all previous versions with change logs. Returns version IDs, timestamps, author names, and content previews. Use the returned versionId with restore_document_version to roll back to any previous state.
Restore a document to a previous version. Creates a new version with the restored content and triggers re-indexing for semantic search. Use get_document_versions first to find the versionId to restore. The restoration is non-destructive -- intermediate versions are preserved.
Discover prompts, documents, and collections by semantic similarity or keyword match. Returns item-level results (titles, IDs, scores, short highlights) across all content types. Use this to locate items by topic, find what exists in your workspace, or narrow down to a specific prompt/document/collection before operating on it. Supports filtering by type (prompts, documents, collections) and toggling between semantic (default) and literal matching modes. 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. find_items is the only tool that surfaces prompts in semantic results — deep_search operates on document chunks only.
Search within document content using vector similarity and return ranked, hierarchical chunks. Unlike find_items (which returns item-level catalog results across prompts, documents, and collections), deep_search returns granular content fragments with structural metadata -- each result includes a chunkId, hierarchy level (document/section/paragraph), and navigation links (parentId, siblingIds). Use the returned chunkIds with deep_read to inspect full chunk details, or deep_expand to navigate up/down/next/previous/surrounding in the document tree. Ideal for answering specific questions, finding passages, or progressively exploring large documents without loading everything at once. Supports session-based deduplication, and filtering by collection or document. Scope: documents only. Prompts are stored as single embeddings in a separate index and are not reachable through deep_search, deep_read, or deep_expand — use find_items or search_prompts for prompts.
Retrieve a single document chunk with full content and hierarchy metadata. Use after deep_search (to inspect a result in detail) or deep_expand (to examine a navigated chunk). Returns complete text plus structural position: sectionPath, chunkIndex, navigation IDs (parentChunkId, prevSiblingId, nextSiblingId), and content metadata (wordCount, headingText). Pass the returned chunkId to deep_expand for further navigation.
Navigate the document hierarchy from a chunk in 5 directions: up (parent), down (children), next (next sibling under the same parent), previous (previous sibling under the same parent), surrounding (context window — same-parent siblings; on sparse hierarchies where the target is the only child under its parent, surrounding automatically falls back to the last/first chunks of the parent's prev/next sibling sections so callers still get meaningful neighbouring context). Use after deep_search to explore related content without re-searching. Pass any chunkId from deep_search or a previous deep_expand call. Use deep_read on any returned chunk for full metadata.
Ask a question and get a synthesized, cited answer composed across your documents — not a list of chunks. Returns the answer with inline citations to the exact chunks used, an explicit list of gaps (what your repository does NOT contain about this question), and any conflicts between sources. Operates on document content only (not prompts); read-only; does not persist.
Overview
What is Context Repo Mcp Server?
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. It is designed for users of Context Repo who want AI assistants to manage their content directly.
How to use Context Repo Mcp Server?
Install globally via npm install -g context-repo-mcp or run directly with npx. Configure your MCP client (e.g., Claude Desktop, Cursor IDE, Factory Droid CLI) with the server command and your Context Repo API key set as the CONTEXTREPO_API_KEY environment variable. Once connected, the client can use the exposed tools to search, create, read, update, delete, and restore prompts, documents, and collections.
Key features of Context Repo Mcp Server
- Semantic search with AI-powered relevance scoring (0.0–1.0)
- Full CRUD for prompts, documents, and collections with version history
- Progressive disclosure search with 3-level chunking and directional navigation
- Secure API key-based authentication
- Compatible with Claude Desktop, Cursor IDE, Factory Droid CLI, and all MCP clients
Use cases of Context Repo Mcp Server
- AI assistants accessing and managing Context Repo prompts and documents on the fly
- Navigating large documents hierarchically without overwhelming context windows
- Searching across all Context Repo content using natural language queries
- Version management and non-destructive restoration of prompts and documents
- Organizing content into collections for better context grouping
FAQ from Context Repo Mcp Server
What is MCP and how does this server use it?
MCP (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 through that protocol.
What are the prerequisites to use this server?
You need Node.js 18 or higher, an MCP-compatible client application, and a Context Repo account with an API key.
How do I get a Context Repo API key?
Sign in to Context Repo, go to Settings → API Keys, click Create API Key, and select the required permissions (prompts.read and documents.read). The key starts with gm_.
Which MCP clients are officially supported?
Claude Desktop, Cursor IDE, Factory Droid CLI, and any other application supporting the Model Context Protocol are compatible.
How does progressive disclosure search work?
Documents are automatically chunked into a 3-level hierarchy (document → section → paragraph). The deep_search tool finds the most specific matching chunk for a query, deep_expand allows navigation in five directions (up, down, next, previous, surrounding), and deep_read retrieves full chunk content and metadata. Sessions track seen chunks to avoid duplication across searches.
Frequently asked questions
What is MCP and how does this server use it?
MCP (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 through that protocol.
What are the prerequisites to use this server?
You need Node.js 18 or higher, an MCP-compatible client application, and a Context Repo account with an API key.
How do I get a Context Repo API key?
Sign in to [Context Repo](https://contextrepo.com), go to **Settings → API Keys**, click **Create API Key**, and select the required permissions (`prompts.read` and `documents.read`). The key starts with `gm_`.
Which MCP clients are officially supported?
Claude Desktop, Cursor IDE, Factory Droid CLI, and any other application supporting the Model Context Protocol are compatible.
How does progressive disclosure search work?
Documents are automatically chunked into a 3-level hierarchy (document → section → paragraph). The `deep_search` tool finds the most specific matching chunk for a query, `deep_expand` allows navigation in five directions (up, down, next, previous, surrounding), and `deep_read` retrieves full chunk content and metadata. Sessions track seen chunks to avoid duplication across searches.
Basic information
More Version Control MCP servers
GitHub Actions 工作流使用说明
HenryHaosonYuque mcp server
Github Mcp Server
githubGitHub's official MCP Server
MCP Atlassian Server (by phuc-nt)
phuc-ntMCP server connecting AI assistants with Jira & Confluence for smart project management.
Gerrit Review MCP Server
cayirtepeomerThis MCP server provides integration with Gerrit code review system, allowing AI assistants to review code changes and their details through a simple interface.
🚀 GitLab MR MCP
kopfrechnerInteract seamlessly with GitLab repositories to manage merge requests and issues. Fetch details, add comments, and streamline your code review process with ease.
Comments