Sandbox
@dodopayments/context-mcp

MCP server for documentation search

ContextMCP turns docs into a searchable index that agents can reach through MCP or a REST API. It supports MDX, Markdown, and OpenAPI sources, then uses embeddings and Pinecone to store and search the content.

76 stars20 forksTypeScriptUpdated 15d ago
Who it's for

Builders who want their agent to search private documentation and API references.

What it delivers

You can ask an agent questions against your docs without pasting context by hand.

What it does

Docs ingestion

Parses MDX, Markdown, and OpenAPI sources from your documentation set.

Chunking and embeddings

Splits content into semantic chunks and creates embeddings with OpenAI or Gemini.

Vector storage

Stores indexed content in Pinecone for retrieval.

MCP and REST access

Serves the indexed docs through the Model Context Protocol and a REST API.

CLI scaffolding

Provides `contextmcp` as a starter command that creates a new project from the template.

How to get it

  1. 1ContextMCP serves retrieval; pair it with ContextChat to give your docs a drop-in,…
    contextmcp/
    ├── packages/
    │   ├── cli/              # npx contextmcp (npm package)
    │   ├── template/         # Project template (scaffolded to users)
    │   └── website/          # contextmcp.ai documentation site
    └── deployments/
        └── dodopayments/     # Dodo Payments specific deployment

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.

Files in the repo

Repository payload11 top-level entries
  • .github
  • deployments
  • packages
  • .gitignore
  • .prettierrc
  • bun.lock
  • CONTRIBUTING.md
  • LICENSE
  • package-lock.json
  • package.json
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k