Mastra MCP server and tooling that provides real-time access to shadcn-svelte component documentation and developer utilities using web scraping.
Choose the base host that fits your workflow — both expose the same toolset, but their runtime characteristics differ:
| Host | Base URL | Highlights |
|---|---|---|
| Mastra Cloud | https://shadcn-svelte.mastra.cloud | Primary choice - Zero cold start, maximum responsiveness, and consistently reliable performance. Tool discovery issue has been fixed. |
/api/mcp/shadcn/sse for the SSE transport (best for editors that keep long-lived connections)./api/mcp/shadcn/mcp for the HTTP transport (handy for CLIs and quick one-off calls).[!NOTE] This project follows our Code of Conduct and welcomes contributions! See our Contributing Guidelines for details.
This repository contains a Mastra-based MCP server that provides real-time access to shadcn-svelte component documentation using web scraping. Use it in your AI-powered code editor to get instant access to the latest shadcn-svelte component information directly from the official website.
shadcn-svelte-icons tool previously showed an awkward message "No icons found matching "undefined"" when explicit names were requested and none were found — this has been fixed so the response now shows No icons found for names: ... instead. ✅icons tool are intentionally limited to the first 10 names in the response to keep usage snippets tidy; increase the limit if you need more icons returned (the snippet still only imports the first 10). 💡icons tool are intentionally limited to the first 10 names in the response to keep usage snippets tidy; increase the limit if you need more icons returned (the snippet still only imports the first 10). 💡importLimit (default 10) and limit (default 100) to control how many icons are returned, and how many are included in import statements.shadcn-svelte-get tool now respects an optional packageManager parameter and adjusts the installation snippet accordingly (pnpm dlx, yarn dlx, npx, bunx). ✅Mastra Cloud is the recommended primary deployment for all editors. It offers zero cold start and maximum responsiveness. SSE works best for editors that keep a persistent connection, while HTTP is handy for one-off requests and scripts. VS Code users can open the Command Palette (Cmd/Ctrl+Shift+P) and run MCP: Add server to paste either URL.
Cmd/Ctrl + ,).Mastra Cloud — SSE example:
{
"shadcn-svelte": {
"type": "sse",
"url": "https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sse"
}
}
Mastra Cloud — HTTP example:
{
"shadcn-svelte": {
"type": "http",
"url": "https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
}
}
~/.codeium/windsurf/mcp_config.json.{
"mcpServers": {
"shadcn-svelte": {
"url": "https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sse",
"transport": "sse"
}
}
}
mcp.json in Agent mode and click "start".Use the HTTP variant if you need it:
{
"servers": {
"shadcn-svelte": {
"type": "http",
"url": "https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
}
}
}
Cmd/Ctrl + ,).~/.config/zed/settings.json and add an entry under context_servers:{
"context_servers": {
"shadcn-svelte": {
"source": "custom",
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sse"
],
"env": {}
}
}
}
The same base URLs work across CLIs. Mastra Cloud is the recommended primary deployment for the fastest responses with zero cold start.
Global settings (~/.claude/settings.json):
{
"mcpServers": {
"shadcn-svelte": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
]
}
}
}
Project-scoped override (.mcp.json):
{
"mcpServers": {
"shadcn-svelte": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
]
}
}
}
Enable project servers with:
{
"enableAllProjectMcpServers": true
}
Command palette alternative:
claude mcp add shadcn-svelte --url https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp
Use /permissions inside Claude Code to grant tool access if prompted.
Register the Mastra Cloud endpoint for codex or use your own privately hosted MCP endpoint.
codex mcp add shadcn-svelte --url https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sse
codex mcp list
Create or edit ~/.gemini/settings.json:
mkdir -p ~/.gemini
nano ~/.gemini/settings.json
Add a configuration. Mastra Cloud example:
{
"mcpServers": {
"shadcn-svelte": {
"httpUrl": "https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
}
}
}
Prefer the npx mcp-remote command variant if your CLI version expects a command:
{
"mcpServers": {
"shadcn-svelte": {
"command": "npx",
"args": [
"mcp-remote",
"https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
]
}
}
}
Mastra Cloud is recommended for zero cold start and maximum responsiveness. Restart the CLI to apply changes.
claude mcp listcodex mcp listnpx mcp-remote https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcpcurl -I https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcpcurl -N https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sseClaude Code may prompt for tool permissions — use /permissions or set allowedTools in ~/.claude.json. Editors that maintain long-lived connections should use the SSE URL; quick scripts can stick with HTTP.
Note: The previous 'utility' tool has been split into dedicated tools. Use
shadcn-svelte-iconsfor icon browsing/search,shadcn-svelte-listandshadcn-svelte-getfor discovery and docs, andshadcn-svelte-searchfor fuzzy search.
Once installed, your AI assistant will have access to these tools (IDs exactly as exposed by the MCP server):
shadcn-svelte-list — List components, blocks, charts, and docs (returns Markdown lists)shadcn-svelte-get — Retrieve detailed component/block/doc content as structured JSON (content, metadata, codeBlocks)shadcn-svelte-icons — Browse and search Lucide Svelte icons by name/tag (returns Markdown with install + usage snippets; accepts an optional names array for explicit icon selection; supports limit (total returned) and importLimit (how many to include in imports); uses dynamic upstream icon data)shadcn-svelte-search — Fuzzy search across components and docs (returns Markdown for display and a results array for programmatic use)shadcn-svelte-list: Markdown list intended for human display (component names, docs, blocks)shadcn-svelte-get: Structured JSON with content, metadata, codeBlocks (useful for programmatic responses). You can pass an optional packageManager (npm|yarn|pnpm|bun) to render install commands using a preferred package manager.shadcn-svelte-icons: Markdown list with icon names, tag summaries, and an example @lucide/svelte usage snippet. Accepts names: string[] for explicit selection and returns multi-import usage snippets.shadcn-svelte-search: An object with markdown, results (structured), and totalResultsAfter installing the MCP server in your editor, you can ask your AI assistant:
shadcn-svelte-icons toolshadcn-svelte-search tool (returns markdown and structured results){ names: ['arrow-right','user'], packageManager: 'pnpm' } (call shadcn-svelte-icons){ name: 'dashboard-01', type: 'component', packageManager: 'yarn' } (call shadcn-svelte-get)Want to run the MCP server locally or contribute to the project?
src/ - Mastra bootstrap, MCP servers, tools, and agentssrc/services/ - Web scraping services for real-time documentation fetchingsrc/mastra/tools/ - Tools that expose component discovery, fetching and utilitiessrc/mastra/agents/ - Specialized AI agent for shadcn-svelte assistancescripts/ - Version management and automation scripts# npm
npm install
# or bun
bun install
# or pnpm
pnpm install
# Starts Mastra in dev mode; this repo's smoke-test expects a short run to detect runtime errors
npm run dev
npm run dev - Start Mastra in development mode (recommended smoke-test).npm run build - Build the Mastra project for production.npm run start - Start the built Mastra server.npm run check-versions - Check if package.json and mcp-server.ts versions match (fails if mismatched).npm run sync-versions-auto - Check versions and auto-sync if mismatched (package.json is source of truth).npm run sync-versions - Sync versions from latest git tag to both files.This project exposes a production-ready MCP Server that makes shadcn-svelte documentation and tools available to AI code editors.
What this means:
src/mastra/mcp-server.ts) - Exposes four shadcn-svelte tools to external MCP clients (Cursor, Windsurf, VS Code, etc.)The server is deployed at https://shadcn-svelte.mastra.cloud and exposes tools via HTTP and SSE transports.
For a detailed explanation of MCP concepts, see MCP_ARCHITECTURE.md.
.md endpoint fetching for componentssrc/mastra/tools and should use zod for input validationsrc/services/ and use Crawlee (with Playwright) for real-time documentation fetching from JavaScript-heavy pagescreateTool with proper input/output schemaspackage.json engines)src/mastra/tools/shadcn-svelte-get.ts and shadcn-svelte-list.tsnpm run dev to surface runtime integration issues earlyThis project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please read our Contributing Guidelines and Code of Conduct before getting started.
For more details:
MCP_Prompts_System.md for comprehensive documentation on the MCP prompt systemMCP_ARCHITECTURE.md for detailed explanation of MCP server vs clientsrc/services/ for Crawlee-based real-time documentation fetching implementation.github/copilot-instructions.md