opencode-docs-mcp
v1.0.0
Published
MCP server for searching OpenCode documentation - Mintlify-style docs search for AI agents
Maintainers
Readme
OpenCode Docs MCP Server
A Mintlify-style MCP server that enables AI models to search and browse the OpenCode documentation.
✨ Features
- Full-text search across 33+ documentation pages
- Category browsing (Getting Started, Usage, Configure, Develop)
- Page retrieval with full markdown content
- Auto-discovery of documentation pages from navigation
- Auto-updating index that refreshes every 24 hours
🚀 Quick Start (Choose One)
Option 1: NPX (Easiest - No Installation)
Just add to your MCP config:
{
"mcpServers": {
"opencode-docs": {
"command": "npx",
"args": ["-y", "opencode-docs-mcp"]
}
}
}Option 2: Global Install
npm install -g opencode-docs-mcpThen add to config:
{
"mcpServers": {
"opencode-docs": {
"command": "opencode-docs-mcp"
}
}
}Option 3: Remote Server (Hosted)
If you deploy to Vercel, users can access via HTTP API:
https://your-deployment.vercel.app/api/search?q=mcp+servers📦 MCP Client Configuration
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"opencode-docs": {
"command": "npx",
"args": ["-y", "opencode-docs-mcp"]
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"opencode-docs": {
"command": "npx",
"args": ["-y", "opencode-docs-mcp"]
}
}
}OpenCode
Add to your opencode.json:
{
"mcp": {
"opencode-docs": {
"type": "local",
"command": ["npx", "-y", "opencode-docs-mcp"]
}
}
}Cline / Continue / Other MCP Clients
{
"mcpServers": {
"opencode-docs": {
"command": "npx",
"args": ["-y", "opencode-docs-mcp"]
}
}
}🛠 Available Tools
| Tool | Description |
|------|-------------|
| search_opencode_docs | Search docs by query, returns relevant pages with snippets |
| get_opencode_doc_page | Get full content of a specific documentation page |
| list_opencode_docs_by_category | List all pages in a category (Usage, Configure, etc.) |
| list_opencode_doc_categories | List all available documentation categories |
| browse_opencode_docs | Get full table of contents for the docs |
📚 Documentation Categories
| Category | Pages | Topics | |----------|-------|--------| | Getting Started | 7 | Intro, Config, Providers, Network, Enterprise, Troubleshooting, Migration | | Usage | 8 | TUI, CLI, Web, IDE, Zen, Share, GitHub, GitLab | | Configure | 14 | Tools, Rules, Agents, Models, Themes, Keybinds, MCP Servers, etc. | | Develop | 4 | SDK, Server, Plugins, Ecosystem |
🌐 Deploy Your Own (Vercel)
- Clone or fork this repo
- Install Vercel CLI:
npm i -g vercel - Deploy:
vercel --prod
Users can then access:
GET /api/search?q=query- Search documentationGET /api/page?path=/docs/mcp-servers/- Get page contentGET /api/list- List all pages
🔧 Development
# Clone
git clone https://github.com/your-username/opencode-docs-mcp
cd opencode-docs-mcp
# Install
npm install
# Build
npm run build
# Scrape docs
npm run scrape
# Run locally
npm start📝 Example Usage
Once connected, AI models can use the tools like:
User: "Search the OpenCode docs for how to configure MCP servers"
AI calls: search_opencode_docs({ query: "configure MCP servers" })
Returns:
- MCP servers (/docs/mcp-servers/) - Relevance: 3.50
"Add external tools to OpenCode using the Model Context Protocol..."
- Config (/docs/config/) - Relevance: 2.00
- LSP Servers (/docs/lsp/) - Relevance: 1.50🤝 Contributing
- Fork the repository
- Make your changes
- Submit a PR
📄 License
MIT
