8000 [Docs][Content] - MCP installation instructions by madster456 · Pull Request #915 · stack-auth/stack-auth · GitHub
[go: up one dir, main page]

Skip to content

Conversation

madster456
Copy link
Collaborator
@madster456 madster456 commented Sep 24, 2025

Adds MCP installation instructions pages to docs:
image

High-level PR Summary

This PR adds MCP (Model Context Protocol) installation documentation to the Stack Auth docs. It creates a new page (mcp-setup.mdx) with instructions for setting up Stack Auth's MCP server in various development environments including Cursor, VS Code, Claude Code, Claude Desktop, Windsurf, ChatGPT, and Gemini CLI. The PR includes necessary supporting assets like SVG icons, a new button component, modifications to existing components, and updates to configuration files to properly register the new documentation page.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 docs/templates/others/mcp-setup.mdx
2 docs/docs-platform.yml
3 docs/src/components/icons.tsx
4 docs/src/components/mdx/button.tsx
5 docs/src/components/mdx/info.tsx
6 docs/src/mdx-components.tsx
7 docs/templates/meta.json
8 docs/public/imgs/mcp.svg
9 docs/public/imgs/vscode.svg
10 docs/public/imgs/cursor.svg

Need help? Join our Discord


Important

Adds MCP installation instructions to documentation, introduces new components, and updates existing components for enhanced MDX support.

  • Documentation:
    • Adds mcp-setup.mdx for MCP installation instructions in docs/templates/others.
    • Updates docs-platform.yml and meta.json to include the new MCP setup page.
  • Components:
    • Adds Button component in button.tsx for MDX content.
    • Updates Info component in info.tsx to include a size option for compact notices.
    • Adds StackAuthIcon and CursorIcon to icons.tsx for MDX use.
  • MDX Components:
    • Exposes new Button and icons in mdx-components.tsx.

This description was created by Ellipsis for d8ef95c. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Added an MCP setup guide page available across Next, React, JS, and Python.
    • Introduced a reusable Button component for MDX content with link/button behavior.
    • Added a size option to Info components for compact notices.
    • New StackAuth and Cursor icons available for MDX use.
  • Documentation

    • Added the MCP setup template to docs and navigation/meta.
    • Exposed the new Button and icons in MDX component mappings.

Copy link
Contributor
coderabbitai bot commented Sep 24, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a new MCP setup documentation page and registers it in docs metadata; introduces two SVG icon components and a client-side Button component; extends the Info component with size variants; and exposes the new components to the MDX runtime mapping.

Changes

8000
Cohort / File(s) Summary
Docs platform & metadata
docs/docs-platform.yml, docs/templates/meta.json
Registers new public page others/mcp-setup.mdx in docs pages and adds others/mcp-setup to template meta pages.
New MDX page template
docs/templates/others/mcp-setup.mdx
Adds MCP setup guide MDX with visual header, client-specific tabs (Cursor, VS Code, Claude Code/Desktop, Windsurf, ChatGPT, Gemini CLI), installation/config snippets, and a features section.
Icon components
docs/src/components/icons.tsx
Adds StackAuthIcon and CursorIcon React SVG components and exports them alongside existing icons.
MDX Button component
docs/src/components/mdx/button.tsx
New client-side Button component and ButtonProps type; supports color/size/icon variants and renders as <a> when href is provided.
Info component sizing
docs/src/components/mdx/info.tsx
Adds `size?: 'default'
MDX runtime mapping
docs/src/mdx-components.tsx
Imports and exposes StackAuthIcon, CursorIcon, and Button in getMDXComponents for use in MDX pages.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Page as MCP MDX Page
  participant MDXMap as getMDXComponents()
  participant UI as Components (Button, Icons, Info)
  participant Browser as Browser

  Page->>MDXMap: request component mapping
  MDXMap-->>Page: returns { Button, StackAuthIcon, CursorIcon, Info, ... }
  Page->>UI: instantiate components (props: size, href, icon, etc.)
  UI-->>Browser: render UI (SVGs, buttons, tabs, content)
  Browser-->>UI: user interactions (tab switch, clicks)
  UI-->>Page: state-driven updates / re-render
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • N2D4

Poem

A rabbit hops across the repo bright,
New icons glint and buttons light.
Tabs and snippets neatly laid,
MCP setup ready, guides displayed. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the main change—adding MCP installation instructions to the documentation—without including unnecessary details or noise, and clearly indicates the scope of the update.
Description Check ✅ Passed The pull request description includes the required CONTRIBUTING guideline comment and provides a clear high-level summary, detailed change list, review order suggestion, and visual context, fulfilling the repository’s template requirements and offering sufficient context for reviewers.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/content/mcp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
vercel bot commented Sep 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
stack-backend Ready Ready Preview Comment Oct 10, 2025 6:14pm
stack-dashboard Ready Ready Preview Comment Oct 10, 2025 6:14pm
stack-demo Ready Ready Preview Comment Oct 10, 2025 6:14pm
stack-docs Ready Ready Preview Comment Oct 10, 2025 6:14pm

Copy link
@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 7a0bf86..4ca1edf

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (4)

docs/src/components/mdx/button.tsx
docs/src/components/icons.tsx
docs/src/components/mdx/info.tsx
docs/src/mdx-components.tsx

⏭️ Files skipped (6)
  Locations  
docs/docs-platform.yml
docs/public/imgs/cursor.svg
docs/public/imgs/mcp.svg
docs/public/imgs/vscode.svg
docs/templates/meta.json
docs/templates/others/mcp-setup.mdx

@madster456 madster456 changed the title init mcp docs [Docs][Content] - MCP installation instructions Sep 24, 2025
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
docs/src/components/icons.tsx (1)

353-361: Add accessible defaults for decorative icons (aria-hidden/role), allow override via aria-label.

These icons are decorative in most MDX contexts. Default them to aria-hidden to reduce noise for screen readers, while allowing consumers to set aria-label when needed.

Apply this diff to both SVGs:

       <svg
         ref={ref}
         width={size}
         height={size}
         viewBox="0 0 200 242"
         fill="none"
         xmlns="http://www.w3.org/2000/svg"
         className={cn('flex-shrink-0', className)}
+        aria-hidden={props['aria-label'] ? undefined : true}
+        role={props['aria-label'] ? 'img' : undefined}
         {...props}
       >
       <svg
         ref={ref}
         width={size}
         height={size}
         viewBox="0 0 24 24"
         fill="none"
         xmlns="http://www.w3.org/2000/svg"
         className={cn('flex-shrink-0', className)}
+        aria-hidden={props['aria-label'] ? undefined : true}
+        role={props['aria-label'] ? 'img' : undefined}
         {...props}
       >

Also applies to: 378-387

docs/src/components/mdx/info.tsx (1)

63-65: Mark inline SVG icons as decorative for screen readers.

These icons convey no additional information beyond the text; hide them by default.

-            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={sizes.icon}>
+            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={sizes.icon} aria-hidden="true">
...
-            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={sizes.icon}>
+            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={sizes.icon} aria-hidden="true">
...
-            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={sizes.icon}>
+            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={sizes.icon} aria-hidden="true">

Also applies to: 68-70, 73-75

docs/templates/others/mcp-setup.mdx (1)

45-45: Minor copy: Use the official product name “VS Code”.

Change “VSCode” to “VS Code”.

-    Configure Stack Auth MCP in VSCode IDE for enhanced code assistance.
+    Configure Stack Auth MCP in VS Code for enhanced code assistance.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a0bf86 and ad439bc.

⛔ Files ignored due to path filters (3)
  • docs/public/imgs/cursor.svg is excluded by !**/*.svg
  • docs/public/imgs/mcp.svg is excluded by !**/*.svg
  • docs/public/imgs/vscode.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • docs/docs-platform.yml (1 hunks)
  • docs/src/components/icons.tsx (1 hunks)
  • docs/src/components/mdx/button.tsx (1 hunks)
  • docs/src/components/mdx/info.tsx (2 hunks)
  • docs/src/mdx-components.tsx (2 hunks)
  • docs/templates/meta.json (1 hunks)
  • docs/templates/others/mcp-setup.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer ES6 Map over Record when representing key–value collections

Files:

  • docs/src/components/mdx/info.tsx
  • docs/src/components/mdx/button.tsx
  • docs/src/components/icons.tsx
  • docs/src/mdx-components.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build (22.x)
  • GitHub Check: restart-dev-and-test
  • GitHub Check: build (22.x)
  • GitHub Check: setup-tests
  • GitHub Check: lint_and_build (latest)
  • GitHub Check: docker
  • GitHub Check: docker
  • GitHub Check: all-good
  • GitHub Check: Security Check
🔇 Additional comments (5)
docs/src/components/mdx/info.tsx (1)

12-12: LGTM: Size variants are a clean, minimal extension.

Prop signature and size variants look good; usage is consistent throughout the component.

Also applies to: 36-47

docs/templates/meta.json (1)

36-36: LGTM: New page registered in meta.

Entry aligns with docs-platform.yml addition.

docs/docs-platform.yml (1)

273-275: LGTM: Page exposed across all platforms.

Matches Other section conventions.

docs/src/mdx-components.tsx (1)

21-23: LGTM: Components exposed to MDX.

Icons and Button are properly imported and added to the MDX runtime surface.

Also applies to: 83-89

docs/templates/others/mcp-setup.mdx (1)

47-47: LGTM: Fixed CTA text for VS Code section.

“Add to VS Code” label is correct now.

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
docs/src/components/mdx/button.tsx (1)

59-67: Add default type="button" to prevent accidental form submissions.

HTML buttons default to type="submit" when no type is specified. If this Button component is used inside a form without an explicit type prop, clicking it will submit the form, which is likely unintended behavior.

+  const buttonType = (props as React.ButtonHTMLAttributes<HTMLButtonElement>).type ?? 'button';
+
   return (
     <button
       ref={ref as React.Ref<HTMLButtonElement>}
+      type={buttonType}
       className={buttonClasses}
       {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}

Alternatively, destructure type with a default in the component parameters:

->(({ className, color = 'secondary', size = 'sm', icon, href, children, ...props }, ref) => {
+>(({ className, color = 'secondary', size = 'sm', icon, href, children, type = 'button', ...props }, ref) => {
+  // ... component body
   return (
     <button
       ref={ref as React.Ref<HTMLButtonElement>}
+      type={type}
       className={buttonClasses}

Note: The second approach requires TypeScript to understand that type only exists on ButtonAsButton. You may need to adjust the type narrowing.

🧹 Nitpick comments (1)
docs/src/components/mdx/button.tsx (1)

47-48: Consider removing role="button" from anchor elements.

Adding role="button" to an anchor element changes its semantic meaning from a link to a button. Since this element has an href and navigates, it's semantically a link. Screen readers will announce it as a button, which may confuse users who expect link behavior (e.g., right-click to open in new tab, middle-click, etc.).

If the intent is purely visual styling to make it look like a button, the CSS classes alone should suffice without changing the semantic role.

     return (
       <a
-        role="button"
         href={href}
         className={buttonClasses}
         ref={ref as React.Ref<HTMLAnchorElement>}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2698f29 and d8ef95c.

📒 Files selected for processing (1)
  • docs/src/components/mdx/button.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer ES6 Map over Record when representing key–value collections

Files:

  • docs/src/components/mdx/button.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: build (22.x)
  • GitHub Check: build (22.x)
  • GitHub Check: restart-dev-and-test
  • GitHub Check: setup-tests
  • GitHub Check: lint_and_build (latest)
  • GitHub Check: docker
  • GitHub Check: all-good
  • GitHub Check: Vercel Agent Review
  • GitHub Check: docker
  • GitHub Check: Security Check
🔇 Additional comments (1)
docs/src/components/mdx/button.tsx (1)

6-23: LGTM! Discriminated union types address previous type safety concerns.

The discriminated union approach with href?: never for buttons and href: string for links properly prevents invalid prop combinations. This addresses the type safety issues raised in previous reviews.

@madster456 madster456 merged commit 3e301b0 into dev Oct 10, 2025
24 checks passed
@madster456 madster456 deleted the docs/content/mcp branch October 10, 2025 18:31
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.

2 participants

0