Mastra MCP server and tooling that provides real-time access to shadcn-svelte component documentation and developer utilities using web scraping.
Mastra Cloud is the primary deployment: zero cold start, fast tool discovery, and the same toolset over both transports.
| Transport | URL | Best for |
|---|---|---|
| SSE | https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sse | Editors that keep long-lived connections |
| HTTP | https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp | CLIs, scripts, and 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 components are built on top of Bits UI, the underlying component library that provides the core functionality. This MCP server provides direct access to Bits UI's comprehensive API documentation through AI-optimized content endpoints.
The bits-ui-get tool fetches content from Bits UI's dedicated /llms.txt endpoints, which provide:
This ensures that AI assistants receive the most relevant and well-structured information for implementing shadcn-svelte components correctly.
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). 💡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 deployment for all editors. Use SSE for persistent editor connections and HTTP for one-off requests or 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": {}
}
}
}
Two supported workflows (both work for either user/global settings or workspace/project settings):
Option A — Command Palette (quick): Run MCP: Add Server (Ctrl/Cmd+Shift+P) and paste the SSE or HTTP URL. This is the simplest interactive flow and can be used from the global (user) or workspace context.
Examples to paste:
https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/ssehttps://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcpOption B — mcp-remote JSON (scriptable): Create or update .vscode/mcp.json (or your user-level MCP config) to use the mcp-remote helper. This works equally well as a workspace or global config and is handy for reproducible setups.
Example .vscode/mcp.json using mcp-remote (SSE):
{
"mcpServers": {
"shadcn-svelte": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/sse"
]
}
}
}
And for the HTTP transport replace the URL with the /mcp endpoint:
{
"mcpServers": {
"shadcn-svelte": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://shadcn-svelte.mastra.cloud/api/mcp/shadcn/mcp"
]
}
}
}
MCP: List Servers to view configured servers.MCP: List Servers > Configure Model Access to manage which models can use MCP servers.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 --transport http shadcn-svelte 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"
]
}
}
}
Restart the CLI to apply changes.
This repository includes a publishable agent skill at skills/shadcn-sveltekit-design/SKILL.md for designing and implementing polished SvelteKit pages and reusable components with shadcn-svelte while grounding component choices in this MCP.
npx skills add Michael-Obele/shadcn-svelte-mcp --skill shadcn-sveltekit-design
For GitHub Copilot specifically:
npx skills add Michael-Obele/shadcn-svelte-mcp --skill shadcn-sveltekit-design --agent github-copilot -g -y
npx skills add . --list
Once this repository change is pushed to the public GitHub repository and indexed by the skills ecosystem, the skill should resolve at:
https://skills.sh/Michael-Obele/shadcn-svelte-mcp/shadcn-sveltekit-design
The skill assumes the shadcn-svelte MCP server is already configured in the agent environment.
Use these checks after configuration. Prefer SSE for editor connections and HTTP for CLI probing.
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 if needed.
These are the tool IDs exposed by the MCP server:
| Tool | Use for | Returns |
|---|---|---|
shadcn-svelte-list |
Inventory of components, blocks, charts, docs, and Bits UI primitives | Markdown list |
shadcn-svelte-get |
Detailed lookup for components, blocks, charts, docs, and install snippets | Structured JSON; supports packageManager |
shadcn-svelte-search |
Fuzzy discovery when you do not know the exact component or docs name | Markdown summary plus structured results |
shadcn-svelte-icons |
Lucide icon discovery with install and import snippets | Markdown; supports names, limit, and importLimit |
bits-ui-get |
Lower-level Bits UI API reference and implementation details | Structured JSON from Bits UI llms.txt endpoints |
Use shadcn-svelte-get first for known components or docs, shadcn-svelte-search when the exact name is unknown, and bits-ui-get only when you need lower-level primitive details.
After installing the MCP server in your editor, you can ask your AI assistant:
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..md endpoint fetching for shadcn-svelte components/llms.txt endpoint fetching for Bits UI API documentationThe project combines real-time documentation fetching, Bits UI API access, multi-strategy scraping, intelligent caching, Lucide icon search, semantic version synchronization, and production deployment on Mastra Cloud.
src/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