# Hathora MCP

> Hathora MCP lets you manage your entire multiplayer game infrastructure using natural conversation. You can create, deploy, and monitor applications globally—from spinning up private player lobbies to managing complex builds across different regions. Control everything related to your live game services directly through your AI agent.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** multiplayer-hosting, game-servers, hathora-cloud, deployment-automation, serverless-gaming

## Description

Managing a large-scale game isn't just about writing code; it's about keeping dozens of services running perfectly across multiple continents. This MCP gives you full command over that operational mess. Instead of jumping between deployment dashboards or SSHing into random machines, you talk to your AI agent and tell the system what needs to happen.

Need a new version deployed? You can initiate builds and configure deployments with specific resources like CPU and memory. Want players in London to connect right now? The MCP lets you spin up global game rooms and retrieve their connection info instantly. Need to check if everything is healthy? List and monitor active processes for any application, keeping tabs on your infrastructure’s health without logging into a single console. This control over the entire service lifecycle means less downtime and faster testing cycles. Because it's hosted in the Vinkius catalog, you connect once from Claude, Cursor, or Windsurf, and instantly have access to this level of deployment automation.

## Tools

### create_application
Sets up a new service container within Hathora for your specific game logic.

### create_build
Initiates a new process to prepare and compile server binaries for deployment.

### create_deployment
Finalizes and launches a service version, assigning it resource limits like CPU and memory.

### create_lobby
Creates a new, temporary group space to facilitate player matchmaking and discovery.

### create_room
Spins up a dedicated game session or room in a specified global region.

### get_application
Retrieves detailed information about an existing application ID.

### get_room_connection_info
Retrieves the necessary network address and credentials for an active game room.

### list_active_processes
Lists all running instances for an application so you can check its current operational status.

### upload_build
Uploads the completed binary file (tarball) required for a specific build ID.

## Prompt Examples

**Prompt:** 
```
Create a new Hathora application named 'GalacticWarfare'.
```

**Response:** 
```
I've created the application 'GalacticWarfare'. Its unique App ID is `app-789-xyz`. You can now use this ID to create builds and deployments.
```

**Prompt:** 
```
Start a new game room for appId 'app-789-xyz' in the London region.
```

**Response:** 
```
Requesting room creation in London... Success! Room `room-abc-123` is now active. Would you like the connection info for this room?
```

**Prompt:** 
```
List all active processes for application 'app-789-xyz'.
```

**Response:** 
```
I found 3 active processes for 'app-789-xyz'. Two are running in 'Seattle' and one in 'Frankfurt'. All processes are currently healthy.
```

## Capabilities

### Provisioning Game Sessions
Create private or public player lobbies and spin up live game rooms across global regions.

### Managing Applications
Set up, inspect, and manage the core services that power your game using dedicated application IDs.

### Controlling Infrastructure Builds
Start new builds and upload necessary server binaries to prepare for deployment.

### Deploying Services Globally
Configure and execute deployments, setting resource limits like memory and CPU for specific environments.

### Monitoring System Health
List active server processes to track which applications are currently running and how healthy they are.

## Use Cases

### Launching Beta Regions
The dev team needs to test the new game build in both Seattle and London. The agent first runs `create_build` and `upload_build`, then uses `create_deployment` twice, specifying different regions for two separate live versions.

### Debugging a Connection Issue
A player reports they can't connect. The agent first runs `create_room` in the player's nearest region and then uses `get_room_connection_info` to immediately give the client the correct, current address.

### Post-Mortem System Check
After an incident, the ops engineer needs a full status report. They ask the agent to run `list_active_processes` against the main application ID to confirm every service is currently healthy and running.

### Organizing Matchmaking Events
To run an organized tournament, the studio lead asks the agent to first use `create_lobby`, then waits for participants to join before finally initiating a dedicated match with `create_room`.

## Benefits

- Manage the full service lifecycle, from initial application creation using `create_application` to final deployment via `create_deployment`, all through conversation.
- Instantly spin up temporary game sessions by calling `create_room`. You then use `get_room_connection_info` to get the exact address players need right now.
- Eliminate manual build steps. Just tell your agent to start a new process using `create_build`, upload the files with `upload_build`, and it handles the rest.
- Never wonder if a service is running or where it failed. Use `list_active_processes` to check the health of any application without logging into a dashboard.
- Setup player discovery by having your agent execute `create_lobby`, making matchmaking setup as simple as asking a question.

## How It Works

The bottom line is that you manage complex, multi-region game deployments using simple, natural conversation.

1. Subscribe to this MCP within Vinkius, providing your Hathora Developer Token.
2. Directly ask your AI agent to perform an infrastructure task (e.g., 'Start a new game room in Frankfurt for app XYZ').
3. Your agent executes the command, and you receive immediate confirmation, connection details, or process status.

## Frequently Asked Questions

**How do I start managing applications using Hathora MCP?**
You first use `create_application` to set up the core service container for your game. After that, you can run `get_application` to view its current details and status.

**What if I need to test a new server version?**
Start by calling `create_build` to initiate the build process. Once complete, use `upload_build` with your binary file before running `create_deployment` to launch it.

**Can I check if a game room is active?**
Yes. You first run `create_room` in the desired region, and then immediately follow up by calling `get_room_connection_info` to get the live network details.

**Does Hathora MCP handle matchmaking setups?**
It handles it through two tools. You use `create_lobby` to set up the general group space, and then you can finally create a dedicated session using `create_room` for the actual match.

**Is this MCP better than just running scripts?**
Yes. Running scripts is brittle. This MCP manages state across builds and deployments, allowing you to tell it *what* you want (e.g., 'make sure the service is deployed') rather than writing complex code that assumes every single prerequisite step was successful.