
This guide shows you how to add matchmaking to a Unity multiplayer game that already runs on Edgegap's dedicated game servers: players select Find Match, get grouped by your rules, and connect to a server Edgegap starts near them.
Once your game server is containerized, Edgegap deploys it worldwide to 615+ Edge Cloud locations (on-demand) from a simple API call and billed exclusively on usage: no entire server to rent, provision or keep running between matches. For persistent servers of reserved capacity, Edgegap offers Private Fleets. Edgegap's Matchmaking builds on top of that and is optional.
Edgegap's matchmaker is a hosted service: no backend to write or run. It works with any netcode. Only the line that connects a player to the assigned server depends on yours.
This guide covers:
Preparing a working Edgegap app version for your game
Connecting your coding agent to Edgegap (optional)
Installing Edgegap's Unity SDK
Adding the matchmaking client to your game
Creating your matchmaker
Choosing your matchmaking rules
Testing with two players
You can do it two ways, and mix them:
With a coding agent. Connect Claude Code, Cursor or another agent to the Edgegap MCP server and its agent skills. The agent adds the matchmaking client and the code for your netcode, generates the matchmaker configuration and checks the results. You handle the clicks in Unity and the Edgegap dashboard, and playtest.
By hand. Every step below also works without an agent, starting from the SDK's ready-made example.
Here, we use Mirror's Tanks example. Any Unity netcode works the same way.
1. Before you start
A free Edgegap account. Verify your email. No credit card is needed to test.
A working Edgegap app version of your game server: a server you deployed and joined at least once. Matchmaking deploys the requested version for every match, so it needs a functional, containerized game server to work end to end. If you don't have one yet, use our guides:
Your server stops itself when the match ends, so you only pay while players play. The guides above cover it.
For the agent path: an Edgegap API token, from Dashboard → User Settings → Tokens. It is organization-wide, so treat it like a password: never put it in your project, your game client or a chat.
Git: Unity needs a Git client (2.14.0 or newer) on your PATH to install packages from a Git URL, such as the Edgegap SDK. macOS usually has one already (Xcode Command Line Tools); on Windows, install Git.
2. Connect your coding agent to Edgegap
Skip this step if you're doing everything by hand.
The Edgegap MCP server lets your agent create apps and versions, deploy servers, read logs and generate matchmaker configurations on your account. The agent skills give it the tested Unity matchmaking client, the code for your netcode and the known pitfalls.
Claude Code (run in your own terminal, so the token never passes through the chat):
claude mcp add --transport http edgegap https://mcp.edgegap.dev/mcp -H "Authorization: token YOUR_EDGEGAP_API_TOKEN" --scope user
Then install the skills: /plugin marketplace add edgegap/edgegap-agent-skills, then /plugin install edgegap@edgegap. Restart the session.
Cursor, VS Code and other clients that send headers: add https://mcp.edgegap.dev/mcp with the header Authorization: token YOUR_EDGEGAP_API_TOKEN, and install the skills with npx skills add edgegap/edgegap-agent-skills --skill "*".
Claude Desktop: custom connectors can't send the header, so use the local server instead (Node 18+): { "mcpServers": { "edgegap": { "command": "npx", "args": ["-y", "@edgegap/mcp"] } } }. It asks for the token on first use.
Check it works:
"List my Edgegap apps."
Your app and its version should be in the list.
3. Install Edgegap's Unity SDK
Here's our video tutorial of Edgegap's Matchmaking SDK for Unity, from install to two players matched, using Mirror's Tanks example:
Edgegap's Unity SDK is the matchmaking package. It's separate from the plugin that builds and deploys your server.
With your agent:
"Load the edgegap-unity skill and install the Edgegap Unity SDK in this project, version 3.5.5 or newer."
Using FishNet or PurrNet? Ask your agent to load edgegap-fishnet or edgegap-purrnet instead, in this step and the next.
By hand:
In Unity, select Window → Package Management → Package Manager, select +, then Add package from git URL, paste
https://github.com/edgegap/edgegap-unity-sdk.gitand select Add.In the SDK's Samples tab, import Matchmaking - Simple Example. You only need this one.
The SDK measures each player's ping to Edgegap's beacons, creates the matchmaking ticket, and waits until a server is assigned. It leaves one gap on purpose: the line that connects the player to that server, because it depends on your netcode. Step 4 fills it.
4. Add the matchmaking client to your game
With your agent:
"Add the edgegap-unity matchmaking client and server lifecycle scripts to my network scene, fill in the netcode adapter for my netcode, and wire my Play button to FindMatch. Leave the matchmaker URL and token empty for now."
The agent adds a Find Match panel you can use right away, connection retries for servers that are still starting, and the server code that stops each match's server when it ends. If your server image changes, it rebuilds it and creates a new app version.
By hand, with two prompts for any AI coding assistant, or your own code:
Prompt 1, audit your project (read-only):
"Read-only, no code changes. My Unity project uses a netcode framework and I'm adding Edgegap matchmaking, which will give my client a server address (an FQDN) and an external port at runtime. Find and tell me: 1) the method that starts a client connection to a server, the file and line, and what triggers it; 2) where the server address and the port are set before connecting: the exact property or field names, the transport in use, and the file and line. Do not change anything."
Prompt 2, add the connection:
"In the Edgegap sample MatchmakingClientHandler.cs, find the block that runs when the ticket status is HOST_ASSIGNED. It only logs the assignment. Replace it with code that connects to the assigned server with my netcode: set the assignment's FQDN as the network address, convert the external port of gameport to the type my transport expects and set it on the transport, then start the client. Use what you found in the previous step."
Then, in your game scene, select GameObject → Create Empty, name it Matchmaking, and add the Matchmaking Client Handler component. Leave Base URL and Auth Token empty for now: they come from step 5.
With Mirror, the connection sets NetworkManager.singleton.networkAddress to the FQDN, sets the port on the active transport, and calls StartClient(). Other netcodes use their own names for the same three things.
5. Create your matchmaker
In the dashboard, open Matchmaker, select Create Matchmaker and name it, for example
mygame-dev.Pick a configuration:
Quickest: select Simple Example in the configuration list (what it contains): one team of two players, grouped by latency. It fills in your latest app and version: check they're the ones you want.
With your agent: "Generate an Edgegap matchmaker configuration for my app version: one team of 2 to 4 players, and let a lone player get a server after 30 seconds so I can test alone. Save it as matchmaker-config.json." Then upload the file.
Select Create and Start. A warning that your server image isn't cached is fine for testing: select Continue. Allow a few minutes for the matchmaker to start, and up to 5 more before its address answers.
When it's ONLINE, copy the API URL and Auth Token into your matchmaking component (Base URL and Auth Token), or give them to your agent.
The Auth Token only gives access to your matchmaker, nothing else on your account, so it's safe in your game client. In production, many studios have players sign in to their own backend first, which creates the tickets, so they can check identity and bans before matching.
6. Choose your matchmaking rules
Run the step 7 test with your first configuration, then tailor the rules to your game. Each rule groups players by one thing:
Match size: how many teams and players per team.
Latency: players ping Edgegap's beacons and get grouped with players close to them. Edgegap then starts the server near the group.
Skill, mode, map or region: a number range or a value players must share.
Expansions: relax a rule after a wait, for example accept fewer players after 30 seconds, so nobody waits forever.
Two rules to remember:
Every rule except match size needs a matching value in each player's ticket, with the same name. A missing or extra value is refused (HTTP 400). Tell your agent when you add a rule, and it updates both sides.
WebGL games: browsers can't ping the beacons, so leave out the latency rule and list the sites that host your game under
allowed_cors_origins. Use SDK 3.5.5 or newer.
Ready-made configurations for cooperative, competitive, social and custom-lobby games, and backfill (players joining a match in progress), are in the matchmaking documentation. Changing a running matchmaker's configuration reloads it and clears waiting tickets. When you ship a new server build, update application.version (Stop, Edit, Start), or matches keep deploying the old build.
7. Test with two players
Make sure no test deployment is still running: the free tier runs one deployment at a time, and a leftover one blocks matchmaking.
Run two clients: two Multiplayer Play Mode players, or the Editor plus a build.
Select Find Match in both. The status goes from searching to match found, then both players connect to the same new server, with nobody typing an address.
Leave the match. The server stops its own deployment, and it disappears from the dashboard.
A solo test only works if your configuration lets a lone player get a server (the 30-second expansion in step 5). On the free tier, the matchmaker stops 3 hours after each start: restart it from the dashboard, its URL and token stay the same.
Going live? Ask your agent to run the edgegap-launch skill's checklist, and pick a production matchmaker before launch. Prefer lobbies players browse? See the Server Browser for Unity. Already using Unity Gaming Services matchmaking? See UGS Matchmaker.
Stuck? Ask your agent to load edgegap-troubleshoot, or ask our team and other studios on the Edgegap Discord.
Frequently Asked Questions
Common questions about adding Edgegap matchmaking to a Unity multiplayer game.
Do I need my own backend for matchmaking in Unity?
No. Edgegap's matchmaker is a hosted service: your game client creates tickets with the matchmaker's Auth Token, and Edgegap starts a server for each match. Studios that want sign-in, bans or their own skill data before matching can create tickets from their backend instead.
Does Edgegap matchmaking work with Mirror, Netcode for GameObjects and Fish-Networking?
Yes. The matchmaker and the Unity SDK don't depend on your netcode. Only the code that connects a player to the assigned server's address and port changes, a few lines per netcode.
Is the matchmaker Auth Token safe in a game client?
Yes. It only lets clients create and read matchmaking tickets on that matchmaker. It gives no access to your Edgegap account, unlike your Edgegap API token, which never goes in a client.
Can I add matchmaking to a Unity WebGL game?
Yes, with Edgegap's Unity SDK 3.5.5 or newer. Browsers can't ping latency beacons, so the WebGL profile has no latency rule, and the matchmaker lists your game's web addresses under allowed CORS origins.
How much does Edgegap matchmaking cost?
Testing is free, on a shared matchmaker that stops 3 hours after each start. For a live game, you choose a production matchmaker, and game servers bill per vCPU per minute only while they run.

