> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Servers Overview

> Bring XHuoAPI into Claude Desktop, Cursor, Windsurf and other Model-Context-Protocol-aware AI tools.

We ship official **MCP (Model Context Protocol) servers** for every core service. Claude Desktop, Cursor, Windsurf, Continue, and any MCP-aware AI tool can call XHuoAPI APIs directly — no more pasting cURL commands; the AI assistant picks the right endpoint, passes parameters, and parses results.

## When to use MCP

<CardGroup cols={2}>
  <Card title="✅ Inside IDE / desktop AI" icon="circle-check">
    You want Claude / Cursor to generate images, search the web, transcode video for you
  </Card>

  <Card title="✅ Agent / workflow" icon="robot">
    Expose XHuoAPI as a toolset to an AI agent
  </Card>

  <Card title="❌ Web / mobile production" icon="circle-xmark">
    Use the REST API directly — more flexible
  </Card>

  <Card title="❌ Mass inference" icon="circle-xmark">
    Call [api.xhuoapi.ai](https://api.xhuoapi.ai/v1) directly
  </Card>
</CardGroup>

## All MCP Servers

<CardGroup cols={3}>
  <Card title="Midjourney" icon="image" href="/en/mcp/midjourney">
    AI image generation
  </Card>

  <Card title="Seedream" icon="image" href="/en/mcp/seedream">
    ByteDance image
  </Card>

  <Card title="Sora" icon="video" href="/en/mcp/sora">
    OpenAI video
  </Card>

  <Card title="Veo" icon="video" href="/en/mcp/veo">
    Google video
  </Card>

  <Card title="Luma" icon="video" href="/en/mcp/luma">
    Luma Dream Machine
  </Card>

  <Card title="Seedance" icon="video" href="/en/mcp/seedance">
    ByteDance video
  </Card>

  <Card title="Suno" icon="music" href="/en/mcp/suno">
    AI music
  </Card>

  <Card title="Serp" icon="magnifying-glass" href="/en/mcp/serp">
    Google web search
  </Card>

  <Card title="ShortURL" icon="link" href="/en/mcp/shorturl">
    URL shortener
  </Card>
</CardGroup>

## Prerequisites

1. An API Token (see [Authentication](/en/authentication))
2. Python 3.10+ (or `pipx` / `uvx`)
3. The MCP config file of your AI tool

## Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (Mac) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json theme={null}
{
  "mcpServers": {
    "midjourney": {
      "command": "uvx",
      "args": ["mcp-midjourney"],
      "env": {
        "XHuoAPI_API_TOKEN": "YOUR_API_TOKEN"
      }
    },
    "suno": {
      "command": "uvx",
      "args": ["mcp-suno"],
      "env": {
        "XHuoAPI_API_TOKEN": "YOUR_API_TOKEN"
      }
    },
    "serp": {
      "command": "uvx",
      "args": ["mcp-serp"],
      "env": {
        "XHuoAPI_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}
```

Restart Claude Desktop — a 🔌 icon will appear in the input box once tools are loaded.

## Cursor / Windsurf

In Cursor: `Settings` → `Tools & Integrations` → `Add new MCP server`, or edit `~/.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "midjourney": {
      "command": "uvx",
      "args": ["mcp-midjourney"],
      "env": {
        "XHuoAPI_API_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}
```

Windsurf supports the same `mcp.json` format.

## HTTP Transport

Every server supports both `stdio` (default) and `streamable-http`:

```bash theme={null}
# stdio (default, for desktop tools)
uvx mcp-midjourney

# HTTP (remote / multi-client)
uvx mcp-midjourney --transport streamable-http --host 0.0.0.0 --port 8000
```

In HTTP mode, AI clients connect to `http://your-host:8000/mcp`.

## pip Installation

If you don't want `uvx`:

```bash theme={null}
pip install mcp-midjourney mcp-suno mcp-serp
# then in your MCP config:
{
  "command": "mcp-midjourney",
  "args": [],
  "env": { "XHuoAPI_API_TOKEN": "..." }
}
```

## Billing

Calls made via MCP tools are calls to the XHuoAPI API — **same billing rules apply**. The MCP server itself is free; your token gets charged normally.

See [Pricing](/en/pricing/overview).

## Troubleshooting

* **AI doesn't see tools**: check MCP server logs (Claude Desktop: `~/Library/Logs/Claude/`); confirm the token isn't a typo
* **`uvx` not found**: `pip install uv`, or use plain `pip install`
* **HTTP rejected**: check firewall; listen on `0.0.0.0`, not `127.0.0.1`
* **Behind a proxy**: set `HTTPS_PROXY` env var

## Resources

* [GitHub source & releases](https://github.com/XHuoAPI)
* [SunoMCP on PyPI](https://pypi.org/project/mcp-suno/)
* [SerpMCP on PyPI](https://pypi.org/project/mcp-serp/)
