mcpField
C
ContextMCP

ContextMCP

Local
contextmcp.aiMemory & Knowledge86Updated 6d ago

About ContextMCP

ContextMCP is a self-hosted MCP server that indexes documentation into a searchable knowledge base. It serves the content through MCP and a REST API. It is aimed at teams and developers who want AI assistants to query their own docs, and is released under Apache License 2.0.

Key features

  1. 01Parses MDX, Markdown and OpenAPI documentation
  2. 02Splits content into semantic chunks
  3. 03Generates embeddings with OpenAI or Gemini
  4. 04Stores vectors in Pinecone and serves search

Use cases

  1. 01Letting AI assistants query product docs and API references
  2. 02Adding an embeddable Ask AI widget to a docs site
  3. 03Scaffolding a documentation MCP project with npx contextmcp init

MCP support

This project is an MCP server that exposes documentation search to MCP clients, so AI assistants can query the indexed documentation through MCP.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"context": {
"command": "npx",
"args": [
"-y",
"contextmcp"
],
"env": {
"PINECONE_API_KEY": "<PINECONE_API_KEY>",
"OPENAI_API_KEY": "<OPENAI_API_KEY>"
}
}
}
}
Run commandnpx -y contextmcp
Environment variables to set
PINECONE_API_KEYSecret
OPENAI_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcontextmcp

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

ContextMCP

Join Discord Twitter Follow

Self-hosted MCP server for your documentation. Index your documentation from across the sources and serve it via the Model Context Protocol (MCP) and REST API.

Quick Start

# Scaffold a new project
npx contextmcp init my-docs-mcp

# Follow the prompts, then:
cd my-docs-mcp
npm install

# Configure your API keys
cp .env.example .env
# Edit .env with your PINECONE_API_KEY and an embedding provider key
# (OPENAI_API_KEY for provider: openai, or GEMINI_API_KEY for provider: gemini)

# Configure your documentation sources
# Edit config.yaml

# Index your documentation
npm run reindex

# Edit the cloudflare-worker
# Deploy the MCP server
cd cloudflare-worker
npm install
npm run deploy

What is ContextMCP?

ContextMCP creates a searchable knowledge base from your documentation that AI assistants can query via the Model Context Protocol (MCP).

Supported Content Types
ParserContent TypesExamples
mdxMDX/JSX documentationMintlify, Fumadocs, Docusaurus
markdownPlain Markdown filesREADMEs, CHANGELOGs
openapiOpenAPI/Swagger specsAPI reference docs
How It Works
  1. Parse - Extract content from your docs, APIs, and READMEs
  2. Chunk - Split into semantic chunks optimized for search
  3. Embed - Generate embeddings using OpenAI or Gemini
  4. Store - Upload to Pinecone vector database
  5. Search - Query via MCP from AI assistants

Ecosystem

Add a chat UI with ContextChat

ContextMCP serves retrieval; pair it with ContextChat to give your docs a drop-in, embeddable "Ask AI" widget. ContextChat is a single Cloudflare Worker that queries your ContextMCP /search endpoint and streams answers with inline citations — add it to any site or docs page with one <script> tag.

Repository Structure

contextmcp/
├── packages/
│   ├── cli/              # npx contextmcp (npm package)
│   ├── template/         # Project template (scaffolded to users)
│   └── website/          # contextmcp.ai documentation site
└── deployments/
    └── dodopayments/     # Dodo Payments specific deployment

Packages

PackageDescriptionPublished
packages/cliCLI scaffolding tool✅ npm: contextmcp
packages/templateProject template(copied by CLI)
packages/websiteDocumentation site(deployed to Vercel)

Development

Prerequisites
  • Node.js 18+
Setup
# Install all dependencies
npm install

# Development
npm run dev:website     # Run website locally
npm run dev:cli         # Watch CLI for changes

# Build
npm run build:website   # Build website
npm run build:cli       # Build CLI

# Type checking
npm run typecheck       # Check all packages

Documentation

Visit contextmcp.ai/docs for full documentation.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to contribute to this project.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.