Troubleshooting
Fix the common snags when running a superlore KB — auth not gating, the MCP returning not_found, and Tailwind not styling superlore components.
The three snags people hit most, and how to clear each one.
Auth is not gating the site
superlore's auth is off by default and self-disabling — if it never asks anyone to sign in, the gate is intentionally inactive. Check, in order:
AUTH_GOOGLE_IDis unset. Its presence is what turns auth on. With no client id,createAuthProxypasses every request through. SetAUTH_GOOGLE_IDandAUTH_GOOGLE_SECRET.LOCAL=trueis set. This forces auth off even when Google is configured — useful for local dev, but it disables the gate everywhere it is set. Unset it on deployed environments.proxy.tsis not wired. The gate lives inproxy.ts(Next.js 16's middleware), notmiddleware.ts. Confirm the file exportscreateAuthProxy(auth)and itsconfig.matchercovers your routes. See Enable auth.
Because the gate sits in proxy.ts in front of every route, fixing it gates the site and
/api/mcp together — they can never drift apart.
The MCP returns not_found
get_page, get_section, and get_component_data return { error: "not_found", ... } when the
address does not resolve. Check:
- The path is the route, not the file.
get_pagetakes a doc path like/docs/architecture, notcontent/docs/architecture.mdx. - The id is the full
${path}#${id}address.get_sectionandget_component_datakey off the heading or component id within a page — a bare slug will miss. Usesearchorget_pagefirst to discover the exact id. - The index is stale. The MCP serves the structured index built from your MDX. After adding or renaming a page, rebuild so the index reflects it. Renaming a heading moves its anchor — fix inbound links in the same pass.
For the full tool contract, see Tools.
Components render unstyled
If superlore components show up without their theme, Tailwind is not scanning the package:
- Import
superlore/css. Your global stylesheet needs both@import "tailwindcss";and@import "superlore/css";— the second pulls in superlore's tokens and base styles. See Add it to an existing app. - Add a Tailwind
@sourcefor the package. Tailwind v4 only generates classes for files it scans. superlore's components live innode_modules, so point a@sourceat the package (for example@source "../node_modules/superlore/dist";) so their utility classes are emitted. - Do not branch on theme in JS. Light and dark are a pure CSS-token swap via
[data-theme]. If a component looks right in one theme only, you have hardcoded a colour instead of using a token.
Verify both faces
After fixing rendering, point an agent at the MCP and confirm get_page
returns the structure you intended. A component that renders but serves nothing to the MCP is a
picture, not a knowledge face.
Render in your app
Render a superlore MDX string live inside any app with superlore/runtime — the same components, Canvas, and code highlighting as a published page.
A single doc — no site needed
superlore isn't only for full docs sites. Author one superlore-compatible .mdx and open it instantly in the editor preview or the online Viewer — no deploy, no KB.