Mozan0/spica-mcp-server
If you are the rightful owner of spica-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for interacting with Spica instances, providing tools for managing buckets, bucket data, and functions.
Spica MCP Server
A Model Context Protocol (MCP) server for interacting with Spica instances. This server provides tools for managing buckets, identities, policies, API keys, and functions in Spica, with integrated documentation search capabilities.
Installation
For VS Code GitHub Copilot Users
Prerequisites:
- GitHub Copilot extension installed
- MCP-compatible extension (search for "MCP Client" or "Model Context Protocol" in VS Code marketplace)
Note: MCP support in VS Code is evolving. Different MCP extensions may use slightly different configuration formats. The configuration above works with most standard MCP clients.
-
Install the MCP extension: Install a compatible MCP extension in VS Code (like "MCP Client" or similar)
-
Add MCP server configuration to your VS Code settings. Open your VS Code settings (JSON) and add:
{
"mcp.servers": {
"spica-mcp-server": {
"command": "node",
"args": ["/path/to/your/spica-mcp/dist/index.js"],
"env": {
"SPICA_URL": "http://localhost:4500",
"SPICA_API_KEY": "YOUR_SPICA_API_KEY_HERE"
}
}
}
}
Alternative method using npm:
{
"mcp.servers": {
"spica-mcp-server": {
"command": "npm",
"args": ["run", "start"],
"cwd": "/path/to/your/spica-mcp",
"env": {
"SPICA_URL": "http://localhost:4500",
"SPICA_API_KEY": "YOUR_SPICA_API_KEY_HERE"
}
}
}
}
For Claude Desktop Users
Add this configuration to your Claude Desktop config file (claude_desktop_config.json):
{
"mcpServers": {
"spica-mcp-server": {
"command": "/path/to/your/spica-mcp/start-mcp.sh",
"env": {
"SPICA_URL": "http://localhost:4500",
"SPICA_API_KEY": "YOUR_SPICA_API_KEY_HERE"
}
}
}
}
Manual Installation
git clone https://github.com/your-username/spica-mcp-server.git
cd spica-mcp-server
npm install
npm run build
Setup
-
Copy the example settings:
cp .vscode/settings.json -
Edit the settings: Update
SPICA_URLandSPICA_API_KEYin.vscode/settings.json -
Install recommended extensions: VS Code will automatically suggest installing GitHub Copilot extensions
Configuration
The server is configured entirely through environment variables in your Claude Desktop configuration:
Required Variables (from users)
SPICA_URL: Your Spica instance URL (e.g.,http://localhost:4500)SPICA_API_KEY: Your Spica API key/token
Pre-configured (no user setup needed)
- Documentation search and AI-powered answers are built-in
Getting Your Spica API Key
- Open your Spica dashboard
- Go to Passport → API Keys
- Create a new API key with required permissions
- Copy the key and use it as
SPICA_API_KEY
Configuration File Locations
Claude Desktop
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
VS Code
- Settings JSON: Open VS Code → Preferences → Settings → Open Settings (JSON)
- Workspace Settings:
.vscode/settings.jsonin your project root (for project-specific configuration)
How to Use
With Claude Desktop
Once configured, you can use natural language prompts with Claude. The server includes a documentation-first workflow that encourages searching documentation before performing operations.
With VS Code GitHub Copilot
After installing an MCP extension and configuring the server, you can:
- Use the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) to access MCP commands - Use Copilot Chat with MCP tools integrated
- Access Spica management tools directly from your development environment
Recommended Workflow
- Always start with documentation: Use
searchandanswer_questiontools - Then perform operations: Use Spica tools with proper understanding
Example Session (Claude):
Human: I want to create a new bucket for user profiles
Claude: I'll help you create a user profiles bucket. Let me first search the documentation to understand the proper structure and requirements.
[Uses search tool to find bucket documentation]
[Uses answer_question tool to get specific guidance]
[Then uses bucket-create tool with proper parameters]
Example Session (VS Code Copilot):
// In VS Code, you can use Copilot Chat or MCP commands
// Example: Using Command Palette
1. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
2. Type "MCP: Execute Tool"
3. Select "bucket-list" to see all buckets
4. Or use Copilot Chat: "@mcp create a user bucket with name, email, age fields"
Example Prompts:
-
"Create me a test bucket with fields name, email, and age"
- Copilot will use the
bucket-createtool
- Copilot will use the
-
"List all my buckets"
- Copilot will use the
bucket-listtool
- Copilot will use the
-
"Add a new user with name 'John Doe', email 'john@example.com', age 25"
- Copilot will use the
bucket-data-createtool
- Copilot will use the
-
"Create a function that returns hello world for HTTP requests"
- Copilot will use the
function-createtool
- Copilot will use the
-
"Show me all users in my database"
- Copilot will use the
bucket-data-listtool
- Copilot will use the
Available Tools
📚 Documentation & Help
help: Get setup guidance and workflow instructionssearch: Search documentation for APIs and functionalityanswer_question: Get AI-powered answers from documentationfetch: Retrieve document metadata
🗂️ Bucket Management (Collections)
bucket-list: List all bucketsbucket-create: Create a new bucketbucket-update: Update an existing bucketbucket-delete: Delete a bucket
📊 Bucket Data Management
bucket-data-list: List data from a bucketbucket-data-create: Add new data to a bucketbucket-data-update: Update existing data in a bucketbucket-data-delete: Delete data from a bucket
👥 Identity Management (Users)
passport-identity-list: List all identitiespassport-identity-get: Get specific identitypassport-identity-create: Create a new identitypassport-identity-update: Update an existing identitypassport-identity-delete: Delete an identitypassport-identity-verify: Verify identity tokenpassport-login: Login with credentials
🔑 API Key Management
passport-apikey-list: List all API keyspassport-apikey-get: Get specific API keypassport-apikey-create: Create a new API keypassport-apikey-update: Update an existing API keypassport-apikey-delete: Delete an API keypassport-apikey-assign-policy: Assign policy to API keypassport-apikey-remove-policy: Remove policy from API key
🛡️ Policy Management (Permissions)
passport-policy-list: List all policiespassport-policy-get: Get specific policypassport-policy-create: Create a new policypassport-policy-update: Update an existing policypassport-policy-delete: Delete a policy
⚡ Function Management
function-list: List all functions
Example Usage with Claude
Basic Workflow Examples:
-
Setting up user management:
Help me set up user management in Spica. I need to create user identities and manage permissions. -
Creating a blog system:
I want to create a blog system with posts and authors. Help me set up the buckets and data structure. -
Managing API access:
I need to create API keys with different permission levels for my mobile app and admin panel.
⚠️ Important: Documentation-First Approach
This MCP server is designed to encourage best practices by searching documentation first. Many tools include guidance to:
- Use
searchtool before operations - Use
answer_questionto understand proper syntax - Verify API structure and requirements before making changes
This prevents errors and ensures you're following current best practices.
Troubleshooting
VS Code GitHub Copilot Issues
-
MCP Server Not Connecting:
- Ensure you have an MCP-compatible extension installed
- Check that the server path in settings.json is correct and absolute
- Restart VS Code after changing MCP configuration
- Verify the server builds successfully:
npm run build
-
Check Server Status:
- Run
npm run devmanually to ensure the server starts without errors - Check VS Code Developer Console (Help > Toggle Developer Tools) for MCP-related errors
- Run
-
Extension Requirements:
- Install "MCP Client" or compatible MCP extension from VS Code marketplace
- Ensure GitHub Copilot extension is installed and active
- Check that both extensions are compatible with each other
Claude Desktop Issues
- MCP Server Not Connecting to Claude:
- Check that
start-mcp.shhas execute permissions:chmod +x start-mcp.sh - Verify the path in
claude_desktop_config.jsonis correct - Restart Claude Desktop after configuration changes
- Check that
Common Issues (Both Platforms)
- Authentication Errors: Make sure your Spica API key is valid and not expired
- Network Issues: Ensure your Spica instance is running and accessible
- Permission Errors: Verify your API key has the required permissions for bucket and function operations
- Environment Variables: Double-check that
SPICA_URLandSPICA_API_KEYare set correctly
Running the Server
npm run dev
The server will start and listen for MCP requests via stdio.