# MCP Server

The MCP Server allows AI agents running on your computer to interact with Mix It Up through the Model Context Protocol. Point a client such as Claude Code at the server address and the agent can check on your session, run commands, send chat messages, and manage viewer currency, inventory, counters, and quotes.

**WARNING**: Any agent connected to this server can read your configuration and run commands on your behalf, including sending chat messages. Only enable this while you are actively working with an agent you trust.

## Enabling the MCP Server

- Head to the Services page inside Mix It Up
- Select Connect under the MCP Server section

The server starts at `http://localhost:8912/mcp` and will reconnect automatically each time Mix It Up launches until you disconnect it. The Services page shows the address to point a client at once the server is running. The MCP Server is separate from the [Developer API](/docs/reference/developer-api), which owns port 8911, so the two run on their own ports and can be enabled independently.

The "Open To Local Network" option makes the server reachable from other devices on your network instead of only this computer. Mix It Up must be running as Administrator for this option to take effect. A non-elevated run falls back to this computer only rather than failing to start.

## Connecting a Client

Add the server address to your MCP client using the HTTP transport. For example, with Claude Code:

```bash
claude mcp add --transport http mixitup http://localhost:8912/mcp
```

## Available Tools

Agents should call `get_status` first and wait until the settings are reported as loaded, since every other tool fails before that. Most entities are identified by GUID handed out by their listing tool, counters are addressed by name, and tools that act on a viewer accept either the viewer's internal user ID or their platform username.

- **Status:** `get_status`
- **Commands:** `list_commands`, `get_command`, `run_command`, `enable_command`, `disable_command`, `toggle_command`
- **Chat:** `send_chat_message`, `send_whisper`, `clear_chat`
- **Users:** `get_user`, `get_user_by_id`, `list_users`, `list_active_users`, `get_users_bulk`, `add_user`, `set_user_watch_time`, `delete_user`
- **Currency:** `list_currencies`, `get_user_currency`, `adjust_user_currency`, `set_user_currency`, `give_currency_to_users`
- **Inventory:** `list_inventories`, `get_inventory`, `list_user_inventory_items`, `get_user_inventory_item`, `adjust_user_inventory_item`, `set_user_inventory_item`
- **Counters:** `list_counters`, `get_counter`, `create_counter`, `set_counter`, `update_counter`, `reset_counter`, `delete_counter`
- **Leaderboards:** `get_watchtime_leaderboard`, `get_currency_leaderboard`, `get_inventory_item_leaderboard`
- **Quotes:** `list_quotes`, `get_quote`, `add_quote`

Tools that change viewer data, such as currency, inventory, watch time, and user deletion, change real data on a live channel, and the chat tools post publicly to your stream chat. Review what an agent is doing before letting it run unattended.