Clients
Learn more from clients who integrated Edgegap
31 case studies are available from studios that moved to Edgegap from another platform.

A Flawless Global Launch for Rivals of Aether 2
Aether Studios
Learn how Aether Studios quickly added Edgegap and delivered flawless launch & post-launch to their community.
Case Study

Overcome Latency Introduced by VR’s use of WiFi in Competitive Multiplayer
Halfbrick Studios
Discover how Halfbrick successfully launched & maintains a multiplayer-focused Early Access on META Quest's VR platform.
Case Study

MENA’s Social App Adds Online Games
WOLF
Learn how the highly popular MENA-region social app added matchmaking & multiplayer games orchestration easily to WOLF Qanawat.
Case Study

Hybrid Orchestration Keeps Kickoff Tactics Ready for Any Traffic
Birch Games
How hybrid orchestration helped Birch Games handle traffic, pairing egress-free Fleets with the regionless cloud.
Case Study

7 Days Blood Moons
The Fun Pimps & iLLOGIKA
Learn how Illogika dramatically reduced server costs & ensured the online experience the 7 Days to Die franchise expects.
Case Study

Authentic Online Warfare Requires the Ultimate Orchestration
Highwire Games
Learn how Highwire's need for performance required orchestration only Edgegap can deliver.
Case Study

