opencode-docs-mcp (1.18.27)

Published 2026-09-04 05:02:25 +02:00 by Dominik

Installation

registry=
npm install opencode-docs-mcp@1.18.27
"opencode-docs-mcp": "1.18.27"

About this package

opencode-docs-mcp

MCP server serving opencode documentation, optimized for LLM agents. Pre-built data is bundled in the package; the runtime server reads it without any network calls.

Installation

This package is published to a self-hosted Forgejo npm registry, not to npmjs.com — the package name is unscoped, so npm i -g opencode-docs-mcp or a bare npx opencode-docs-mcp will look on npmjs.com and fail with a 404. Point at the Forgejo registry explicitly:

{
  "mcp": {
    "opencode-docs": {
      "command": "npx",
      "args": [
        "--registry=https://cogforge.dodo-softworks.de/api/packages/dodo-softworks/npm/",
        "opencode-docs-mcp"
      ]
    }
  }
}

Or install globally:

npm i -g opencode-docs-mcp --registry=https://cogforge.dodo-softworks.de/api/packages/dodo-softworks/npm/

If the registry requires authentication, add a token to your .npmrc:

//cogforge.dodo-softworks.de/api/packages/dodo-softworks/npm/:_authToken=${NPM_TOKEN}

Configuration

Environment variable Purpose
OPENCODE_DOCS_MCP_REFRESH_URL Optional. Enables refresh_data. Must be an https:// Forgejo "latest release" API endpoint, e.g. https://cogforge.dodo-softworks.de/api/v1/repos/dodo-softworks/opencode-docs-mcp/releases/latest. Left unset, refresh_data reports that no refresh URL is configured.
OPENCODE_DOCS_MCP_DEBUG Optional. Set to enable verbose debug logging (written to stderr, never stdout — MCP uses stdout for the JSON-RPC protocol).

Tools

Tool Description
list_docs List all opencode documentation pages
search_docs Search documentation by keyword
get_doc Get a specific page by slug (optionally filtered by section)
get_config_schema Get opencode.json config schema (overview or specific section)
get_changelog Get opencode release notes
refresh_data Download updated documentation data (requires OPENCODE_DOCS_MCP_REFRESH_URL)

Development

This project uses npm with Node.js 22+.

npm ci
npx tsx scripts/build.ts   # generates data/ - required before `npm run dev` or `npm run build`
npm run dev
npm test
npm run build
npm run check:ci

data/ is generated output (fetched from the live opencode docs, GitHub, and opencode.ai/config.json) and is not committed to the repository — npm test doesn't need it, since tests read from tests/fixtures/, but running the server itself does.

If you prefer bun, create a local wrapper script:

cat > scripts/bun.sh << 'EOF'
#!/bin/sh
exec docker run --rm \
  -v "$PWD:/workspace" \
  -w /workspace \
  -v "${HOME}/.bun-cache:/root/.bun/install/cache" \
  oven/bun:1 \
  bun "$@"
EOF
chmod +x scripts/bun.sh

Then use ./scripts/bun.sh install, ./scripts/bun.sh test, etc.

Architecture

  • src/ — runtime code (shipped as dist/)
  • data/ — pre-built documentation data; generated by scripts/build.ts, not committed to git, but included in the published package
  • scripts/ — CI build pipeline (not shipped)
  • Tests mirror src/ structure under tests/

Release process

A nightly Forgejo Actions workflow (.forgejo/workflows/nightly.yml) checks for new opencode releases, rebuilds data/, publishes the npm package, and attaches data-bundle.json + meta.json to a matching Forgejo release for refresh_data to consume. It requires two repository secrets: NPM_TOKEN (publish access to the Forgejo npm registry) and RELEASE_TOKEN (create releases and upload assets on this repository).

License

MIT

Dependencies

Dependencies

ID Version
@modelcontextprotocol/sdk ^1.29.0
minisearch ^7.2.0
remark-directive ^4.0.0
remark-gfm ^4.0.1
remark-mdx ^3.1.1
remark-parse ^11.0.0
remark-stringify ^11.0.0
unified ^11.0.5
unist-util-visit ^5.1.0
zod ^4.4.3

Development dependencies

ID Version
@biomejs/biome ^2.5.2
@commitlint/cli ^21.2.1
@commitlint/config-conventional ^21.2.0
@modelcontextprotocol/inspector ^0.22.0
@types/node ^22.0.0
@vitest/coverage-v8 ^4.1.9
gray-matter ^4.0.3
js-yaml ^5.2.3
knip ^6.24.0
lefthook ^1.11.0
tsdown ^0.22.2
tsx ^4.23.0
typescript ^6.0.3
vitest ^4.1.9

Keywords

mcp model-context-protocol opencode documentation
Details
npm
2026-09-04 05:02:25 +02:00
0
MIT
190 KiB
Assets (1)
Versions (14) View all
1.18.30 2026-09-10
1.18.29 2026-09-05
1.18.27 2026-09-04
1.18.26 2026-09-02
1.18.25 2026-08-29