|
| 1 | +# Setting Up Runloop MCP with Claude |
| 2 | + |
| 3 | +This guide will walk you through connecting the Runloop MCP server to Claude Desktop. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +1. Make sure you have Claude Desktop installed |
| 8 | +2. Authenticate with Runloop: `rln auth` |
| 9 | +3. Make sure `rln` is installed globally and in your PATH |
| 10 | + |
| 11 | +## Quick Setup (Automatic) |
| 12 | + |
| 13 | +The easiest way to set up Runloop with Claude Desktop: |
| 14 | + |
| 15 | +```bash |
| 16 | +rln mcp install |
| 17 | +``` |
| 18 | + |
| 19 | +This command will: |
| 20 | +- Automatically find your Claude Desktop configuration file |
| 21 | +- Add the Runloop MCP server configuration |
| 22 | +- Preserve any existing MCP servers you have configured |
| 23 | + |
| 24 | +Then just restart Claude Desktop and you're ready to go! |
| 25 | + |
| 26 | +## Manual Setup |
| 27 | + |
| 28 | +If you prefer to set it up manually or the automatic install doesn't work: |
| 29 | + |
| 30 | +### 1. Find Your Claude Configuration File |
| 31 | + |
| 32 | +The location depends on your operating system: |
| 33 | + |
| 34 | +**macOS:** |
| 35 | +``` |
| 36 | +~/Library/Application Support/Claude/claude_desktop_config.json |
| 37 | +``` |
| 38 | + |
| 39 | +**Windows:** |
| 40 | +``` |
| 41 | +%APPDATA%\Claude\claude_desktop_config.json |
| 42 | +``` |
| 43 | + |
| 44 | +**Linux:** |
| 45 | +``` |
| 46 | +~/.config/Claude/claude_desktop_config.json |
| 47 | +``` |
| 48 | + |
| 49 | +### 2. Edit the Configuration File |
| 50 | + |
| 51 | +If the file doesn't exist, create it. Add or update it with this configuration: |
| 52 | + |
| 53 | +```json |
| 54 | +{ |
| 55 | + "mcpServers": { |
| 56 | + "runloop": { |
| 57 | + "command": "rln", |
| 58 | + "args": ["mcp", "start"] |
| 59 | + } |
| 60 | + } |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +**If you already have other MCP servers configured**, just add the runloop entry to the existing `mcpServers` object: |
| 65 | + |
| 66 | +```json |
| 67 | +{ |
| 68 | + "mcpServers": { |
| 69 | + "existing-server": { |
| 70 | + "command": "some-command", |
| 71 | + "args": ["some-args"] |
| 72 | + }, |
| 73 | + "runloop": { |
| 74 | + "command": "rln", |
| 75 | + "args": ["mcp", "start"] |
| 76 | + } |
| 77 | + } |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | +### 3. Restart Claude Desktop |
| 82 | + |
| 83 | +Close and reopen Claude Desktop completely for the changes to take effect. |
| 84 | + |
| 85 | +### 4. Verify It's Working |
| 86 | + |
| 87 | +In Claude Desktop, you should now be able to ask Claude to interact with your Runloop account: |
| 88 | + |
| 89 | +**Try these example prompts:** |
| 90 | + |
| 91 | +- "Can you list all my devboxes?" |
| 92 | +- "Show me my running devboxes" |
| 93 | +- "Create a new devbox called 'test-env'" |
| 94 | +- "What blueprints are available?" |
| 95 | +- "Execute 'pwd' on devbox [your-devbox-id]" |
| 96 | + |
| 97 | +Claude will now have access to these Runloop tools and can manage your devboxes! |
| 98 | + |
| 99 | +## Troubleshooting |
| 100 | + |
| 101 | +### "Command not found: rln" |
| 102 | + |
| 103 | +Make sure `rln` is in your PATH. Test by running `which rln` (macOS/Linux) or `where rln` (Windows) in your terminal. |
| 104 | + |
| 105 | +If not found: |
| 106 | +- If installed via npm globally: `npm install -g @runloop/rl-cli` |
| 107 | +- Check your npm global bin directory is in PATH: `npm config get prefix` |
| 108 | + |
| 109 | +### "API key not configured" |
| 110 | + |
| 111 | +Run `rln auth` to configure your API key before using the MCP server. |
| 112 | + |
| 113 | +### Claude doesn't show Runloop tools |
| 114 | + |
| 115 | +1. Make sure you saved the config file correctly (valid JSON) |
| 116 | +2. Restart Claude Desktop completely (quit, not just close window) |
| 117 | +3. Check Claude's developer logs for errors: |
| 118 | + - **macOS:** `~/Library/Logs/Claude/` |
| 119 | + - **Windows:** `%APPDATA%\Claude\logs\` |
| 120 | + |
| 121 | +### Testing the MCP server manually |
| 122 | + |
| 123 | +You can test if the MCP server is working by running: |
| 124 | + |
| 125 | +```bash |
| 126 | +rln mcp start |
| 127 | +``` |
| 128 | + |
| 129 | +It should output: `Runloop MCP server running on stdio` |
| 130 | + |
| 131 | +Press Ctrl+C to stop it. |
| 132 | + |
| 133 | +## Advanced Configuration |
| 134 | + |
| 135 | +### Using Development Environment |
| 136 | + |
| 137 | +If you want to connect to Runloop's development environment: |
| 138 | + |
| 139 | +```json |
| 140 | +{ |
| 141 | + "mcpServers": { |
| 142 | + "runloop": { |
| 143 | + "command": "rln", |
| 144 | + "args": ["mcp", "start"], |
| 145 | + "env": { |
| 146 | + "RUNLOOP_ENV": "dev" |
| 147 | + } |
| 148 | + } |
| 149 | + } |
| 150 | +} |
| 151 | +``` |
| 152 | + |
| 153 | +### Using a Specific Path |
| 154 | + |
| 155 | +If `rln` isn't in your PATH, you can specify the full path: |
| 156 | + |
| 157 | +```json |
| 158 | +{ |
| 159 | + "mcpServers": { |
| 160 | + "runloop": { |
| 161 | + "command": "/full/path/to/rln", |
| 162 | + "args": ["mcp", "start"] |
| 163 | + } |
| 164 | + } |
| 165 | +} |
| 166 | +``` |
| 167 | + |
| 168 | +Find the full path with: `which rln` (macOS/Linux) or `where rln` (Windows) |
| 169 | + |
| 170 | +## What Can Claude Do Now? |
| 171 | + |
| 172 | +Once connected, Claude can: |
| 173 | + |
| 174 | +- ✅ List all your devboxes |
| 175 | +- ✅ Get detailed information about specific devboxes |
| 176 | +- ✅ Create new devboxes |
| 177 | +- ✅ Execute commands on devboxes |
| 178 | +- ✅ Shutdown, suspend, and resume devboxes |
| 179 | +- ✅ List available blueprints |
| 180 | +- ✅ List and create snapshots |
| 181 | + |
| 182 | +Claude will automatically use these tools when you ask questions about your Runloop infrastructure! |
| 183 | + |
| 184 | +## Example Conversation |
| 185 | + |
| 186 | +**You:** "What devboxes do I have running right now?" |
| 187 | + |
| 188 | +**Claude:** *Uses the list_devboxes tool and shows you all running devboxes with their details* |
| 189 | + |
| 190 | +**You:** "Create a new devbox called 'api-server' using the python-base blueprint" |
| 191 | + |
| 192 | +**Claude:** *Uses the create_devbox tool with the specified parameters and confirms creation* |
| 193 | + |
| 194 | +**You:** "Run 'python --version' on that new devbox" |
| 195 | + |
| 196 | +**Claude:** *Uses the execute_command tool and shows you the output* |
| 197 | + |
| 198 | +--- |
| 199 | + |
| 200 | +**Need help?** Open an issue at https://github.com/runloop/rl-cli-node/issues |
0 commit comments