Labsco
dodopayments logo

ContextMCP

β˜… 58

from dodopayments

A self-hosted MCP server that indexes documentation from various sources and serves it to AI Agents with semantic search.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

ContextMCP

<p align="left"> <a href="https://discord.gg/bYqAp4ayYh"> <img src="https://img.shields.io/discord/1305511580854779984?label=Join%20Discord&logo=discord" alt="Join Discord" /> </a> <a href="https://twitter.com/dodopayments"> <img src="https://img.shields.io/twitter/follow/dodopayments?label=Follow&style=social" alt="Twitter Follow" /> </a> </p>

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.

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.