Menu
Docs / Claude Code Integration

Claude Code Integration

Connect Claude Code to manage bugs from your terminal

Connect Claude Code to Ship It Squirrel to manage servers, deploy apps, monitor bugs, and view logs directly from your terminal using the Model Context Protocol (MCP).

Prerequisites

  • Claude Code installed
  • Node.js 18 or higher
  • A Ship It Squirrel account with an API token

Step 1: Get your API Token

Go to Settings > API and create a new API token. Copy the token - you'll only see it once.

Step 2: Add to Claude Code

The easiest way is to run this command in your terminal:

claude mcp add -e "SHIPITSQUIRREL_API_TOKEN=YOUR_TOKEN" -s user shipitsquirrel -- npx -y @shipitsquirrel/mcp-server

Replace YOUR_TOKEN with your actual API token.

Manual Installation

Alternatively, add this to your ~/.claude.json file:

{
  "mcpServers": {
    "shipitsquirrel": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@shipitsquirrel/mcp-server"],
      "env": {
        "SHIPITSQUIRREL_API_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

Important: The config file is ~/.claude.json (in your home directory), not ~/.claude/settings.json.

Step 3: Restart Claude Code

Restart Claude Code to load the MCP server. Verify it's connected by running:

/mcp

You should see shipitsquirrel listed with a green checkmark.

Available Tools

Once connected, Claude has access to these tools:

Infrastructure

Tool Description
list_regions List available DigitalOcean regions
list_sizes List available droplet sizes with pricing
create_server Create and provision a new server (Ruby, PostgreSQL, Redis, Caddy)
delete_server Delete a server and its DigitalOcean droplet
create_app Create a new app on a server with GitHub integration
update_app Update app config (branch, deploy mode, domain)
delete_app Delete an app and all associated data

Servers

Tool Description
list_servers List all your servers with IPs and status
get_server Get detailed server info including apps

Apps

Tool Description
list_apps List all your apps with status and bug counts
get_app Get detailed information about a specific app

Deployments & Operations

Tool Description
list_deployments List recent deployments for an app
get_deployment Get deployment details including full log output
deploy_app Trigger a new deployment for an app
restart_app Restart the application (Puma web server)
rollback_app Rollback to the previous successful deployment
get_app_logs Get recent application logs from the server

Bug Tracking

Tool Description
list_bugs List bugs for an app, optionally filtered by status
get_bug Get full bug details including backtrace
resolve_bug Mark a bug as resolved
ignore_bug Mark a bug as ignored
reopen_bug Reopen a resolved or ignored bug

Full Stack Setup (Agent Workflow)

With the infrastructure tools, Claude can go from zero to a running Rails app entirely from the terminal:

  1. list_regions / list_sizes — Pick infrastructure
  2. create_server name region size — Provisions server with Ruby, PostgreSQL, Redis, Caddy
  3. get_server (poll until status is "provisioned") — Wait for provisioning
  4. create_app name server repo — Configures deploy key, webhook, subdomain
  5. deploy_app — Deploys the app with SSL

Just tell Claude: "Create a new server in NYC and deploy my Rails app from github.com/user/repo" and it handles the rest.

Prerequisites: You need a DigitalOcean token configured in Settings > Integrations and an active subscription in Settings > Billing.

Example Usage

Once connected, you can ask Claude things like:

Infrastructure

  • "Create a new server in San Francisco"
  • "Create a Rails app called my-app on my-server from git@github.com:me/my-app.git"
  • "Delete the staging server"

Monitoring

  • "List my Ship It Squirrel servers"
  • "Show me the apps on my-server"
  • "Show me open bugs for my-app"
  • "Get details on bug abc123"
  • "Show me the last 200 lines of logs for my-app"

Deploying & Operations

  • "Deploy my-app"
  • "Show me the deployment log for deploy-id"
  • "Restart my-app"
  • "Rollback my-app to the previous version"

Bug Fix Workflow

  • "Show me the open bugs, look at the backtrace, fix the code, then deploy the fix"
  • "Check the logs for any errors in my-app"
  • "Resolve that bug with note 'Fixed in commit xyz'"

Troubleshooting

MCP server not showing up

  1. Make sure you've restarted Claude Code after adding the configuration
  2. Verify the config is in ~/.claude.json (not ~/.claude/settings.json)
  3. Run claude mcp list to see configured servers

Authentication errors

  • Verify your API token is correct
  • Make sure the token hasn't been revoked in Settings > API

Connection issues

  • Make sure you have Node.js 18+ installed: node --version
  • Try running the server manually to see errors: SHIPITSQUIRREL_API_TOKEN=your-token npx -y @shipitsquirrel/mcp-server