Skip to main content
Glama
README.md
# Sprite MCP Server

MCP server for managing Sprite VMs with **interactive UI dashboards** (MCP Apps).

Works with Claude.ai, Claude Desktop, Claude Code, VS Code, and any MCP-compatible client.

## Features

- **List & manage Sprite VMs** - Interactive dashboard with status indicators
- **Execute commands** - Terminal UI with command history
- **Checkpoints** - Create, list, restore filesystem snapshots
- **File transfer** - Push/pull files to/from remote sprites
- **Session management** - List, attach, kill sessions

---

## Windows Setup (Claude Desktop / Claude Code)

### Prerequisites

- **Node.js 20+** - Download from [nodejs.org](https://nodejs.org/)
- **Git** - Download from [git-scm.com](https://git-scm.com/download/win)
- **Sprite CLI** - Get your token from [sprites.dev](https://sprites.dev)

### Step 1: Install Sprite CLI

Download and install the Sprite CLI for Windows:

```powershell
# Using PowerShell (run as Administrator)
irm https://sprites.dev/install.ps1 | iex
```

Or download manually from [sprites.dev/downloads](https://sprites.dev/downloads).

### Step 2: Authenticate with Sprite

Get your API token from the Sprites dashboard, then:

```powershell
# Authenticate with your token
sprite auth setup --token "your-org/org-id/token-id/token-value"

# Or use interactive login (opens browser)
sprite login
```

Verify it works:

```powershell
sprite list
```

### Step 3: Clone and Build the MCP Server

```powershell
# Clone the repository
git clone https://github.com/Anansitrading/sprite-mcp-server.git
cd sprite-mcp-server

# Install dependencies
npm install

# Build the server
npm run build
```

### Step 4: Find Your Sprite CLI Path

```powershell
# Find where sprite is installed
where sprite
```

This typically returns something like:
- `C:\Users\YourName\.local\bin\sprite.exe`
- `C:\Users\YourName\AppData\Local\Programs\sprite\sprite.exe`

**Note this path** - you'll need it for configuration.

### Step 5: Configure Claude Desktop

Edit your Claude Desktop config file:

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

Open it with:
```powershell
notepad "$env:APPDATA\Claude\claude_desktop_config.json"
```

Add this configuration (replace paths with your actual paths):

```json
{
  "mcpServers": {
    "sprite": {
      "command": "node",
      "args": ["C:\\Users\\YourName\\sprite-mcp-server\\dist\\index.js"],
      "env": {
        "SPRITE_BIN": "C:\\Users\\YourName\\.local\\bin\\sprite.exe"
      }
    }
  }
}
```

**Important:** Use double backslashes (`\\`) in paths or forward slashes (`/`).

### Step 6: Restart Claude Desktop

1. Fully quit Claude Desktop (check system tray)
2. Reopen Claude Desktop
3. Look for the hammer icon (πŸ”¨) indicating MCP tools are available

### Step 7: Test It

Ask Claude:
- "List my sprites"
- "Execute `ls -la` on my sprite"
- "Create a checkpoint"

---

## Claude Code Setup (Windows)

For Claude Code CLI, add to your settings:

```powershell
# Open Claude Code settings
claude mcp add sprite -- node "C:\Users\YourName\sprite-mcp-server\dist\index.js"
```

Or edit `~/.claude/settings.json`:

```json
{
  "mcpServers": {
    "sprite": {
      "command": "node",
      "args": ["C:\\Users\\YourName\\sprite-mcp-server\\dist\\index.js"],
      "env": {
        "SPRITE_BIN": "C:\\Users\\YourName\\.local\\bin\\sprite.exe"
      }
    }
  }
}
```

---

## Linux/macOS Setup

### Prerequisites

- Node.js 20+
- Sprite CLI configured with credentials

### Quick Start

```bash
# Clone & build
git clone https://github.com/Anansitrading/sprite-mcp-server.git
cd sprite-mcp-server
npm install
npm run build

# Authenticate with Sprite
sprite login
# or
sprite auth setup --token "your-token"

# Test
sprite list
```

### Claude Desktop Configuration

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

```json
{
  "mcpServers": {
    "sprite": {
      "command": "node",
      "args": ["/path/to/sprite-mcp-server/dist/index.js"],
      "env": {
        "SPRITE_BIN": "/home/youruser/.local/bin/sprite"
      }
    }
  }
}
```

### Claude Code Configuration

```bash
claude mcp add sprite -- node /path/to/sprite-mcp-server/dist/index.js
```

---

## Server Deployment (for Claude.ai web)

For hosting your own MCP server accessible from claude.ai:

### Prerequisites

- Node.js 20+
- A domain pointing to your server (for HTTPS)
- Caddy or nginx for reverse proxy

### Deploy

```bash
# Clone & build
git clone https://github.com/Anansitrading/sprite-mcp-server.git
cd sprite-mcp-server
npm install
npm run build

# Configure
cp .env.example .env
# Edit .env:
#   PORT=3847
#   SPRITE_BIN=/home/sprite/.local/bin/sprite

# Run with systemd
sudo cp sprite-mcp.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable sprite-mcp
sudo systemctl start sprite-mcp
```

### Caddy Reverse Proxy

```caddyfile
mcp.yourdomain.com {
    reverse_proxy localhost:3847
}
```

### Connect to Claude.ai

1. Go to [claude.ai/settings/integrations](https://claude.ai/settings/integrations)
2. Add MCP Server:
   - **Name**: `sprite-mcp`
   - **URL**: `https://mcp.yourdomain.com/sse`
3. Test by asking Claude: "List my sprites"

---

## MCP Tools

| Tool | Description |
|------|-------------|
| `list_sprites` | List all Sprite VMs (with interactive dashboard) |
| `exec_command` | Execute command on a sprite (with terminal UI) |
| `create_checkpoint` | Create filesystem snapshot |
| `list_checkpoints` | List available checkpoints |
| `restore_checkpoint` | Restore to a checkpoint |
| `get_sprite_url` | Get sprite's public URL |
| `fetch_file` | Download file from sprite |
| `push_file` | Upload file to sprite |
| `list_sessions` | List active sessions |
| `create_sprite` | Create new sprite VM |
| `destroy_sprite` | Delete a sprite VM |

## Interactive UIs (MCP Apps)

This server uses **MCP Apps** to provide interactive interfaces:

- **Dashboard** (`ui://sprite/dashboard`) - Visual sprite management
- **Terminal** (`ui://sprite/terminal`) - Command execution interface

These render directly in the Claude conversation when using supported clients.

## Troubleshooting

### Windows: "sprite is not recognized"

Add Sprite to your PATH or use the full path in `SPRITE_BIN`:

```powershell
# Find sprite location
where sprite

# Add to PATH (PowerShell, run as admin)
$env:Path += ";C:\Users\YourName\.local\bin"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::User)
```

### Windows: "ENOENT" or "spawn error"

- Ensure all paths use double backslashes or forward slashes
- Verify the `dist/index.js` file exists (run `npm run build` first)
- Check that `SPRITE_BIN` points to the actual `.exe` file

### "Sprite CLI not authenticated"

```bash
# Re-authenticate
sprite login

# Or with token
sprite auth setup --token "your-token"

# Verify
sprite list
```

### Check server health

```bash
# If running HTTP server
curl http://localhost:3847/health
```

### Test MCP handshake

```bash
echo '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":1}' | npm start
```

## Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Claude.ai / Desktop                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    MCP Protocol                          β”‚
β”‚              (stdio or HTTP/SSE transport)               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                  sprite-mcp-server                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ MCP Tools   β”‚  β”‚ UI Resourcesβ”‚  β”‚ Sprite CLI      β”‚  β”‚
β”‚  β”‚ (11 tools)  β”‚  β”‚ (Dashboard) β”‚  β”‚ Integration     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    Sprite CLI                            β”‚
β”‚              (sprite list, exec, checkpoint...)          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                 Sprites API / VMs                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## License

MIT

TDQS

A3.6/5.0

Scored across 11 tools

Disambiguation5/5

Every tool has a clearly distinct purpose with no ambiguity. For example, create_sprite, destroy_sprite, and list_sprites handle VM lifecycle management, while fetch_file and push_file handle file transfers, and checkpoint tools manage snapshots. The descriptions clearly differentiate each tool's specific function.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern throughout (e.g., create_checkpoint, list_sessions, push_file). There are no deviations in style or convention, making the tool set predictable and easy to understand.

Tool Count5/5

With 11 tools, this is well-scoped for managing Sprite VMs. Each tool earns its place by covering essential operations like VM lifecycle, file management, checkpointing, and session monitoring without being excessive or insufficient.

Completeness5/5

The tool surface provides complete coverage for the Sprite VM domain, including CRUD operations (create, list, destroy), file management (push, fetch), checkpoint lifecycle (create, list, restore), and additional utilities (exec_command, get_sprite_url, list_sessions). There are no obvious gaps that would hinder agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues