diff --git a/apps/website/e2e/website.spec.ts b/apps/website/e2e/website.spec.ts
index fc191a4b9..e1bf0592e 100644
--- a/apps/website/e2e/website.spec.ts
+++ b/apps/website/e2e/website.spec.ts
@@ -34,7 +34,7 @@ test('pricing page lead form validates required fields', async ({ page }) => {
test('docs page renders sidebar and content', async ({ page }) => {
await page.goto('/docs/getting-started/introduction');
- await expect(page.locator('aside')).toBeVisible();
+ await expect(page.locator('aside').first()).toBeVisible();
await expect(page.locator('article')).toBeVisible();
});
diff --git a/apps/website/next-env.d.ts b/apps/website/next-env.d.ts
index fdbfe5258..c4b7818fb 100644
--- a/apps/website/next-env.d.ts
+++ b/apps/website/next-env.d.ts
@@ -1,6 +1,6 @@
///
` without Shiki.
+
+**Fix:** Add `rehype-pretty-code` to MDXRemote's rehype pipeline. Runs at compile time on the server.
+
+```typescript
+import rehypePrettyCode from 'rehype-pretty-code';
+
+
+```
+
+**CSS needed:** Style the generated `[data-rehype-pretty-code-figure]` elements, `[data-language]` labels, and add a copy button.
+
+## Fix 2: Mintlify-Aligned Layout
+
+### Three-Column Layout
+- Left sidebar: 256px (existing `DocsSidebarNew`)
+- Content: `max-w-3xl` (existing)
+- Right TOC: 200px, sticky, hidden below `xl` breakpoint
+- TOC component extracts `##` headings from the MDX source string via regex
+
+### Typography
+- Page title: `text-3xl font-bold` with description subtitle
+- Body: `leading-relaxed`
+- Inline code: glass background `rgba(0,64,144,0.06)`, `rounded`, `px-1.5 py-0.5`, mono font
+- Headings: clear hierarchy with `mt-10 mb-4` spacing
+
+### Code Blocks
+- `rounded-lg` with glass border
+- Language label top-left (from `data-language` attribute)
+- Copy button top-right on hover
+- `my-6` vertical margins
+
+### Callouts
+- Icons: info=ℹ️, warning=⚠️, tip=💡, danger=🚫
+- `rounded-lg` corners
+- Slightly stronger background tint
+- Better padding and spacing
+
+### Cards
+- Hover: `scale(1.01)` transform + glow shadow
+- Arrow `→` indicator
+- Glass border
+
+### Spacing
+- More generous vertical margins between sections
+- `my-6` on code blocks, `mt-10 mb-4` on headings
+
+## Files to Create/Modify
+
+| File | Change |
+|------|--------|
+| `apps/website/src/components/docs/MdxRenderer.tsx` | Add rehype-pretty-code, update prose styles |
+| `apps/website/src/app/global.css` | Add rehype-pretty-code styles, prose overrides |
+| `apps/website/src/components/docs/DocsTOC.tsx` | NEW — "On This Page" right sidebar |
+| `apps/website/src/components/docs/mdx/Callout.tsx` | Add icons, improve styling |
+| `apps/website/src/components/docs/mdx/Card.tsx` | Add hover effects, arrow |
+| `apps/website/src/components/docs/mdx/Tabs.tsx` | Polish tab bar styling |
+| `apps/website/src/components/docs/mdx/Steps.tsx` | Polish spacing |
+| `apps/website/src/app/docs/[[...slug]]/page.tsx` | Add TOC to layout, pass headings |
+
+## Verification
+- Open /docs/getting-started/quickstart — code blocks have syntax highlighting
+- Code inside Tabs components is highlighted
+- Callouts show icons
+- Cards have hover glow + arrow
+- "On This Page" TOC appears on wide screens
+- Mobile: TOC hidden, content fills width
+- All 19 doc pages render without errors
diff --git a/package-lock.json b/package-lock.json
index 9c333cb38..81a6e33e1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -27,6 +27,7 @@
"next-mdx-remote": "^6.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
+ "rehype-pretty-code": "^0.14.3",
"rxjs": "~7.8.0",
"shiki": "^4.0.2"
},
@@ -23315,6 +23316,81 @@
"node": ">= 0.4"
}
},
+ "node_modules/hast-util-from-html": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz",
+ "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "devlop": "^1.1.0",
+ "hast-util-from-parse5": "^8.0.0",
+ "parse5": "^7.0.0",
+ "vfile": "^6.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-from-html/node_modules/entities": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
+ "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/hast-util-from-html/node_modules/parse5": {
+ "version": "7.3.0",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz",
+ "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==",
+ "license": "MIT",
+ "dependencies": {
+ "entities": "^6.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
+ "node_modules/hast-util-from-parse5": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz",
+ "integrity": "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "devlop": "^1.0.0",
+ "hastscript": "^9.0.0",
+ "property-information": "^7.0.0",
+ "vfile": "^6.0.0",
+ "vfile-location": "^5.0.0",
+ "web-namespaces": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-parse-selector": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz",
+ "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/hast-util-to-estree": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.3.tgz",
@@ -23393,6 +23469,19 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/hast-util-to-string": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz",
+ "integrity": "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/hast-util-whitespace": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
@@ -23406,6 +23495,23 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/hastscript": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz",
+ "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "hast-util-parse-selector": "^4.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@@ -28983,6 +29089,12 @@
"node": ">= 0.10"
}
},
+ "node_modules/parse-numeric-range": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz",
+ "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==",
+ "license": "ISC"
+ },
"node_modules/parse-passwd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
@@ -30917,6 +31029,41 @@
"regjsparser": "bin/parser"
}
},
+ "node_modules/rehype-parse": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.1.tgz",
+ "integrity": "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "hast-util-from-html": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/rehype-pretty-code": {
+ "version": "0.14.3",
+ "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.14.3.tgz",
+ "integrity": "sha512-Cz692FeYusTjT5cfFWLc4r7JhgC3/JlJptgUh4iffBxWxUnWW1oqbWFi7jGCeq00DYUm8yzoTnvpocaYa5x82g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.4",
+ "hast-util-to-string": "^3.0.0",
+ "parse-numeric-range": "^1.3.0",
+ "rehype-parse": "^9.0.0",
+ "unified": "^11.0.5",
+ "unist-util-visit": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "shiki": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
+ }
+ },
"node_modules/rehype-recma": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz",
@@ -34777,6 +34924,20 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/vfile-location": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.3.tgz",
+ "integrity": "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/vfile-matter": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/vfile-matter/-/vfile-matter-5.0.1.tgz",
@@ -35043,6 +35204,16 @@
"license": "MIT",
"optional": true
},
+ "node_modules/web-namespaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
+ "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
diff --git a/package.json b/package.json
index f0397a737..302900819 100644
--- a/package.json
+++ b/package.json
@@ -76,6 +76,7 @@
"next-mdx-remote": "^6.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
+ "rehype-pretty-code": "^0.14.3",
"rxjs": "~7.8.0",
"shiki": "^4.0.2"
},
diff --git a/packages/mcp/src/index.js b/packages/mcp/src/index.js
old mode 100644
new mode 100755