22,000 Reviews, 4.8 Stars, and Infrastructure That Scaled Automatically
Sinn Studios
How a simple, Slack-supported integration got Sinn Studio's hit VR title online fast and keeps it there.
Case Study

Dynamic Server Orchestration
Under NDA - AAA Studio
Discover how one the world's biggest AAA studio improved its peer-to-peer multiplayer experience through edge computing.
Case Study

Near Zero Latency for AAA Fighting Game
AAA Studio - Under NDA
How an unannounced project delivered the lowest lag possible and improved fairness in its 1v1 game.
Case Study

Play Gods with Multiplayer Physics
Squido Studio
Learn how Squido uses Edgegap's highligh optimized game servers to deliver mind-bending & chaotic VR gameplay.
Case Study

A Fully Managed Solutions that Saves Time for Indies Multiplayer VR Horror
Dirty Pearl Studios
Discover how Dirty Pearl Studios saved development time thanks to Edgegap’s easy integration and automated orchestration alongside its Nakama integration.
Case Study

Instant Global Server Deployment for Collaborative XR Medical Education
AlensiaXR
How AlensiaXR uses Edgegap to deliver low-latency, always-available shared anatomy sessions to medical students worldwide.
Case Study

The Lightkeepers: A VR Social Co-op Game with Dedicated Servers
Spectral Games
How Spectral Games used Edgegap Matchmaking and Server Browser to launch dedicated servers for its VR social lobby, with no prior server experience.
Case Study

