Skip to content

fix(docs): repair the /mcp redirect and unpublish the internal analytics note#52

Merged
a-essawy merged 1 commit into
mainfrom
fix/mcp-redirect-and-internal-doc
Jul 21, 2026
Merged

fix(docs): repair the /mcp redirect and unpublish the internal analytics note#52
a-essawy merged 1 commit into
mainfrom
fix/mcp-redirect-and-internal-doc

Conversation

@a-essawy

Copy link
Copy Markdown
Contributor

Found while auditing Search Console for rendobar.com on 2026-07-21. Three defects, all from docs.json disagreeing with the file tree.

/mcp/* redirected into a dead page

{"source": "/mcp/:slug*", "destination": "/mcp"} — but the page is mcp-server.mdx. There is no /mcp. Every /docs/mcp/* URL 308'd to /docs/mcp, which returns 405:

/docs/mcp/overview      308 -> /docs/mcp   405
/docs/mcp/installation  308 -> /docs/mcp   405

/docs/mcp/overview is linked twice from the public llms.txt, and Search Console has it sitting in "Crawled - currently not indexed" with 5 impressions at position 23. Repointed the splat at /mcp-server and added an explicit bare /mcp rule (the splat does not match the bare path — verified: /docs/mcp was not redirecting).

/job-types/caption-burn took two hops

It fell through the /job-types/:slug* splat to /jobs/caption-burn, which then redirected again to /jobs/captions/burn. Added a direct rule ahead of the splat.

ANALYTICS.md was a public page

Mintlify serves every .md/.mdx in the repo whether or not it is in navigation. So an internal PostHog note was live at https://rendobar.com/docs/ANALYTICS (HTTP 200) and listed in /docs/sitemap.xml. CLAUDE.md and README.md had already been deleted from this repo for exactly this reason — this one was missed. Moved to .github/.

Guard

scripts/validate-nav-and-redirects.mjs fails CI on all three classes:

  1. a page file with no navigation entry (it is still live and sitemapped)
  2. a redirect whose destination is not a page in this repo
  3. a navigation entry with no file behind it

Static checks against docs.json plus the file tree, no network.

Why nothing caught these before: validate-frontmatter.mjs only walks .mdx, so a stray .md was invisible to it, and the workflow's path filter only triggered on **/*.mdx, so a docs.json-only change ran no checks at all. Both now include **/*.md and docs.json.

Test plan

$ npm run validate:frontmatter   # Checked 16 MDX files. All frontmatter valid.
$ npm run validate:nav           # Checked 16 pages, 16 nav entries, 23 redirects. All consistent.
$ npm run validate:plan-limits   # Plan-limit tables match the source of truth.

Guard verified against the real bug: temporarily restoring /mcp/:slug* -> /mcp makes validate:nav fail with Redirect "/mcp/:slug*" points at "/mcp", which is not a page in this repo; reverting makes it pass.

After deploy, confirm:

curl -sI https://rendobar.com/docs/mcp/overview   # expect 308 -> /docs/mcp-server -> 200
curl -so /dev/null -w '%{http_code}' https://rendobar.com/docs/ANALYTICS   # expect 404

The /docs/ANALYTICS check is the one to actually run: it confirms that a dot-directory is outside Mintlify's content tree, which is the assumption the guard's suggested remedy rests on.

…ics note

Three things, all found by auditing docs.json against the file tree.

/mcp/:slug* redirected to /mcp, but the page is mcp-server. Every
/docs/mcp/* URL 308'd into a 405, including the two /docs/mcp/overview
links in the public llms.txt. Repointed both the splat and a new bare
/mcp entry at /mcp-server.

/job-types/caption-burn fell through the splat to /jobs/caption-burn and
then hopped again to /jobs/captions/burn. Added a direct rule.

ANALYTICS.md sat in the publish root, so Mintlify served it at
/docs/ANALYTICS and listed it in the sitemap despite it being an internal
PostHog note. CLAUDE.md and README.md were already removed for the same
reason. Moved to .github/.

Added validate-nav-and-redirects.mjs to make all three classes fail CI:
pages on disk but absent from the nav, redirects pointing at pages that do
not exist, and nav entries with no file. The existing frontmatter
validator only walks .mdx, and the workflow only triggered on .mdx, which
is why a stray .md and a docs.json edit were never checked.
@a-essawy
a-essawy merged commit 36343f8 into main Jul 21, 2026
1 check passed
@a-essawy
a-essawy deleted the fix/mcp-redirect-and-internal-doc branch July 21, 2026 21:16
a-essawy added a commit that referenced this pull request Jul 21, 2026
/docs/mcp is Mintlify's own hosted MCP server endpoint for this site, not a
page. It is POST-only JSON-RPC, so a GET correctly returns 405, and the
platform route wins over anything in the redirects table. Confirmed against
production: a JSON-RPC initialize returns serverInfo {"name":"Rendobar"}.

The /mcp -> /mcp-server rule added in #52 therefore never fires. It was
covering for a 405 that is not a defect. Leaving it in place would tell the
next person reading this file that /docs/mcp redirects, and validate-nav
passes it because the destination is a real page.

The actual fix from #52 is unaffected: /mcp/:slug* still sends every
/docs/mcp/<page> URL to /mcp-server. Verified live.
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