npm package: @stablestudio/mcp-server
Description: MCP server for StableStudio AI image and video generation
Latest version: 0.2.1
Deprecated: Use x402scan-mcp instead

# StableStudio MCP Server

MCP server for AI image/video generation with USDC micropayments on Base.

## Install

### Claude Code

```bash
claude mcp add stablestudio -- npx -y @stablestudio/mcp-server@latest
```

### Codex

```bash
codex mcp add stablestudio -- npx -y @stablestudio/mcp-server@latest
```

### Cursor

[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=stablestudio&config=eyJjb21tYW5kIjoiL2Jpbi9iYXNoIiwiYXJncyI6WyItYyIsInNvdXJjZSAkSE9NRS8ubnZtL252bS5zaCAyPi9kZXYvbnVsbDsgZXhlYyBucHggLXkgQHN0YWJsZXN0dWRpby9tY3Atc2VydmVyQGxhdGVzdCJdfQ%3D%3D)

### Claude Desktop

[![Add to Claude](../../public/add-to-claude-button.png)](https://github.com/merit-systems/StableStudio/raw/main/packages/mcp-server/stablestudio.mcpb)

<details>
<summary>Manual installation</summary>

**Claude Code** - Already installed via command above.

**Codex** - Add to `~/.codex/config.toml`:
```toml
[mcp_servers.stablestudio]
command = "npx"
args = ["-y", "@stablestudio/mcp-server@latest"]
```

**Cursor** - Add to `.cursor/mcp.json`:
```json
{
  "mcpServers": {
    "stablestudio": {
      "command": "/bin/bash",
      "args": ["-c", "source $HOME/.nvm/nvm.sh 2>/dev/null; exec npx -y @stablestudio/mcp-server@latest"]
    }
  }
}
```

**Claude Desktop** - Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
```json
{
  "mcpServers": {
    "stablestudio": {
      "command": "/bin/bash",
      "args": ["-c", "source $HOME/.nvm/nvm.sh 2>/dev/null; exec npx -y @stablestudio/mcp-server@latest"]
    }
  }
}
```

</details>

## Usage

On first run, a wallet is generated at `~/.stablestudio/wallet.json`. Deposit USDC on Base to the wallet address before generating.

**Workflow:**
1. `get_wallet` - Check balance
2. `open_deposit` - Get deposit instructions if needed
3. `generate_image_*` or `generate_video_*` - Start generation
4. `poll_job` → `wait(15)` → `poll_job` - Repeat until complete
5. `download` - Save result to disk

### Veo 3.1 Frame Interpolation

`image_to_video_veo` supports first/last-frame interpolation by providing both a starting frame and an optional ending frame.

**How to use:**
1. Upload your first and last frames with `upload_image`.
2. Call `image_to_video_veo` with `imageUrl` (first frame) and `lastFrameUrl` (last frame):

```jsonc
// 1) Upload frames (returns a URL each time)
{ "tool": "upload_image", "path": "/path/first.png" } // -> firstFrameUrl
{ "tool": "upload_image", "path": "/path/last.png" }  // -> lastFrameUrl

// 2) Interpolate between them
{
  "tool": "image_to_video_veo",
  "imageUrl": "<firstFrameUrl>",
  "lastFrameUrl": "<lastFrameUrl>",
  "prompt": "Camera slowly pans from first to last frame",
  "durationSeconds": "8",
  "resolution": "1080p"
}
```

If you omit `lastFrameUrl`, Veo generates video using only the first frame (standard image-to-video).

## Tools (19)

| Tool | Cost |
|------|------|
| `get_wallet` | Free |
| `open_deposit` | Free |
| `upload_image` | $0.01 |
| `download` | Free |
| `generate_image_nano_banana` | $0.039 |
| `generate_image_nano_banana_pro` | $0.13-0.24 |
| `generate_image_gpt4` | $0.01-0.17 |
| `edit_image_nano_banana` | $0.039 |
| `edit_image_nano_banana_pro` | $0.13-0.24 |
| `edit_image_gpt4` | $0.01-0.17 |
| `generate_video_wan25` | $0.07-0.10/sec |
| `generate_video_sora` | $0.10-0.50/sec |
| `generate_video_veo` | $0.40/sec |
| `image_to_video_wan25` | $0.07-0.10/sec |
| `image_to_video_sora` | $0.10-0.50/sec |
| `image_to_video_veo` | $0.40/sec |
| `poll_job` | Free |
| `list_jobs` | Free |
| `wait` | Free |

## Environment

| Variable | Description |
|----------|-------------|
| `STABLESTUDIO_PRIVATE_KEY` | Override wallet (optional) |
| `STABLESTUDIO_NETWORK` | `base` (default) or `base-sepolia` |

## Develop

```bash
# From repo root
pnpm install
cd packages/mcp-server

# Add local server to Claude Code
claude mcp add stablestudio-dev -- npx tsx /path/to/packages/mcp-server/src/index.ts

# Build
pnpm build

# Typecheck
pnpm typecheck
```