# Xide APP MCP server

> Let AI assistants (Claude, ChatGPT, Cursor, VS Code, Claude Code) generate images, videos and audio with the user's Xide APP credits.

- Server URL: `https://xide.app/api/mcp` (Streamable HTTP, stateless, JSON responses)
- Protocol versions: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05
- Authentication: OAuth 2.1 (dynamic client registration + PKCE S256) or `Authorization: Bearer xide_live_…`
- OAuth discovery: https://xide.app/.well-known/oauth-protected-resource/api/mcp and https://xide.app/.well-known/oauth-authorization-server
- Limits: one `tools/call` per HTTP request, batches of up to 10 JSON-RPC messages; the key's scopes and daily credit cap apply to every tool.

## Connect with your account

In apps that support connectors, just add the server URL, then pick the permissions and daily cap on the Xide APP consent screen and approve. No key to copy.

- Claude (web and desktop): Settings → Connectors → Add custom connector → paste the URL → Connect
- ChatGPT: Settings → Apps & Connectors → Advanced → Developer mode → Create → paste the URL, authentication: OAuth

The consent screen lets the user choose permissions (generate, read, upload, account) and an optional daily credit cap. The access token is an API key that appears in the user's dashboard and can be revoked any time.

## Configure with a key

Cursor, Claude Code and VS Code also open the same consent screen when you add just the URL. To connect with a key instead, copy the configuration.

### Cursor — Add to ~/.cursor/mcp.json

```json
{
  "mcpServers": {
    "xide": {
      "url": "https://xide.app/api/mcp",
      "headers": {
        "Authorization": "Bearer xide_live_..."
      }
    }
  }
}
```

### Claude Code — Run in your terminal

```bash
claude mcp add --transport http xide https://xide.app/api/mcp --header "Authorization: Bearer xide_live_..."
```

### Claude Desktop — Add to claude_desktop_config.json (requires Node.js)

```json
{
  "mcpServers": {
    "xide": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://xide.app/api/mcp",
        "--header",
        "Authorization:${XIDE_AUTH}"
      ],
      "env": {
        "XIDE_AUTH": "Bearer xide_live_..."
      }
    }
  }
}
```

### VS Code — Add to .vscode/mcp.json

```json
{
  "servers": {
    "xide": {
      "type": "http",
      "url": "https://xide.app/api/mcp",
      "headers": {
        "Authorization": "Bearer xide_live_..."
      }
    }
  }
}
```

## Tools

### list_models

List the AI models available on Xide APP (image generation, image editing, video, audio, lip-sync, icons, utilities) with ids and estimated credit ranges. Use get_model to see a model's inputs.

Scope: `read`

| Argument | Type | Required | Description |
|---|---|---|---|
| category | image \| edit \| video \| audio \| lipsync \| icon \| utility \| recast | no | Only models of this category. |
| search | string | no | Filter by id or name, e.g. "kling" or "flux". |
| limit | integer (1–100) | no | Maximum number of models to return (default 40). |

### get_model

Get a model's inputs (types, required fields, allowed values, defaults), estimated credit range and resolution variants.

Scope: `read`

| Argument | Type | Required | Description |
|---|---|---|---|
| model | string | yes | Model id from list_models, e.g. "text-to-image-flux-2-pro". Resolution variants have their own ids (see get_model). |

### estimate_cost

Return the exact number of credits a generation with these inputs will cost, and the current balance. Does not spend credits.

Scope: `read`

| Argument | Type | Required | Description |
|---|---|---|---|
| model | string | yes | Model id from list_models, e.g. "text-to-image-flux-2-pro". Resolution variants have their own ids (see get_model). |
| inputs | object | no | Model inputs as returned by get_model, e.g. { "prompt": "...", "aspect_ratio": "16:9" }. |

### generate

Start a generation with a model and inputs (spends credits). Waits up to wait_seconds (default 40) and returns the outputs with links; if the job is still running it returns a job_id to check with get_job.

Scope: `generate`

| Argument | Type | Required | Description |
|---|---|---|---|
| model | string | yes | Model id from list_models, e.g. "text-to-image-flux-2-pro". Resolution variants have their own ids (see get_model). |
| inputs | object | yes | Model inputs as returned by get_model, e.g. { "prompt": "...", "aspect_ratio": "16:9" }. |
| wait_seconds | integer (0–45) | no | Seconds to wait for the job to finish (0-45). Default 40. |

### get_job

Get a job's status and outputs. Optionally wait up to wait_seconds for it to finish.

Scope: `read`

| Argument | Type | Required | Description |
|---|---|---|---|
| job_id | string | yes | Job id returned by generate. |
| wait_seconds | integer (0–45) | no | Seconds to wait for the job to finish (0-45). Default 0. |

### cancel_job

Cancel a job that is still queued; its credits are refunded. Jobs that are already processing can't be canceled.

Scope: `generate`

| Argument | Type | Required | Description |
|---|---|---|---|
| job_id | string | yes | Job id returned by generate. |

### list_jobs

List the user's most recent jobs (newest first), optionally filtered by status.

Scope: `read`

| Argument | Type | Required | Description |
|---|---|---|---|
| limit | integer (1–50) | no | Number of jobs (default 10). |
| status | queued \| processing \| completed \| failed \| cancelled | no | Only jobs with this status. |

### get_balance

Get the credit balance, this API key's scopes and daily credit cap, and today's usage.

Scope: `account`

### upload_from_url

Fetch an image, video or audio file from a public https URL into the user's Xide uploads and return an upload_id to use as a media input.

Scope: `upload`

| Argument | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public https URL of the file (max 256 MB). |

## Safety

Your key's permissions also apply to the assistant: a key without the "Generate" permission can't spend credits. We recommend a daily credit cap on keys you give to assistants.
