Skip to main content
Glama
J3ys

ContextMCP

by J3ys

ContextMCP Dockerized Setup

This repository wraps the upstream dodopayments/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

With new changes being made most likely it will be moved to a fork of the upstream project.

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

Related MCP server: mcp-context

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 vendors upstream ContextMCP v0.5.0 and applies a small local-support patch at build time.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    An MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context. Uses Ollama or OpenAI to generate embeddings. Docker files included
    12
    30
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Local MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.
  • A
    license
    A
    quality
    B
    maintenance
    Local-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.
    3
    9
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).
    15
    36
    MIT

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Cloud-hosted MCP server for durable AI memory

  • User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/J3ys/ContextMCPDocker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server