Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
lint-and-format:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run Prettier check
run: npm run format:check

- name: Run ESLint
run: npm run lint

- name: Build TypeScript
run: npm run build
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
build
coverage
.next
*.log
package-lock.json
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
200 changes: 200 additions & 0 deletions CLAUDE_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# Setting Up Runloop MCP with Claude

This guide will walk you through connecting the Runloop MCP server to Claude Desktop.

## Prerequisites

1. Make sure you have Claude Desktop installed
2. Authenticate with Runloop: `rln auth`
3. Make sure `rln` is installed globally and in your PATH

## Quick Setup (Automatic)

The easiest way to set up Runloop with Claude Desktop:

```bash
rln mcp install
```

This command will:
- Automatically find your Claude Desktop configuration file
- Add the Runloop MCP server configuration
- Preserve any existing MCP servers you have configured

Then just restart Claude Desktop and you're ready to go!

## Manual Setup

If you prefer to set it up manually or the automatic install doesn't work:

### 1. Find Your Claude Configuration File

The location depends on your operating system:

**macOS:**
```
~/Library/Application Support/Claude/claude_desktop_config.json
```

**Windows:**
```
%APPDATA%\Claude\claude_desktop_config.json
```

**Linux:**
```
~/.config/Claude/claude_desktop_config.json
```

### 2. Edit the Configuration File

If the file doesn't exist, create it. Add or update it with this configuration:

```json
{
"mcpServers": {
"runloop": {
"command": "rln",
"args": ["mcp", "start"]
}
}
}
```

**If you already have other MCP servers configured**, just add the runloop entry to the existing `mcpServers` object:

```json
{
"mcpServers": {
"existing-server": {
"command": "some-command",
"args": ["some-args"]
},
"runloop": {
"command": "rln",
"args": ["mcp", "start"]
}
}
}
```

### 3. Restart Claude Desktop

Close and reopen Claude Desktop completely for the changes to take effect.

### 4. Verify It's Working

In Claude Desktop, you should now be able to ask Claude to interact with your Runloop account:

**Try these example prompts:**

- "Can you list all my devboxes?"
- "Show me my running devboxes"
- "Create a new devbox called 'test-env'"
- "What blueprints are available?"
- "Execute 'pwd' on devbox [your-devbox-id]"

Claude will now have access to these Runloop tools and can manage your devboxes!

## Troubleshooting

### "Command not found: rln"

Make sure `rln` is in your PATH. Test by running `which rln` (macOS/Linux) or `where rln` (Windows) in your terminal.

If not found:
- If installed via npm globally: `npm install -g @runloop/rl-cli`
- Check your npm global bin directory is in PATH: `npm config get prefix`

### "API key not configured"

Run `rln auth` to configure your API key before using the MCP server.

### Claude doesn't show Runloop tools

1. Make sure you saved the config file correctly (valid JSON)
2. Restart Claude Desktop completely (quit, not just close window)
3. Check Claude's developer logs for errors:
- **macOS:** `~/Library/Logs/Claude/`
- **Windows:** `%APPDATA%\Claude\logs\`

### Testing the MCP server manually

You can test if the MCP server is working by running:

```bash
rln mcp start
```

It should output: `Runloop MCP server running on stdio`

Press Ctrl+C to stop it.

## Advanced Configuration

### Using Development Environment

If you want to connect to Runloop's development environment:

```json
{
"mcpServers": {
"runloop": {
"command": "rln",
"args": ["mcp", "start"],
"env": {
"RUNLOOP_ENV": "dev"
}
}
}
}
```

### Using a Specific Path

If `rln` isn't in your PATH, you can specify the full path:

```json
{
"mcpServers": {
"runloop": {
"command": "/full/path/to/rln",
"args": ["mcp", "start"]
}
}
}
```

Find the full path with: `which rln` (macOS/Linux) or `where rln` (Windows)

## What Can Claude Do Now?

Once connected, Claude can:

- ✅ List all your devboxes
- ✅ Get detailed information about specific devboxes
- ✅ Create new devboxes
- ✅ Execute commands on devboxes
- ✅ Shutdown, suspend, and resume devboxes
- ✅ List available blueprints
- ✅ List and create snapshots

Claude will automatically use these tools when you ask questions about your Runloop infrastructure!

## Example Conversation

**You:** "What devboxes do I have running right now?"

**Claude:** *Uses the list_devboxes tool and shows you all running devboxes with their details*

**You:** "Create a new devbox called 'api-server' using the python-base blueprint"

**Claude:** *Uses the create_devbox tool with the specified parameters and confirms creation*

**You:** "Run 'python --version' on that new devbox"

**Claude:** *Uses the execute_command tool and shows you the output*

---

**Need help?** Open an issue at https://github.com/runloop/rl-cli-node/issues
Loading