@myriadcodelabs/docs-navigation-mcp
v0.3.0
Published
A local-first MCP server for navigating and maintaining arbitrary hierarchical documentation
Maintainers
Readme
Docs Navigation MCP
A local-first MCP server for navigating and maintaining arbitrary hierarchical documentation.
It exposes documentation as sources containing nodes. Nodes can have arbitrary depth, duplicate titles, raw content, and multiple parents. The server provides no semantic search or built-in reasoning; the connected LLM decides how to navigate and maintain the documentation.
Run with npx
Node.js 20 or newer is required.
npx -y @myriadcodelabs/docs-navigation-mcpBefore the npm release, or when intentionally running the current GitHub revision:
npx -y github:muhammadismailkhan0009/docs-navigation-mcpGit installs run the package's prepare script so the TypeScript source is built before execution.
By default, documentation is stored under:
~/.docs-navigation-mcp/repositoryTo choose one or more documentation repositories:
DOCNAV_REPOSITORIES=/path/to/docs-repo \
npx -y @myriadcodelabs/docs-navigation-mcpOn Linux/macOS, multiple repositories are separated by ::
DOCNAV_REPOSITORIES="/path/to/nim:/path/to/uiflow" \
npx -y @myriadcodelabs/docs-navigation-mcpThe first configured repository is the creation target for new sources. Existing sources are updated in whichever configured repository owns them.
MCP client configuration
A typical stdio MCP configuration looks like:
{
"mcpServers": {
"docs-navigation": {
"command": "npx",
"args": ["-y", "@myriadcodelabs/docs-navigation-mcp"],
"env": {
"DOCNAV_REPOSITORIES": "/path/to/docs-repo"
}
}
}
}Streamable HTTP with mcp-proxy
If mcp-proxy is installed locally:
DOCNAV_REPOSITORIES=/path/to/docs-repo \
mcp-proxy \
--server stream \
--host 127.0.0.1 \
--port 8765 \
--streamEndpoint /mcp \
-- npx -y @myriadcodelabs/docs-navigation-mcpThe MCP endpoint is then:
http://127.0.0.1:8765/mcpIntended agent workflow
Docs Navigation is a persistent prepared-documentation store, not a crawler.
For normal documentation retrieval, agents should prefer the stored corpus before crawling the web or creating a separate local documentation cache:
docs.sources.list— discover which prepared documentation corpora are already available.docs.nodes.list_children— navigate the selected corpus hierarchy until the relevant nodes are found.docs.nodes.fetch_content— read the exact stored raw documentation for those node IDs.
External crawling is only needed when required documentation is absent or intentionally being refreshed. In that case, obtain authoritative material externally and ingest it into Docs Navigation.
Retrieval tools
docs.sources.list— start here; list prepared documentation sources.docs.nodes.list_children— navigate immediate children of a source root or node.docs.nodes.fetch_content— fetch exact stored raw content for known node IDs.
Ingestion and maintenance tools
docs.sources.create— create an empty documentation corpus for deliberate ingestion.docs.nodes.add— persist new structured documentation nodes and raw content.docs.nodes.update— refresh node content, metadata, or hierarchy.docs.nodes.remove— remove stored nodes, optionally recursively.docs.sources.remove— remove an entire documentation corpus.
Storage format
Each documentation repository uses a Git-friendly layout:
sources/
└── source_<uuid>/
├── source.json
├── nodes/
│ └── node_<uuid>.json
└── content/
└── node_<uuid>.contentRaw documentation is stored unchanged in .content files. JSON files contain navigation metadata only, so documentation repositories can be copied, cloned, versioned, or hosted on GitHub without a dedicated backend.
Local documentation viewer
Starting Docs Navigation MCP also starts a read-only local browser for inspecting the exact sources, node hierarchy, and raw content stored in the configured documentation repositories.
The same command runs both surfaces:
npx -y @myriadcodelabs/docs-navigation-mcp- MCP traffic uses stdio for the connected client.
- The viewer is available at:
http://127.0.0.1:47831Both surfaces use the same FilesystemDocumentationStore and the same repository configuration:
DOCNAV_REPOSITORIES="/path/to/nim:/path/to/uiflow" \
npx -y @myriadcodelabs/docs-navigation-mcpOptional viewer configuration:
DOCNAV_UI_HOST=127.0.0.1
DOCNAV_UI_PORT=47831The UI is intentionally read-only. Documentation ingestion, updates, and removal remain MCP operations. Use the viewer to inspect what agents have already stored; use the docs.* MCP tools to change the corpus.
Human-readable viewer startup information is written to stderr so stdout remains reserved for the MCP stdio protocol. When the MCP stdio connection closes, the viewer closes with the same process.
Install globally
npm install -g @myriadcodelabs/docs-navigation-mcp
docs-navigation-mcpThe command starts both the MCP server and local viewer.
Development
npm install
npm run typecheck
npm test
npm run build
npm run release:checkRun the source version:
DOCNAV_REPOSITORIES=/path/to/docs-repo npm run devThis starts both stdio MCP and the local viewer. The frontend source remains under web/ and is bundled into dist/ui/ during npm run build.
Publishing
The repository contains a tag-driven GitHub Actions release workflow.
Before publishing:
- Create an npm automation/access token that can publish
@myriadcodelabs/docs-navigation-mcp. - Add it to the GitHub repository as the
NPM_TOKENActions secret. - Set the desired version in
package.jsonandsrc/index.ts. - Commit and push the release changes.
- Create and push the matching Git tag, for example:
git tag v0.3.0
git push origin v0.3.0Pushing the tag automatically:
- verifies that the tag matches
package.json, - runs the full release checks,
- publishes that version to npm if it is not already present,
- creates the matching GitHub Release with generated release notes if it does not already exist.
The workflow is safe to rerun when the npm version or GitHub Release already exists.
License
MIT
