Using Cubby with Claude
Cubby integrates with Claude Code and Claude Desktop through the Model Context Protocol (MCP). This lets you deploy and manage apps directly from your AI conversations.What’s MCP?
MCP (Model Context Protocol) is a standard way for AI assistants to interact with external tools. Cubby’s MCP server gives Claude the ability to:- Deploy apps to Cubby
- Manage secrets
- List your apps
- View logs
- Delete apps
Setup
Install the MCP Server
The Cubby MCP server is published to npm:Claude Code Configuration
Add to your Claude Code settings (~/.claude/claude_desktop_config.json):
Claude Desktop Configuration
Add to Claude Desktop’s config file: macOS:~/Library/Application Support/Claude/claude_desktop_config.json
Available Tools
The MCP server provides these tools to Claude:| Tool | Description |
|---|---|
deploy_app | Deploy an app from a directory |
set_secret | Set an environment variable |
list_secrets | List secrets for an app |
list_apps | List your deployed apps |
get_app_logs | View container logs |
delete_app | Delete a deployed app |
Example Workflows
Build and Deploy
Ask Claude to build and deploy an app in a single conversation:“Build a simple todo app with Prisma and deploy it to Cubby”Claude will:
- Create the project structure
- Write the code
- Deploy using the
deploy_apptool
Add a Secret
“Set my OpenAI API key as a secret for my todo-app”Claude will:
- Ask you for the API key value
- Use
set_secretto store it - Tell you to redeploy for it to take effect
Check App Status
“Show me the logs for my todo-app”Claude will use
get_app_logs and format the output for you.
Authentication
The MCP server uses the same credentials as the CLI. If you’re logged into the CLI (cubby login), the MCP server will work automatically.
If you haven’t logged in:
The CUBBY.md Context File
When Claude is building apps for Cubby, point it to theCUBBY.md file:
“Read CUBBY.md and follow its patterns when building this app”This file contains:
- Platform constraints
- API route patterns (especially the async params for Next.js 16)
- Authentication headers
- What NOT to do (no auth libraries, etc.)
Example: Full Workflow
Here’s what a typical conversation might look like: You: Build a simple expense tracker app. Use Prisma for the database with an Expense model that has amount, description, and date fields. Deploy it to Cubby. Claude:- Creates the project with
cubby init - Defines the Prisma schema
- Creates API routes for CRUD operations
- Builds a simple UI
- Uses
deploy_appto deploy - Returns the live URL
- Asks you for your OpenAI API key
- Uses
set_secretto store it - Reminds you that a redeploy is needed
- Uses
deploy_appto redeploy
- Uses
get_app_logs - Formats and displays the logs
Tips
Be Specific
Tell Claude exactly what you want:- “Deploy this app to Cubby” - clear
- “Put this online” - vague
Reference CUBBY.md
When starting a new app, tell Claude:“This is a Cubby app. Read CUBBY.md for context.”
Redeploy After Secrets
Setting secrets doesn’t restart your app. After adding secrets:“Redeploy the app so it picks up the new secret”
Troubleshooting
”Tool not available”
Make sure the MCP config is correct and Claude has been restarted.”Not authenticated”
Runcubby login in your terminal.
”Deploy failed”
Ask Claude to runcubby check to see what’s wrong.
Related
- CUBBY.md File - Context file for AI assistants
cubby deploy- CLI deploy commandcubby secrets- CLI secrets management