An MCP server that gives AI assistants read-only access to file contents and project structure from StackBlitz reproductions. No authentication required.
npm i -g stackblitz-mcp
Add stackblitz-mcp to your AI tool of choice. Pick your editor below.
Config file location:
mac: ~/Library/Application Support/Claude/claude_desktop_config.json win: %APPDATA%\Claude\claude_desktop_config.json {
"mcpServers": {
"stackblitz": {
"command": "npx",
"args": ["-y", "stackblitz-mcp"]
}
}
} Run in your terminal:
claude mcp add stackblitz -- npx -y stackblitz-mcp Config file location:
workspace: .vscode/mcp.json {
"servers": {
"stackblitz": {
"command": "npx",
"args": ["-y", "stackblitz-mcp"]
}
}
} Config file location:
project: .cursor/mcp.json global: ~/.cursor/mcp.json {
"mcpServers": {
"stackblitz": {
"command": "npx",
"args": ["-y", "stackblitz-mcp"]
}
}
} Config file location:
global: ~/.codeium/windsurf/mcp_config.json {
"mcpServers": {
"stackblitz": {
"command": "npx",
"args": ["-y", "stackblitz-mcp"]
}
}
} Go to Settings > Tools > AI Assistant > Model Context Protocol (MCP), click Add, and configure a stdio server:
{
"command": "npx",
"args": ["-y", "stackblitz-mcp"]
} Four read-only tools for exploring StackBlitz projects. Pass a project URL or ID to any of them.
Resolve a StackBlitz project URL or ID and return project metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectRef | string | yes | Project ID or StackBlitz URL |
List files in a StackBlitz project as an ASCII tree, optionally filtered by path prefix.
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectRef | string | yes | Project ID or URL |
| path | string | no | Filter files by path prefix |
Read the contents of a file from a StackBlitz project.
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectRef | string | yes | Project ID or URL |
| path | string | yes | File path within the project |
Search for content within files of a StackBlitz project.
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectRef | string | yes | Project ID or URL |
| query | string | yes | Search query string |
| regex | boolean | no | Treat query as regex (default: false) |
| caseSensitive | boolean | no | Case-sensitive search (default: false) |
| maxResults | number | no | Maximum results (default: 50) |
MCP resources are accessible via URI patterns. Use them to directly reference project data.
| URI Pattern | Description |
|---|---|
| stackblitz://{projectId}/tree | File tree of a project |
| stackblitz://{projectId}/files/{path} | Contents of a specific file |