Claude Code Integration
Claude Code is a CLI tool that provides AI assistance directly in your terminal. It has native MCP support.Setup
- Install Claude Code (if you haven’t already):
- Configure MCP Server:
~/.claude/settings.json (or %APPDATA%\claude\settings.json on Windows):
- Restart Claude Code to load the MCP server.
Usage Examples
Once configured, you can interact with your SnackBase data naturally:Common Workflows
Data Exploration
Quick CRUD Operations
Data Analysis
Cursor IDE Integration
Cursor is an AI-powered code editor with MCP support.Setup
- Install Cursor from cursor.sh
- Configure MCP Server:
~/.cursor/settings.json (or %APPDATA%\cursor\settings.json on Windows):
- Restart Cursor to load the MCP server.
Usage in Cursor
- Use Cmd/Ctrl + K to open the AI chat
- The AI will have access to your SnackBase data
- Ask questions about your data naturally
Continue.dev Integration
Continue.dev is a VS Code extension for AI code assistance.Setup
- Install Continue.dev from the VS Code marketplace
- Configure MCP Server:
Usage in VS Code
- Use Cmd/Ctrl + Shift + L to open Continue
- Ask questions about your SnackBase data
- Get code suggestions based on your schema
Cline (Formerly Claude Dev) Integration
Cline is an autonomous coding agent for VS Code.Setup
- Install Cline from the VS Code marketplace
- Configure MCP Server in Cline’s settings:
Custom Integration
If you want to build your own MCP client, you can use the MCP SDK directly:TypeScript Example
Python Example
Common Patterns
Natural Language Queries
Transform natural language into SnackBase queries:Schema-Aware Code Generation
The AI can generate code based on your collection schemas:Data Validation
Use AI to validate data before insertion:Troubleshooting
MCP Server Not Starting
- Verify installation:
which snackbase-mcp - Check environment variables:
echo $SNACKBASE_URL - Test manually: Run
snackbase-mcpin a terminal
Tools Not Available
- Restart the AI assistant after configuration
- Check the MCP server logs for errors
- Verify API key has required permissions
Permission Errors
- Check API key permissions
- Verify account access
- Review collection rules if accessing specific data
Best Practices
Security
- Use scoped API keys with minimal permissions
- Rotate keys regularly
- Monitor audit logs for unusual activity
- Never expose keys in client-side code
Performance
- Use pagination for large result sets
- Request only needed fields
- Cache frequently accessed data
- Use filters to reduce data transfer
Error Handling
Next Steps
- Tools Reference - Detailed documentation for each tool