https://github.com/dodopayments/context-mcp
Self-hosted MCP server for your documentation
https://github.com/dodopayments/context-mcp
context context-api context7 documentation mcp mcp-server openai pinecone self-hosted
Last synced: 2 months ago
JSON representation
Self-hosted MCP server for your documentation
- Host: GitHub
- URL: https://github.com/dodopayments/context-mcp
- Owner: dodopayments
- License: apache-2.0
- Created: 2025-12-03T10:30:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-01-12T10:15:50.000Z (3 months ago)
- Last Synced: 2026-01-12T18:36:33.007Z (3 months ago)
- Topics: context, context-api, context7, documentation, mcp, mcp-server, openai, pinecone, self-hosted
- Language: TypeScript
- Homepage: https://contextmcp.ai
- Size: 712 KB
- Stars: 11
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# ContextMCP
**Self-hosted MCP server for your documentation.** Index your documentation from across the sources and serve it via the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) and REST API.
## Quick Start
```bash
# 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 OPENAI_API_KEY
# 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)](https://modelcontextprotocol.io/).
### Supported Content Types
| Parser | Content Types | Examples |
| ---------- | --------------------- | ------------------------------ |
| `mdx` | MDX/JSX documentation | Mintlify, Fumadocs, Docusaurus |
| `markdown` | Plain Markdown files | READMEs, CHANGELOGs |
| `openapi` | OpenAPI/Swagger specs | API 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
4. **Store** - Upload to Pinecone vector database
5. **Search** - Query via MCP from AI assistants
## 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
| Package | Description | Published |
| ------------------- | -------------------- | -------------------- |
| `packages/cli` | CLI scaffolding tool | ✅ npm: `contextmcp` |
| `packages/template` | Project template | (copied by CLI) |
| `packages/website` | Documentation site | (deployed to Vercel) |
## Development
### Prerequisites
- Node.js 18+
### Setup
```bash
# 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](https://contextmcp.ai/docs) for full documentation.
## Contributing
We welcome contributions! Please see [CONTRIBUTING.md](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](LICENSE) file for details.