Skip to main content
Glama
sandbox-technologies

opencode-docs-mcp

OpenCode Docs MCP Server

npm version License: MIT

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

  • Mintlify-style tool descriptions and responses


Related MCP server: FireScrape MCP Server

πŸš€ Quick Start

Just add a URL to your MCP config:

{
  "mcpServers": {
    "opencode-docs": {
      "name": "opencode-docs",
      "url": "https://tryinspector.com/api/opencode-docs/mcp",
      "headers": {}
    }
  }
}

Option 2: NPX (Local)

{
  "mcpServers": {
    "opencode-docs": {
      "command": "npx",
      "args": ["-y", "opencode-docs-mcp"]
    }
  }
}

⚠️ Using nvm, fnm, or volta? You need the full path to npx:

# Find your npx path
which npx
# Example: /Users/you/.nvm/versions/node/v20.19.5/bin/npx

Then use the full path in your config:

{
  "mcpServers": {
    "opencode-docs": {
      "command": "/Users/you/.nvm/versions/node/v20.19.5/bin/npx",
      "args": ["-y", "opencode-docs-mcp"]
    }
  }
}

Option 3: Global Install

npm install -g opencode-docs-mcp
{
  "mcpServers": {
    "opencode-docs": {
      "command": "opencode-docs-mcp"
    }
  }
}

πŸ“¦ MCP Client Configuration

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "opencode-docs": {
      "name": "opencode-docs",
      "url": "https://tryinspector.com/api/opencode-docs/mcp",
      "headers": {}
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "opencode-docs": {
      "url": "https://tryinspector.com/api/opencode-docs/mcp"
    }
  }
}

OpenCode

Add to your opencode.json:

{
  "mcp": {
    "opencode-docs": {
      "type": "remote",
      "url": "https://tryinspector.com/api/opencode-docs/mcp"
    }
  }
}

πŸ›  Available Tools

Tool

Description

SearchOpenCodeDocs

Search docs by query, returns relevant pages with contextual snippets and links

GetOpenCodeDocPage

Get full content of a specific documentation page by path

BrowseOpenCodeDocs

Get complete table of contents with all categories and pages


πŸ“š 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


πŸ“ Example Usage

Once connected, AI models can use the tools like:

User: "How do I configure MCP servers in OpenCode?"

AI calls: SearchOpenCodeDocs({ query: "configure MCP servers" })

Returns:
### 1. [MCP servers](https://opencode.ai/docs/mcp-servers/)
**Category:** Configure

Add external tools to OpenCode using the Model Context Protocol...

🌐 Self-Hosting

Deploy to Vercel

The remote server endpoint can be added to any Next.js project. See the source for the API route implementation.

Run Locally

git clone https://github.com/anthropics/opencode-docs-mcp
cd opencode-docs-mcp
npm install
npm run build
npm run scrape  # Pre-populate the docs index
npm start

πŸ”§ Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Re-scrape docs
npm run scrape

# Run locally
npm start

🀝 Contributing

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request


πŸ“„ License

MIT - see LICENSE for details.


Available Tools

3 tools
BrowseOpenCodeDocsA

Get a complete overview of the OpenCode documentation structure including all categories and pages. Use this to understand what documentation is available or to help users navigate to the right section.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the scope (all categories and pages) but does not mention return format, whether the output is sorted, or any other behavioral traits. For a no-param browse tool this is sufficient but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the primary action and immediately followed by use-case guidance. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (no params, no output schema), and the description covers purpose, scope, and usage. It lacks explicit return format details, but for a browsing tool the description is adequate and complete enough for an agent to select it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema is empty, so the description need not explain parameter behavior. The baseline of 4 for no-parameter tools applies; the description adds no parameter details but none are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool provides a complete overview of the OpenCode documentation structure, with a specific verb ('Get') and resource ('documentation structure'). It distinguishes itself from siblings by focusing on browsing vs. searching or retrieving specific pages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: to understand available documentation or help users navigate to the right section. It implies alternatives (search/get page) but does not explicitly name them or state exclusions, stopping short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

GetOpenCodeDocPageA

Retrieve the full content of a specific OpenCode documentation page by its path. Use this when you need complete information from a known documentation page, such as /docs/mcp-servers/ for MCP configuration or /docs/agents/ for agent setup.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesThe documentation page path (e.g., "/docs/mcp-servers/", "/docs/config/", "/docs/agents/")

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It states the operation is a retrieval and returns 'full content', which is useful. However, it does not disclose error behavior, formatting, or any side effects; the read-only nature is implied but not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first states the function, second gives usage guidance. There is no redundancy or filler; every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, usage, and parameter context, which is adequate for a simple 1-parameter retrieval tool. It lacks explicit return-type details, but 'full content' implies the expected output. The absence of an output schema raises the bar slightly, but overall it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers the single 'path' parameter with examples, and the description also provides examples ('/docs/mcp-servers/', '/docs/agents/'). The description adds minimal beyond the schema, but it does reinforce the requirement of a known path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the full content of a specific OpenCode documentation page by path. The verb 'retrieve' and resource ('OpenCode documentation page') are specific, and the examples distinguish this from searching or browsing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear usage context: 'Use this when you need complete information from a known documentation page.' This implies alternatives (search/browse) for unknown pages, though it does not explicitly name them or state when not to use the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

SearchOpenCodeDocsA

Search across the OpenCode knowledge base to find relevant information, configuration examples, CLI commands, and guides. Use this tool when you need to answer questions about OpenCode, find specific documentation, understand how features work, or locate implementation details for MCP servers, agents, tools, themes, and more. The search returns contextual content with titles and direct links to the documentation pages.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesA query to search the OpenCode documentation with. Be specific for better results.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the search returns 'contextual content with titles and direct links to the documentation pages,' which is a meaningful behavioral trait. It does not describe potential limitations like rate limits or result count, but for a simple search tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two well-structured sentences, front-loaded with the core action ('Search across the OpenCode knowledge base'), followed by usage context and return format. Every sentence earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter search tool with no output schema, the description is complete. It covers what the tool does, when to use it, and what it returns. Given the low complexity, the absence of additional constraints or result details is not a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter, which already includes guidance to 'Be specific for better results.' The description adds context about searching across the knowledge base but provides no additional syntax or format details, so it does not significantly enhance parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a search tool across the OpenCode knowledge base, listing specific content types (configuration examples, CLI commands, guides) and return behavior (titles and direct links). This distinguishes it from sibling tools like GetOpenCodeDocPage or BrowseOpenCodeDocs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this tool when you need to answer questions about OpenCode, find specific documentation, understand how features work, or locate implementation details.' This provides clear usage context. However, it does not mention when not to use it or explicitly compare it to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.1.0
    • First observedBrowseOpenCodeDocs
    • First observedGetOpenCodeDocPage
    • First observedSearchOpenCodeDocs

TDQS

A4.3/5.0
Disambiguation5/5

Each tool serves a clearly distinct purpose: search for query-based discovery, get for retrieving a specific page by path, and browse for exploring the docs structure. There is no meaningful overlap between them.

Naming Consistency5/5

All tool names follow a consistent Verb+Object pattern: SearchOpenCodeDocs, GetOpenCodeDocPage, BrowseOpenCodeDocs. The naming is uniform and predictable.

Tool Count4/5

With only 3 tools, the set is on the smaller side but well-suited for a documentation-focused server. The tools cover the core needs of searching, retrieving, and navigating docs without excess.

Completeness5/5

The tool set provides complete coverage for a read-only documentation server: discover information, access full content, and understand site structure. There are no obvious gaps or dead ends.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandbox-technologies/opencode-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server