Fast & reliable deployments worldwide for PvPvE challenger Gravebound
Crater Studios
How Edgegap’s orchestration and matchmaking helped Crater Studios dramatically helped a small them focus on gameplay instead of infrastructure.
Case Study

Rapid Scaling of Web Metaverse
Hiber
Learn how Hiber eliminated the guesswork out of its server capacity planning with Edgegap.
Case Study

High Hardware Requirements & Custom Game Server Pools
Alderon Games
Learn how Alderon Games instantly leverages a custom pool of game servers across multiple providers worldwide for its popular MMO.
Case Study

Easy Integration for Indie Devs
WhaleFood Games
Read how WhaleFood Games "kicked out" its netcode issues with Edgegap.
Case Study

Cutting-edge tech that powers South-East Asia’s first-ever eSports title.
Anantarupa Studios
Learn how Edgegap transformed South-East Asia’s gaming landscape streamlining complex infrastructure and cutting-edge tech with one seamless solution.
Case Study

One Strike. Global Reach.
Triple Hill Interactive
How Triple Hill Interactive leverages Edgegap's orchestration to deliver low latency and improve fairness in a genre where every millisecond counts.
Case Study

Fast-paced Team Battle Royale... with Gun-totting Animal Plushes!
SANDYFLOOR
Discover how a Korea-based Indie Studio launched it multiplayer worldwide.
Case Study

Mobile Horse Racing Goes Global with Instant, Cost-Efficient Servers
Mirai Labs
How Mirai Labs powers Pegaxy Blaze's worldwide multiplayer races with just-in-time server deployment and fractional vCPU to keep cost per player low.
Case Study

Server Management & Distribution
Matrioshka Games
Read how Matrioshka Games were able to ship a Battle Royale in early access with limited ressources.
Case Study

At my Signal, Unleash Hell!
TyGames
Discover how Indie studio TyGames immerses players in third-person gladiatorial combat multiplayer.
Case Study

Instant Worldwide Orchestration
Soliton Interactive
Discover how Soliton Interactive did the impossible… Ship it's first playable as multiplayer!
Case Study

Competitive play with server-side physics ensures ideal sub-50 ms latency
NS7
Discover why solely Edgegap could enable an indie studio to deliver on its vision for a AAA-quality F2P sports gameplay through server-side physics and authority.
Case Study

Regional Deployments for iGaming
X1 Contra 1
X1 Contra 1 delivers real-time PvP casual games to its Brazilian player base through cost-effective hosting & regional deployments, ensuring data and legal compliance.
Case Study

Pay Only When Players Play: Affordable Multiplayer Infrastructure
Meltdown Interactive
How Edgegap helped indie developer Meltdown Interactive Media solve cost-effective scaling and matchmaking without the complexity, so they could focus on building the game.
Case Study

One Edgegap platform, three very different networking profiles
Warped Games
How Warped Games runs a social hub, real-time co-op, and turn-based co-op, all on the same Edgegap deployment API and the same container pipeline.
Case Study

Pool Live Tour Max
RETA Games
Case Study

Korea’s Web3 POP Extraction Shooter Goes Global, Instantly
NDUS Entertainment
How XOCIETY easily added Edgegap orchestration & integrated custom matchmaking working alongside Edgegap Ping Beacons to optimize latency.
Case Study

Multiplayer in Every Dimension
Arcadia.tv
Discover how Arcadia.tv uses Edgegap's edge network to deliver an innovative, team and location-based athletic VR sport.
Case Study

F2P Mobile Fighter Cuts Infrastructure Costs With Just-in-Time Servers
Game Changers Worldwide
How Game Changer Worldwide hosted Rumble Rush's real-time 3v3 PvP globally on mobile.
Case Study
Key reasons why they chose Edgegap
Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.









