ContextMCP
Dockerized MCP server for context management with vector search, supporting local (Ollama + Pinecone Local) and cloud modes, multi-repo indexing, and backup/restore workflows.
README
ContextMCP Dockerized Setup
This repository wraps the forked J3ys/context-mcp project and provides two Docker Compose entrypoints:
docker-compose.local.ymlfor fully local development with Ollama + Pinecone Localdocker-compose.cloud.ymlfor app/reindex flows backed by cloud services
The application logic now lives in the fork, while this repository keeps the Docker, config, and helper-script layer around it.
Local mode
- Copy the example environment file:
cp .env.example .env
-
Review
config.yamland replace the placeholder source before indexing. -
Start Pinecone Local and Ollama:
docker compose -f docker-compose.local.yml up -d pinecone ollama
- Pull the default embedding model:
docker compose -f docker-compose.local.yml --profile bootstrap run --rm ollama-bootstrap
Alternatively, if Ollama is running directly on the host:
ollama pull nomic-embed-text
- Run reindex:
docker compose -f docker-compose.local.yml --profile reindex run --rm reindex
- Start the app:
docker compose -f docker-compose.local.yml up -d app
Local Pinecone backup and restore
Pinecone Local is in-memory and does not provide native backup/restore. This repository adds a repo-owned export/import workflow on top of the local API.
Because the local index is in memory, it is a good idea to create a backup right after a successful indexing run. That way you can restore the same local corpus after a reboot instead of rerunning a long reindex.
Before using the backup/restore scripts on a fresh clone, install the small host-side helper dependency:
npm install
Create a backup:
./scripts/backup-local-index.sh
This writes a new folder under ./backups/, for example:
backups/contextmcp-docs-2026-07-31T12-00-00Z/
Restore from the latest backup:
./scripts/restore-local-index.sh
Restore from a specific backup:
BACKUP_DIR=./backups/contextmcp-docs-2026-07-31T12-00-00Z ./scripts/restore-local-index.sh
Useful knobs:
BACKUP_ROOT- where backup folders are createdBACKUP_DIR- explicitly restore from a specific backup folderBACKUP_BATCH_SIZE- vectors per exported backup fileRESTORE_INDEX_NAME- restore into a different local index nameRESTORE_CLEAR_FIRST=false- keep existing vectors and upsert on topRESTORE_UPSERT_BATCH_SIZE- vectors per restore upsert request
Restore behavior notes:
- the restore script will create the target index if it does not exist
- if the target index already exists, restore validates dimension and metric compatibility before clearing anything
Local multi-repo indexing (optional)
Instead of editing config.yaml per repository, you can index an arbitrary
list of local repositories by setting two variables in .env:
LOCAL_DOCS_ROOT=/absolute/path/to/your/projects
LOCAL_DOCS_REPOS=repo-one=java,repo-two=typescript:sub/path
LOCAL_DOCS_ROOTis mounted read-only into thereindexcontainer at/workspace/repos.LOCAL_DOCS_REPOSis a comma-separated list ofrepo=languagepairs. Eachrepomust be a subdirectory name underLOCAL_DOCS_ROOT.languagemust be one ofjava,typescript, orjavascript. You can optionally append a repo-relative subpath after the language (repo=language:sub/path) when the actual source code lives below the repo root, for exampleHybris=java:hybris/bin/custom.- Each repo is indexed as one mixed source set: the AST-aware
parser: codechunker extracts method/function/class chunks from code files and whole-file chunks from text-like config/infra files (for example yaml/yml/json/ properties/xml/toml/conf/cfg/ini, shell scripts, Dockerfiles, and common dot-config files such as.gitignore,.dockerignore,.editorconfig). Common build/tooling directories are still skipped (.git,node_modules,build,.gradle,.idea, etc.). - When
LOCAL_DOCS_REPOSis unset, this feature does nothing and reindex falls back to the source configured inconfig.yaml, unchanged.
Run it the same way as the standard local flow:
docker compose -f docker-compose.local.yml --profile reindex run --rm reindex
docker compose -f docker-compose.local.yml up -d app
Cloud mode
- Copy the example environment file:
cp .env.example .env
- Change
.envfor cloud usage:
- set
PINECONE_MODE=cloud - set
PINECONE_API_KEYto your real key - clear
PINECONE_CONTROLLER_HOST - set
OPENAI_API_KEY, or updateconfig.cloud.yamlto a different embedding provider before setting that provider's key
-
Review
config.cloud.yamland replace the placeholder source before indexing. -
Run the cloud reindex/app flow:
docker compose -f docker-compose.cloud.yml --profile reindex run --rm reindex
docker compose -f docker-compose.cloud.yml up -d app
Notes
- Pinecone Local is development-only.
- Pinecone Local is in-memory and not production-safe.
- Pinecone Local records do not persist after shutdown.
- The Docker image clones
git@github.com:J3ys/context-mcp.gitand builds directly from the fork.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.