
mcp
com.edgegap/mcp
Deploy and operate multiplayer game servers on Edgegap's global edge network.
Documentation
Edgegap MCP Server
Connect AI coding agents to Edgegap through our MCP server. Your agent can take a headless server build all the way to players connecting: write or check the Dockerfile, push the image to your private Edgegap registry, deploy an authoritative dedicated server close to players, and read logs when something breaks.
๐ Supported Features
[!TIP] Using Unity, Unreal Engine, or Godot? Our Unity, Unreal Engine, and Godot guides and plugins remain the fastest path for those engines. The MCP server works alongside them, and on its own for any engine.
Use our MCP server when:
- Containerizing your game server - your agent writes a Dockerfile for your build (or reviews the one you have) against best practices, pushes the image to our private container registry, and removes unused old image tags to reclaim registry capacity.
- Deploying a dedicated server - create and update app versions, review available locations, deploy close to your players, and get server IP with ports to test client connection.
- Building a CI/CD pipeline - test your deployments and teardown from a build system.
- Troubleshooting a game server issue - inspect app versions and deployment status, read container logs and CPU/memory utilization, or reproduce a failed deployment.
- Running client-host and peer-to-peer games - create relay sessions providing NAT punchthrough and avoid connection blocking. Review Orchestration Models and Dedicated Servers or Relays? before deciding.
[!NOTE] Build the Linux server executable in your engine. Matchmakers (upload the configuration the MCP generates), server browser, lobbies, managed clusters, private fleets and billing are managed in the Edgegap dashboard.
[!NOTE] If you need help, please reach out to us over Discord. For live games support see our ticketing system.
๐ฎ What Your Agent Can Build
The server ships with 31 agent skills, each a step-by-step workflow for one engine, backend or tool. Your agent loads the one that matches your project:
| Covered | |
|---|---|
| Engines and netcode | Unity (Mirror), Netcode for GameObjects, FishNet, PurrNet, Photon Fusion 2 (Simple FPS), Unreal Engine (EOS Voice), Godot 4, Cocos Creator, Three.js and web games, WebAssembly physics (Rapier, Box2D, Jolt), any other engine through edgegap |
| Game backends | Nakama, Colyseus, PlayFab, Supabase, Unity Gaming Services Matchmaker |
| AI game makers | Claude, ChatGPT and Gemini chat games, Manus, fal.ai, vibe-coded games (Cursor, Codex, Lovable, Bolt and others) |
| Hosting services | Matchmaking (parties, regions, backfill), Relays for host/client games, Deploy API backends, CI with edgegap/deploy-action (launch checklist), public sample projects |
| Every project | Server design, Dockerfiles and registry, local parity tests, troubleshooting |
โ๏ธ Dedicated Servers or Relays?
Edgegap can host your multiplayer game in two ways. We recommend dedicated servers, and so does our MCP server: your agent will default to a dedicated server and only use a relay when you've chosen a host-client setup.
| Dedicated server (recommended) | Relay | |
|---|---|---|
| What Edgegap runs | Your headless server build, close to players | A traffic forwarder only, no game code |
| Who runs the game | The server | One player's game (the host) |
| Cheating | Much harder, the server has authority | The host can change anything |
| Fairness | Every player connects directly to the server | The host has no latency, everyone else goes through two hops |
| When the host leaves | The match continues | The match ends, unless your game supports host migration |
| Performance limited by | The server's allocated CPU and memory | The host's PC and home internet upload |
| You need | A server build in a container image | Netcode built as a listen server (host-client) |
[!NOTE] No server image yet? That's not a reason to choose relays. Your agent can write the Dockerfile for your build with
edgegap_generate_dockerfile. Learn more about relays in Distributed Relay.
๐ Installation
Add the hosted endpoint, https://mcp.edgegap.com/mcp, to your MCP client and sign in with your Edgegap account when it asks. You pick the organization and approve what the connection may do; no API token is pasted anywhere.
- Owners and admins can connect any app. Members can connect verified apps (Claude, Claude Code, ChatGPT and Codex), with the access their role allows.
- An app asks again when a tool needs access you haven't approved yet.
- See and revoke your connected apps in the dashboard under User Settings โ Authorized apps.
[!NOTE] The hosted endpoint no longer accepts API tokens. If your client's entry for it sends an
Authorizationheader, remove the header and reconnect to sign in. To keep using an API token, run the Local Server.
Popular Agents
Install Edgegap MCP server in your preferred agentic IDE with the Cursor or VS Code buttons at the top of this page, then sign in when the client asks.
Claude Code
claude mcp add --transport http edgegap https://mcp.edgegap.com/mcp --scope user
Then run /mcp in Claude Code, pick edgegap and sign in.
OpenAI Codex
The Edgegap plugin installs this server and the Edgegap skills together:
codex plugin marketplace add edgegap/llm-agent-skills
codex plugin add edgegap@edgegap
codex mcp login edgegap
Or add only the server:
codex mcp add edgegap --url https://mcp.edgegap.com/mcp
codex mcp login edgegap
codex mcp login opens the Edgegap sign-in; codex mcp list then shows edgegap with OAuth auth. The CLI, the IDE extension and the ChatGPT desktop app share this configuration. Worked example: netcode-sample-codex-slime-sumo.
Claude Desktop and claude.ai
Open Settings โ Connectors, add a custom connector with the URL https://mcp.edgegap.com/mcp, then connect it and sign in. The connector is available in claude.ai, Claude Desktop and the Claude mobile apps.
Cursor
The Cursor button at the top of this page installs it; to do it by hand, add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project), then sign in from Cursor's MCP settings:
{
"mcpServers": {
"edgegap": {
"url": "https://mcp.edgegap.com/mcp"
}
}
}
VS Code (Copilot agent mode)
The VS Code button at the top of this page installs it; to do it by hand, add this to .vscode/mcp.json (VS Code uses servers, not mcpServers), then sign in when VS Code asks:
{
"servers": {
"edgegap": {
"type": "http",
"url": "https://mcp.edgegap.com/mcp"
}
}
}
Windsurf
In ~/.codeium/windsurf/mcp_config.json, run the Local Server, which works in every client that starts MCP servers as commands:
{
"mcpServers": {
"edgegap": {
"command": "npx",
"args": ["-y", "@edgegap/mcp"],
"env": { "EDGEGAP_API_TOKEN": "xxxxxxxx-e458-4592-b607-c2c28afd8b62" }
}
}
}
mcp.json
Most agentic IDEs also support integration by pasting JSON configuration:
{
"mcpServers": {
"Edgegap": {
"type": "http",
"url": "https://mcp.edgegap.com/mcp"
}
}
}
Custom Integration
Install remote Edgegap MCP server in your agent's virtualized environment (never in your project!). The proxy must support MCP sign-in (OAuth); mcp-remote opens it in your browser on first use.
Node, using the mcp-remote npx package
{
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.edgegap.com/mcp", "--transport", "http-only"]
}
Python, using the mcp-proxy uvx package
{
"command": "uvx",
"args": ["mcp-proxy", "--transport", "streamablehttp", "https://mcp.edgegap.com/mcp"]
}
One-Click Install (Claude Desktop)
Download edgegap-mcp.mcpb and open it: Claude Desktop installs the local server as an extension and asks for your API token, which it keeps in the operating system's secure storage. The extension's settings also hold read-only mode, the application allowlist, the max duration ceiling and the deployment cap (the variables below). Each release attaches the bundle, built from that release's code. Any other app that installs MCPB bundles works the same way.
Local Server
The local server runs on your machine with an API token instead of a sign-in. Leave the token out and your agent asks you for it on first use, holding it in memory only for that session:
{
"mcpServers": {
"Edgegap": {
"command": "npx",
"args": ["-y", "@edgegap/mcp"],
"env": { "EDGEGAP_API_TOKEN": "xxxxxxxx-e458-4592-b607-c2c28afd8b62" }
}
}
}
Needs Node 18+. Pin a version in production (@edgegap/mcp@0.20.9) rather than floating on latest. Registered in the official MCP registry as com.edgegap/mcp (earlier versions are under dev.edgegap/mcp).
Generate (and view) your API tokens in Dashboard - User Settings / Tokens.
[!CAUTION] Do not integrate Edgegap API endpoints in game client, as your API token provides unlimited access to your account. See Integration for secure client-facing API endpoints and functions.
[!TIP] In case your secret tokens are compromised or leaked, delete and re-create them from dashboard.
The token is organization-wide and cannot be scoped to one application. Read DESIGN.md before giving it to an unattended agent.
The local server can also limit what an agent can do. These variables have no effect on the hosted endpoint at mcp.edgegap.com, which takes the two main ones as connection headers instead (see below):
| Variable | Default | Purpose |
|---|---|---|
EDGEGAP_API_TOKEN | (prompted) | API token. Optional: omit it and you're asked at first use. The token prefix is added for you. Never pass it as a command-line argument. |
EDGEGAP_READ_ONLY | 0 | Set to 1 and the tools that change something (marked โ in Tools) are never registered, so the agent cannot be talked into calling them. |
EDGEGAP_APP_ALLOWLIST | (empty) | Comma-separated application names. Limits what the agent can create and deploy into, and which deployments it can stop, tag or report. Reading (listing apps, versions, deployments, logs) is not limited. See DESIGN.md. |
EDGEGAP_MAX_DURATION_MINUTES | 60 | Ceiling on max_duration the agent may set on a version. edgegap_deploy also refuses a version whose max_duration is above it, or unlimited, unless the agent passes allow_long_running: true after asking you. |
EDGEGAP_MAX_AGENT_DEPLOYMENTS | 5 | edgegap_deploy refuses while this many deployments tagged edgegap-mcp are running. 0 turns the cap off. |
EDGEGAP_MAX_DEPLOYS_PER_RUN | 20 | Deploys one server process may send, failed ones included. Restart the server to reset it. 0 turns it off. |
EDGEGAP_STOP_OWN_ONLY | 0 | Set to 1 and edgegap_stop_deployment only stops deployments tagged edgegap-mcp, so an agent cannot stop servers it did not start. |
EDGEGAP_ENABLE_SKILLS_UPDATE | 0 | Set to 1 to let edgegap_update_skills run npx skills@1.7.4 update or claude plugin update with apply: true. Without it, it lists those commands for you to run. Hand-copied skills are rewritten from the bundle either way. The updaters get only path, home, temp, locale, proxy and npm settings, never EDGEGAP_* variables or anything named like a token, secret, password or key. |
EDGEGAP_TIMEOUT_MS | 30000 | Per-request HTTP timeout. |
EDGEGAP_SKILLS_CHECK | on | Set to off and the skill tools never read the latest skills version from GitHub. |
On the hosted endpoint (and the self-hosted Docker image), send these headers on the MCP connection. They can only narrow what the server allows, never widen it:
| Header | Purpose |
|---|---|
X-Edgegap-Read-Only: 1 | Same as EDGEGAP_READ_ONLY=1: no tool that changes something is offered. Use it for an ops or monitoring agent. |
X-Edgegap-App-Allowlist: my-game,my-game-staging | Same as EDGEGAP_APP_ALLOWLIST, for this connection. Combined with a server allowlist, only applications in both are allowed. |
An API token stays organization-wide: Edgegap cannot scope tokens. On the hosted endpoint, the access you approved at sign-in limits the connection as well.
Windows
The local server runs on Windows with Node.js 18 or newer, and CI runs the build and the stdio tests on Windows.
- Many Windows MCP clients cannot start
npxdirectly, because it is a.cmdscript. Start it throughcmd /c:"command": "cmd", "args": ["/c", "npx", "-y", "@edgegap/mcp"]. In Claude Code:claude mcp add Edgegap --env EDGEGAP_API_TOKEN=<token> -- cmd /c npx -y @edgegap/mcp. - In PowerShell, type
npx.cmdinstead ofnpxto run it by hand: a new Windows install blocks thenpxPowerShell script ("running scripts is disabled on this system"). - The first start downloads the package and can take a while; later starts are fast.
edgegap_update_skillsfinds skills installed in%USERPROFILE%, the same way as on macOS and Linux.
๐ Skills
The server includes the Edgegap agent skills: tested, step-by-step workflows for getting a multiplayer game online, with templates (Dockerfiles, matchmaker configs, Unity C# and Unreal C++ drop-ins) and known pitfalls. Any agent connected to Edgegap MCP gets them, with no separate install and no token needed, and is told to load the matching skill before working on a game project.
| Skill | For |
|---|---|
edgegap | Start here for any engine other than Unity or Unreal Engine, or platform questions. Routes to the rest. |
edgegap-unity | Unity end to end: server build, matchmaker, client, end-to-end test. |
edgegap-ngo | Unity with Netcode for GameObjects end to end: server start and self-stop, Find Match panel, Boss Room adapter, matchmaker. |
edgegap-fishnet | Unity with FishNet end to end: headless server, Bayou/WebGL, matchmaker, end-to-end test. |
edgegap-purrnet | Unity with PurrNet end to end: dedicated server, connect panel, matchmaker, end-to-end test. |
edgegap-fusion | Unity with Photon Fusion 2 end to end: IL2CPP Linux server, server bound to 0.0.0.0, Edgegap deployment, BR200 kit. |
edgegap-fusion-simplefps | Photon's Simple FPS sample on Edgegap dedicated servers. |
edgegap-godot | Godot 4 with a Godot dedicated server: headless export, ENet or WebSocket, matchmaker. |
edgegap-colyseus | Colyseus servers on Edgegap, direct or through the matchmaker. |
edgegap-nakama | Nakama as the backend, starting Edgegap servers for its matches. |
edgegap-playfab | PlayFab Matchmaking with Edgegap servers. |
edgegap-threejs | Three.js and other browser games with their own Node.js server. |
edgegap-matchmaking | Matchmaking design for any engine: who owns it, profiles, parties, region selection, backfill, third-party matchmakers. |
edgegap-manus | Browser games built with Manus: backend matchmaking, Steam sign-in, signed join tokens, Node WebSocket server. |
edgegap-unreal | Unreal Engine end to end: source engine, Linux server, matchmaker, end-to-end test. |
edgegap-eos-voice | Voice chat for an Unreal game on Edgegap with EOS Voice: server-side room tokens, match and team rooms. |
edgegap-server-design | Authoritative server design and the deployment lifecycle. |
edgegap-containerize | The container contract, Dockerfiles, registries, app versions. |
edgegap-local-testing | Parity tests on your machine, then one smoke-test deployment. |
edgegap-troubleshoot | Pull errors, crash loops, out-of-memory, clients that can't connect. |
edgegap-deployments-api | Backend code that deploys servers: webhooks, cleanup, Nakama, PlayFab, UGS, EOS. |
edgegap-launch | Launch checklist, rollouts, caching, cost control. |
edgegap-cocos | Cocos Creator 3.8 games with their own authoritative server (Node.js or any language). |
edgegap-browser-wasm | Browser games with WebAssembly physics (Rapier, Box2D, Jolt, ammo.js) on an authoritative server. |
edgegap-ugs-matchmaker | Unity Gaming Services Matchmaker starting an Edgegap server for each match. |
edgegap-supabase | Supabase as the game backend (sign-in, profiles, leaderboards) with Edgegap running each match. |
edgegap-vibe-coded | Single-player browser games made with an AI tool, taken online multiplayer. |
edgegap-chat-canvas | One-file games written in Claude, ChatGPT or Gemini, played online. |
edgegap-fal | Browser games built with fal.ai, made online multiplayer. |
edgegap-relays | Host/client games through Edgegap Relays: join codes, NAT traversal. |
edgegap-samples | Finds the public Edgegap sample, SDK or build tool closest to your project. |
They're served three ways, so every MCP client can reach them:
- Tools:
edgegap_list_skillsandedgegap_get_skill, which loads a skill'sSKILL.md, or one of its reference documents or templates withfile. - Prompts:
deploy-game-server("Deploy my game server to Edgegap") is the place to start: it finds the engine and netcode, loads the matching skill and walks the golden path, cleanup included. There is also one prompt per skill, named after it. In Claude Code they show up as slash commands, e.g./mcp__edgegap__deploy-game-server. - Resources: each skill's
SKILL.mdis listed, atedgegap-skill://<skill>/SKILL.md; every other file is read through theedgegap-skill://{skill}/{+path}template, e.g.edgegap-skill://edgegap-unity/references/deploy.md.
Each release bundles the skills at the commit pinned in scripts/skills-pin.txt; edgegap_context reports which pack is loaded. edgegap_list_skills also reads the latest pack version from GitHub (one version number, cached for an hour; EDGEGAP_SKILLS_CHECK=off turns it off) and says when a newer one is out, and edgegap_get_skill adds the same note under a skill's header.
Keeping installed skills current. If you also installed the skills in your agent (the Claude Code plugin edgegap@edgegap, npx skills add edgegap/llm-agent-skills, or folders copied into ~/.claude/skills), edgegap_update_skills compares each one with the latest on GitHub. On the local server it finds those installs itself; with apply: true it runs npx skills update (Edgegap skills only) or claude plugin update, and rewrites hand-copied skills from the files bundled in this release, keeping files you added and leaving symlinks and git checkouts alone. It never downloads skill text. The hosted server cannot see your disk: pass the versions you have loaded in installed_versions and it says which are behind and how to update them.
๐งฐ Tools
Your agent picks the right tool from your request. You don't need to name them, but knowing what's available helps you ask. Tools marked โ change something in your account, accept dry_run, and are hidden when EDGEGAP_READ_ONLY=1.
| Tool | What it does |
|---|---|
edgegap_context | Shows which API this server talks to, its version, local or hosted, and the guardrails in force. No API call; never shows the token. |
Before Your First Deployment
| Tool | What it does |
|---|---|
edgegap_generate_dockerfile | Writes a Dockerfile for your server build: your build folder, server binary or start script, ports, and launch arguments, with the right headless flags (Unity -batchmode -nographics, Godot --headless), a non-root user for Unreal, and matching ports. Lists anything it had to assume so your agent can confirm it. Works for Unity, Unreal Engine, Godot, and any other engine. |
edgegap_validate_server_config | Checks an existing Dockerfile, ports, resources, and image tag before you build. Catches ARM or Windows images (Edgegap runs linux/amd64), Unreal servers running as root, missing Unity -batchmode -nographics, servers bound to localhost, ports that don't match your netcode transport, and the latest tag. |
edgegap_get_registry_credentials โ | Returns push credentials for your private Edgegap container registry, with the exact docker login, build, and push commands. Edgegap only gives these to the Unity/Unreal plugins' quick-start token; with a regular API token, it tells your agent to ask you for the login from the dashboard's Container Registry page instead. |
edgegap_list_registry_tags | Confirms your image push landed before you register it. Takes the image name only, e.g. my-game-server: the project comes from your token. |
edgegap_delete_registry_tag โ | Deletes one tag, and the image it points to, to clean up old builds. One exact tag per call; latest, wildcards and lists are refused. Needs confirm: true. |
Dedicated Servers (Recommended)
| Tool | What it does |
|---|---|
edgegap_list_apps | Lists your applications. |
edgegap_create_app โ | Creates an application. |
edgegap_update_app โ | Turns an application on or off for new deployments. |
edgegap_list_app_versions | Lists versions with their image, resources, ports (with TLS Upgrade), and whether a registry login is set. |
edgegap_get_app_version | Reads one version in full: image, resources, ports, max duration, image caching, restart policy, and env var names (never values). |
edgegap_create_app_version โ | Registers a container image as a deployable version. Supports TLS Upgrade on WS and HTTP ports, which browser (WebGL) clients need for wss://. |
edgegap_update_app_version โ | Changes an existing version: a new image tag, on/off, CPU and memory (both together), max duration, registry login, image caching (force_cache), shutdown grace period, ports, env vars, and the Endpoint Storage its logs go to. Only the fields passed change, but ports and env replace the whole list. Running deployments keep the old settings. |
edgegap_delete_app_version โ | Deletes one version, to clean up test versions. Refused while a deployment of it runs. Needs confirm: true. The registry image is kept. |
edgegap_delete_app โ | Deletes an application and its versions. Refused while any of its deployments runs, and while it has more versions than max_versions (default 0). Needs confirm: true. |
edgegap_list_locations | Lists the cities Edgegap deploys to, or, for one version, only those with capacity right now. |
edgegap_list_ping_beacons | Lists the ping beacons game clients measure their latency to each region against. |
edgegap_deploy โ | Deploys an authoritative dedicated server close to your players. Always tagged edgegap-mcp, and reports when Edgegap will stop it. Optional: CPU and memory for this deployment only, webhooks Edgegap calls when the server is ready, fails or ends, require_cached_locations for faster starts, and private_host_ids to place it on your private fleet first. |
edgegap_list_fleet_hosts | Lists the hosts of one of your private fleets, with status and location, to deploy onto them. |
edgegap_wait_for_deployment | Waits until the server is ready and returns the connection address. |
edgegap_get_deployment | Reads a deployment's status. |
edgegap_list_deployments | Lists running deployments, filtered by application, version, status, tags and more, and sorted by age. Finds servers left running; only_agent_deployments: true lists every one an agent started. See Filter Deployments. |
edgegap_get_deployment_logs | Reads container logs and crash details while the deployment runs. After it stops, logs are only kept if Endpoint Storage was set up. |
edgegap_get_deployment_metrics | Summarises CPU, CPU throttling, memory and network use (latest, average, p95, peak) and flags anomalies: spikes, a rising trend such as a memory leak, CPU throttling. To size a version or check a crash. |
edgegap_fleet_health | One call for "is anything wrong right now?": running deployments by status, the ones in error or stuck starting, and totals per location and version with unhealthy ones flagged. check_crashes: true adds restarts and exit codes. |
edgegap_search_deployment_logs | Searches the logs of many running deployments at once and groups matching lines by error, e.g. every crash in one version since yesterday. |
edgegap_compare_versions | Compares two versions of an application from their running deployments: errors, crash restarts, and CPU and memory against what each version requests, for a rollback decision. |
edgegap_stop_deployment โ | Stops one deployment, by its exact request ID. No bulk stop. A deployment the agent did not start needs confirm: true. |
edgegap_tag_deployment โ | Adds or removes tags on a running deployment, e.g. to mark a match. The edgegap-mcp tag stays. |
edgegap_report_deployment โ | Reports a deployment to Edgegap with a reason, for a studio's moderation backend. It keeps running. |
Logs and Files (Endpoint Storage)
Container logs disappear with the deployment unless they are exported to your own S3-compatible bucket.
| Tool | What it does |
|---|---|
edgegap_list_endpoint_storage | Lists your Endpoint Storage buckets and their pull profiles. Secret keys are never returned. |
edgegap_create_endpoint_storage โ | Registers a bucket (AWS S3, Cloudflare R2, DigitalOcean Spacesโฆ) for log export. Set endpoint_storage on a version to turn export on. The secret key is never echoed back. |
edgegap_create_pull_profile โ | Copies a file or folder from the bucket into the container at boot (maps, configs, large assets). |
edgegap_link_pull_profile โ | Links a pull profile to a version, or unlinks it. |
edgegap_delete_pull_profile โ | Deletes one pull profile. The bucket and its files stay. |
edgegap_delete_endpoint_storage โ | Deletes one Endpoint Storage; refused while it has pull profiles unless max_pull_profiles allows them. The bucket and its logs stay. |
Relays (Host-Client Games Only)
A relay is not a game server: it forwards traffic while one player's game hosts the match. See Dedicated Servers or Relays?.
| Tool | What it does |
|---|---|
edgegap_create_relay_session โ | Creates a relay session for your players and returns the relay address and each player's authorization token. |
edgegap_get_relay_session | Reads a relay session. |
edgegap_list_relay_sessions | Lists open relay sessions, to find ones left running. No authorization tokens. |
edgegap_authorize_relay_user โ | Adds a player who joins later. |
edgegap_revoke_relay_user โ | Removes one player from a relay session. |
edgegap_delete_relay_session โ | Closes a relay session. |
[!WARNING] Deployments and relay sessions are billed while they run. Ask your agent to stop test deployments and delete test relay sessions when it's done.
Example Prompts
- "Write a Dockerfile for my Unity server build, then push it and deploy a server near me."
- "Check my Dockerfile for Edgegap and fix any problems."
- "My deployment failed. Read the logs and tell me why."
- "How much CPU and memory did my last match use? Size my version for it."
- "My game uses host-client networking. Set up an Edgegap relay for two players."
๐ก๏ธ Guardrails
Your API token can do anything in your organization, so the server adds its own limits around what an agent does with it. They apply in both the local server and the hosted endpoint.
| Guardrail | What it does |
|---|---|
| Confirm | edgegap_delete_app, edgegap_delete_app_version, edgegap_delete_registry_tag, and edgegap_stop_deployment on a running deployment the agent did not start, send nothing without confirm: true. They return a preview of what would be stopped or deleted for the agent to show you first. |
| Dry run | Every tool that changes something takes dry_run: true: it returns the exact method, host, path and body, with the token, registry tokens and env values masked, and sends nothing. Local checks still run. |
| No token in containers | A deploy or version is refused, with nothing sent, if your API token appears in an env var name or value, a tag, or a webhook URL. Env values are never echoed back. |
| Agent tag | Every deployment gets the edgegap-mcp tag, even when the agent passes its own tags. edgegap_list_deployments with only_agent_deployments: true finds them all. |
| Auto-stop | Every deploy reports when Edgegap will stop it: the version's max_duration, capped at EDGEGAP_MAX_DURATION_MINUTES (default 60) for versions the agent creates. Edgegap has no per-deployment time limit, so deploying a version whose max_duration is above that ceiling or unlimited (a version made elsewhere defaults to 1440 minutes) is refused unless the agent passes allow_long_running: true, which it is told to do only after asking you. |
| Deploys per run | The local server sends at most EDGEGAP_MAX_DEPLOYS_PER_RUN (default 20) deploys per process, failed ones included, since a refused deploy can still create a deployment. When the API refuses a deploy but created one anyway, the error names it so the agent can stop it. |
| No moving image tags | edgegap_create_app_version refuses latest (any case), an empty tag, or a tag Docker would reject, with nothing sent: Edgegap caches images by tag, so a re-pushed tag can deploy a stale build. Deploying an existing version on latest is refused too, and so is asking for registry push commands for latest. |
| Image reference check | A docker_image that also holds a registry host, tag or digest (e.g. registry.edgegap.com/proj/server:v2) is refused, and the error gives the right docker_repository / docker_image / docker_tag split. edgegap_validate_server_config flags the same things. |
| Deployment cap | edgegap_deploy is refused while EDGEGAP_MAX_AGENT_DEPLOYMENTS (default 5) deployments tagged edgegap-mcp are already running, so a looping agent cannot pile up billing servers. The refusal says how to list and stop them. |
| Hidden secret env vars | Env vars whose names look like secrets (TOKEN, SECRET, PASSWORD, API_KEY, CREDENTIAL, AUTHโฆ) are sent with is_hidden, so the dashboard does not show their values in plain text. |
| Strict stop | edgegap_stop_deployment stops one deployment by its exact request ID. Empty IDs, wildcards and lists are refused. There is no bulk stop. With EDGEGAP_STOP_OWN_ONLY=1, it only stops deployments tagged edgegap-mcp. |
| Careful deletes | edgegap_delete_app_version and edgegap_delete_app take one exact name, and are refused while a deployment of it is running. An application with versions is only deleted when max_versions covers them. |
| Webhook and bucket URLs | Deploy webhooks and Endpoint Storage endpoints must be https URLs without credentials, and are refused if they contain your API token. |
| Host on every result | Every result starts with the API host, e.g. [api.edgegap.com], or [custom ยท host] when EDGEGAP_BASE_URL points elsewhere. A base URL naming api.edgegap.com must be exactly https://api.edgegap.com, or the server refuses to start. |
| Redaction | The token is stripped from every error before it reaches the agent. |
The server identifies itself with User-Agent: edgegap-mcp/<version> (<MCP client name>) on every API call.
Usage analytics. The local server and the self-hosted Docker image send nothing beyond the API calls themselves. The hosted endpoint at mcp.edgegap.com uses PostHog MCP Analytics (@posthog/mcp) and sends usage events to Edgegap's PostHog: which MCP client connected, which tool, prompt or skill resource was used, the names (not values) of the arguments passed, whether a call succeeded, its error code, the stage it failed at and the Edgegap API status, how long it took, whether it was a dry run, a few facts about the call (how a wait for a deployment ended, a validation result, which skill was loaded), which golden-path step was reached, plus the server version and Cloudflare's country code. On a failed call it also sends the error message, after removing your token, the values of the arguments you passed, and anything shaped like a credential, an IP address or an ID, cut to 300 characters. Deployment IDs are only sent as a keyed hash. Only named metadata properties are let through. It never sends your token, tool argument values (IP addresses, env vars, app or image names) or results, and GeoIP is off. It adds no parameters to the tools. Events from one token are grouped under a keyed, non-reversible hash of it. The full list is in docs/analytics.md. To opt out, send the header X-Edgegap-Telemetry: off (or DNT: 1), or use the local server.
๐จ Troubleshooting
Review common error codes and learn how to unlock your integration.
401 Unauthorized
On the hosted endpoint, your client is still sending an API token, or its sign-in has ended (an app you revoked, or a connection past its maximum age). Remove any Authorization header from the client's entry and reconnect to sign in again. On the local server or a self-hosted image, the token is missing or malformed.
403 Forbidden
On the hosted endpoint, the tool needs access the connection doesn't have: approve it when your client asks, or ask an owner or admin if your role can't grant it. With an API token, your integration is likely using the template token or a deleted token: check that it matches exactly the token displayed in the dashboard.
424 Image Could Not Be Pulled
Edgegap could not pull your container image. Check the repository, image name, and tag, and that the tag was pushed (ask your agent to list registry tags). For images in the Edgegap registry, the image name must include your project, e.g. my-project/my-game-server.
Registry Credentials Unavailable
Edgegap only gives registry credentials to the quick-start token the Unity and Unreal plugins use, so with a regular API token your agent can't retrieve them and asks you instead. Copy the Project, Username and Token from the dashboard under Container Registry, or push to another registry Edgegap can pull from (Docker Hub, GitHub, AWS ECR, GCP, GitLab). See External Registries.
"status": "empty" or "not_configured"
Not an error. A list with nothing in it (no applications yet, no deployments running, an image never pushed) or a feature this organization has not set up (relays, a registry this token cannot read) comes back as a normal result with status and a next_step. Your agent should do the next step instead of retrying.
No Token Yet
The skills (edgegap_list_skills, edgegap_get_skill), edgegap_context, edgegap_generate_dockerfile and edgegap_validate_server_config work without a token, so an agent can prepare the server build first. Create an account at app.edgegap.com and a token under User Settings โ Tokens. edgegap_context with check_token: true says whether the session's token is present and accepted, and shows its last four characters so you can find it on that page.
Starts Locally but Not on Edgegap
Ask your agent to validate your server configuration, or to generate a new Dockerfile. The most common causes are an image built on Apple Silicon without docker build --platform linux/amd64, a server listening on a different port than the version exposes, or a UDP transport configured as TCP.
Other API Errors
Please consult our API Reference for possible error responses for individual API endpoints.
[!NOTE] If you need help, please reach out to us over Discord. For live games support see our ticketing system.
๐ ๏ธ Self-Hosting
The hosted endpoint at mcp.edgegap.com runs as a Cloudflare Worker (see worker/INSTALL.md). To run the same stateless HTTP server on your own infrastructure, use the Docker image:
docker build -t edgegap-mcp .
docker run --rm -p 8080:8080 edgegap-mcp
Clients connect to http://<host>:8080/mcp with their own Authorization header carrying an API token, as with the local server. The image holds no credential, and /health answers without one. PORT, HOST, EDGEGAP_READ_ONLY, EDGEGAP_APP_ALLOWLIST, EDGEGAP_MAX_DURATION_MINUTES, EDGEGAP_MAX_AGENT_DEPLOYMENTS and EDGEGAP_STOP_OWN_ONLY apply; pass each with -e NAME=value. Never pass an API token to the container: each client sends its own on every request. Read worker/DECISION.md before exposing it beyond a private network.
Prebuilt images for linux/amd64 and linux/arm64 are published to ghcr.io/edgegap/llm-mcp-server (and, for existing setups, the old name ghcr.io/edgegap/edgegap-mcp), tagged main and sha-<commit> on every push to main, plus the version on v* tags:
docker run --rm -p 8080:8080 ghcr.io/edgegap/llm-mcp-server:main
Hosted Worker: OAuth environments
The hosted Worker runs in OAuth mode (OAUTH_MODE "1"): the developer adds the URL to their MCP client, signs in with Edgegap and approves what the connection may do. No API token is pasted anywhere, and the Worker refuses one: a client entry that still sends an Authorization header with an API token gets a 401 saying to remove the header and connect again (a client with a header configured doesn't offer the sign-in), or to use the local server. Production is the top-level Worker in worker/wrangler.jsonc, on mcp.edgegap.com. MCP_RESOURCE_URL lists one URL per custom domain, and each request gets the one on its own host, so each domain advertises itself and accepts only tokens issued for it. staging and beta are environments of the same file.
| Environment | MCP URL | Authorization server | Edgegap API |
|---|---|---|---|
| production (top level) | https://mcp.edgegap.com/mcp | https://auth.edgegap.com | https://api.edgegap.com |
staging | https://mcp-staging.edgegap.dev/mcp | https://staging-auth.edgegap.dev | https://staging-api.edgegap.dev |
beta | https://mcp-beta.edgegap.dev/mcp | https://auth.edgegap.com | https://api.edgegap.com |
In OAuth mode the Worker:
- answers
initialize,tools/listand the tools that need no account without a sign-in, and a call to an account tool with 401 andWWW-Authenticate: Bearer scope="...", resource_metadata="...", which makes the client start the sign-in; - serves its RFC 9728 metadata at
/.well-known/oauth-protected-resource/mcp(and without the path); - verifies each access token against the issuer's JWKS (RS256,
typ: at+jwt, a publishedkid,iss,audcontaining its ownMCP_RESOURCE_URL,exp,nbf) and forwards it unchanged to the API asAuthorization: Bearer(why that isn't token passthrough: worker/DECISION.md); - answers a tool the token's scopes don't cover with 403
insufficient_scopeand the scopes to ask for (step-up), and lists only the tools whose API routes accept OAuth tokens, each with_meta.securitySchemes. The relay tools are not listed yet, andedgegap_get_registry_credentialsanswers the dashboard steps instead of credentials; - explains the API's refusals by their error code: reconnect the server, ask an owner or admin for more access, not available through sign-in, or retry shortly.
Deploys are manual: nothing deploys a Worker from CI. From a checkout of the commit to release, logged in with npx wrangler login:
- Check the bundle:
npx wrangler deploy --config worker/wrangler.jsonc --env staging --dry-run --outdir=.wrangler/dryrun. - First deploy of an environment only: set its secrets,
npx wrangler secret put POSTHOG_API_KEY --config worker/wrangler.jsonc --env staging, thenTELEMETRY_SALTthe same way. Without them it sends no analytics. - Deploy:
npx wrangler deploy --config worker/wrangler.jsonc --env staging. The first deploy creates the custom domain and its DNS record. - Check:
curl https://mcp-staging.edgegap.dev/.well-known/oauth-protected-resource/mcpnames the rightresourceand issuer, and an MCP client adding the URL is sent to the Edgegap sign-in. - Roll back if needed:
npx wrangler rollback --config worker/wrangler.jsonc --env staging.
Use --env beta for beta, and no --env (npm run worker:check, npm run worker:deploy) for production. The authorization server must list each of the environment's MCP URLs in OAUTH/ALLOWED_RESOURCES, or it refuses to issue tokens for it.
To run OAuth mode locally against a development authorization server and API, pass the vars to wrangler dev:
npm run worker:dev -- --var OAUTH_MODE:1 --var OAUTH_ISSUER:<issuer> \
--var OAUTH_JWKS_URL:<issuer>/oauth2/.well-known/jwks.json \
--var MCP_RESOURCE_URL:http://localhost:8787/mcp --var EDGEGAP_API_URL:<api base URL>
Development
See CONTRIBUTING.md for the checks a change has to pass, CHANGELOG.md for what each version changed, and SECURITY.md to report a vulnerability.
npm ci
npm run build
npm test # mock-API tests; none reach Edgegap
npm run typecheck:worker
To update the bundled skills to the latest commit of llm-agent-skills, then release as usual:
npm run sync-skills -- --ref main
npm run check-skills # exit 1 if src/skills.generated.ts differs from the pin
When the API's OAuth scopes or route permissions change, refresh spec/scope-catalogue.json from the API's catalogue export and run npm test:
npm run sync-scope-catalogue -- <path to the catalogue export>
| Test | Covers |
|---|---|
test/unit.test.mjs | Unit tests for the tag, image, secret-name, URL and redaction rules |
test/package.mjs | Packaging: one bin, runtime dependencies, versions in step |
test/skills.mjs | Skills over MCP: tools, prompts, resources, path safety, bundle matches the pin |
test/smoke.mjs | Handshake, tool registration, read-only mode |
test/guards.mjs | Local validation and allowlist enforcement |
test/elicit.mjs | Token prompt: accept, refuse acknowledgement, decline, no support |
test/newtools.mjs | Validator, Dockerfile generator, registry, deployments, relay and matchmaker tools against a local mock API |
test/http.mjs | Self-hosted HTTP server: discovery without a token, per-request tokens, foreign credentials |
test/spec.mjs | Every endpoint and request-body field the server sends is in spec/ (write tools checked by dry run) |
test/snapshot.mjs | Tool names, descriptions, schemas and the instructions match test/tools.snapshot.json; npm run snapshot:update after a deliberate change |
test/oauth.test.mjs | OAuth mode: token verification, the JWKS cache, the 401/403 gate, the tool-to-scope table, hidden tools |
test/scope-contract.test.mjs | Every API route a tool calls requires a permission the tool's OAuth scopes grant, per spec/scope-catalogue.json |
test/worker-telemetry.mjs, test/worker-oauth.mjs | npm run test:worker: the Worker under wrangler dev, its analytics and OAuth mode over HTTP, including concurrent requests from two organizations |
test/live-check.mjs | Not in npm test. Runs against the real API with a token from a non-production organization |
Design decisions, the security model, and what's deliberately out of scope are in DESIGN.md.
@edgegap/mcpnpm install @edgegap/mcp