ContextMCP

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.

Category
Visit Server

README

ContextMCP Dockerized Setup

This repository wraps the forked J3ys/context-mcp project and provides two Docker Compose entrypoints:

  • docker-compose.local.yml for fully local development with Ollama + Pinecone Local
  • docker-compose.cloud.yml for 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

  1. Copy the example environment file:
cp .env.example .env
  1. Review config.yaml and replace the placeholder source before indexing.

  2. Start Pinecone Local and Ollama:

docker compose -f docker-compose.local.yml up -d pinecone ollama
  1. 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
  1. Run reindex:
docker compose -f docker-compose.local.yml --profile reindex run --rm reindex
  1. 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 created
  • BACKUP_DIR - explicitly restore from a specific backup folder
  • BACKUP_BATCH_SIZE - vectors per exported backup file
  • RESTORE_INDEX_NAME - restore into a different local index name
  • RESTORE_CLEAR_FIRST=false - keep existing vectors and upsert on top
  • RESTORE_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_ROOT is mounted read-only into the reindex container at /workspace/repos.
  • LOCAL_DOCS_REPOS is a comma-separated list of repo=language pairs. Each repo must be a subdirectory name under LOCAL_DOCS_ROOT. language must be one of java, typescript, or javascript. 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 example Hybris=java:hybris/bin/custom.
  • Each repo is indexed as one mixed source set: the AST-aware parser: code chunker 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_REPOS is unset, this feature does nothing and reindex falls back to the source configured in config.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

  1. Copy the example environment file:
cp .env.example .env
  1. Change .env for cloud usage:
  • set PINECONE_MODE=cloud
  • set PINECONE_API_KEY to your real key
  • clear PINECONE_CONTROLLER_HOST
  • set OPENAI_API_KEY, or update config.cloud.yaml to a different embedding provider before setting that provider's key
  1. Review config.cloud.yaml and replace the placeholder source before indexing.

  2. 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.git and builds directly from the fork.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured