Skip to content

fix: derive MCP navigation from current Base docs config - #20

Open
huklaa wants to merge 10 commits into
base:masterfrom
huklaa:fix-16-current-docs-repo
Open

fix: derive MCP navigation from current Base docs config#20
huklaa wants to merge 10 commits into
base:masterfrom
huklaa:fix-16-current-docs-repo

Conversation

@huklaa

@huklaa huklaa commented Aug 19, 2026

Copy link
Copy Markdown

Addresses #16

This PR keeps the MCP navigation/sidebar in sync with the active Base docs source.

What changes

  • Navigation now comes from base/docs/docs/docs.json (replacing the archived base/web sidebar fetch).
  • Derives a compact navigation view from the current Base docs navigation tree, supporting tabs, groups, pages, global, and anchors.
  • Filters external global.anchors so only docs.base.org URLs are exposed as guideLink options. Mintlify global anchors also include external destinations (e.g. Status, Blog, Explorer, GitHub); advertising those as guide choices could make the model pick a guideLink that getGuide/getStepsList cannot resolve, since that tool only accepts Base documentation URLs.
  • Removes the stale hardcoded sidebar fallback.
  • Replaces it with a minimal fallback that points to docs.base.org when the remote config cannot be fetched or parsed.
  • Routes refresh diagnostics to stderr.
  • Adds an npm test script that compiles TypeScript and runs the sidebar tests with Node's built-in test runner.

Tests

Existing tests cover navigation and global anchors (including nested tabs/groups/pages, malformed nodes, and missing navigation), and now assert that unsupported external anchors are excluded while docs.base.org anchors are kept as guide choices.

Why this is distinct from #12

#12 handles guide file retrieval and candidate path resolution from base/docs.
This PR intentionally leaves that resolver alone and covers the separate navigation-sync part of #16.

Verification

  • npx tsc --noEmit
  • npm test
  • git diff --check

@huklaa huklaa changed the title fix: resolve guides from active Base docs repo fix: derive MCP navigation from current Base docs config Aug 19, 2026
@huklaa
huklaa force-pushed the fix-16-current-docs-repo branch from e8e056d to d5379e4 Compare August 22, 2026 22:08
@huklaa
huklaa force-pushed the fix-16-current-docs-repo branch from af19db2 to 055bb00 Compare August 27, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant