Get the FREE Ultimate OpenClaw Setup Guide →

shadcn-svelte

Mastra MCP server and tooling for the shadcn-svelte component docs and developer utilities.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio michael-obele-shadcn-svelte-mcp node dist/server.js \
  --env PORT="3000" \
  --env LOG_LEVEL="info" \
  --env MCP_BASE_PATH="optional-base-path"

How to use

The shadcn-svelte MCP server provides real-time access to the shadcn-svelte component documentation and related developer utilities by scraping the official sites and exposing the results through MCP transports. It includes a suite of tools designed to help editors and IDEs discover components, properties, and usage examples as you work. Typical workflows include querying for component API references, searching for icons via the Lucide Svelte integration, and retrieving AI-optimized documentation from the Bits UI API docs. Developers can connect to the server using the SSE transport for long-lived editor connections or the HTTP transport for quick one-off calls, enabling seamless integration into code editors and automation scripts.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your machine
  • Access to the repository (git)
  1. Clone the repository:
git clone https://github.com/Michael-Obele/shadcn-svelte-mcp.git
cd shadcn-svelte-mcp
  1. Install dependencies:
npm install
  1. Build the MCP server (if the project uses a build step):
npm run build
  1. Run the MCP server:
npm run start
  1. Verify the server is running by hitting the configured port (default 3000):
curl http://localhost:3000/health

Notes:

  • If the project uses a different start script, use the corresponding npm script (e.g., npm run dev).
  • Adjust environment variables as needed for your environment (see mcp_config example).

Additional notes

Tips and common considerations:

  • Use Mastra Cloud endpoints for stable, zero-setup deployments: SSE (for persistent connections) or HTTP (for quick calls).
  • Configure environment variables like PORT, MCP_BASE_PATH, and LOG_LEVEL to tailor behavior to your environment.
  • When integrating with editors, prefer the provided examples for Cursor/Windsurf/Zed to ensure compatibility with their mcp_config.json formats.
  • If you encounter transport errors, verify network access to the endpoint and ensure the MCP server process has the required permissions to bind to the chosen port.
  • For icon and Bits UI related tooling, ensure any required API keys or access permissions are configured if the tooling relies on authenticated endpoints.

Related MCP Servers

Sponsor this space

Reach thousands of developers