Connect an AI Agent to Your GhostCap Servers

Use the GhostCap panel's MCP server and API keys to let Claude Code, Codex or Cursor manage your game servers

By the GhostCap teamUpdated

The GhostCap panel has a built-in MCP server, so AI agents such as Claude Code, Codex and Cursor can manage your game servers for you: read the console, edit files, install mods, restart a server and more. The agent signs in with one of your API keys.

Connecting an Agent

  1. Log in to the GhostCap Panel.
  2. Open the Account menu in the top right and choose Account Settings.
  3. Go to API & MCP.
  4. Under Connect an AI agent, click Copy prompt.
  5. Paste the prompt into your agent.

The first Copy prompt creates an API key called AI agent and includes it in the prompt. Every copy after that reuses the same key, so your agent does not collect a new one each time.

The MCP server address is https://panel.ghostcap.com/api/client/mcp if you would rather configure your agent by hand. Use the copy button next to it.

What an Agent Can Do

An API key does everything your account can do, on every server your account can reach. There is no way to limit a single key to one server, to a set of permissions, or to an expiry date. That includes destructive actions such as reinstalling a server, switching its game, deleting files and rotating the SFTP password.

Keys are not scoped. When you create one, the only fields are a Description and an optional list of Allowed IPs, which is the one restriction available. If you know the address your agent connects from, filling it in is worth doing.

Deleting the key is the off switch. Under API keys on the same page, delete the key and the agent is disconnected immediately.

Giving an Agent Less Access

Because a key inherits the account that made it, the way to limit an agent is to give it its own account with less access, rather than using your own.

  1. Open the server you want the agent to manage and go to Users.
  2. Click Invite user and enter an email address the agent's account will use.
  3. Set Access to Viewer or Operator rather than Admin, or turn on Customize permissions and pick the individual permissions it needs.
  4. Sign in to the panel as that account, go to API & MCP and create the key there.

That key then reaches only the servers the sub-user was invited to, with only the permissions you granted. See our sub-users guide for what each access level covers.

Scripting Against the API

The same keys work with the client API directly:

curl "https://panel.ghostcap.com/api/client/dashboard" \
  -H "Authorization: Bearer ptlc_..." \
  -H "Accept: application/json"

API & MCP → API reference lists every endpoint the panel itself uses, along with the MCP tool name for each one an agent can call.