Connect Claude to GameLayer
Connect Claude to your GameLayer account, then ask it to plan and build gamification content: events, missions, achievements, quizzes, surveys, streaks, levels, leaderboards and prizes. Claude works through GameLayer's MCP server with the permissions you approve. It shows you its plan before it changes anything, and every change it makes is in your account's audit log.
Using Claude Desktop or claude.ai? Follow Claude Desktop and claude.ai. Using the terminal? Follow Claude Code.
Before you start#
- You need to be an account admin of the GameLayer account you want to connect. Users with read-only access can't approve a connection.
- Agent access must be turned on for the account. GameLayer turns it on. If the Agent Keys section of your account says Agent access is not enabled for this account. Contact GameLayer., contact GameLayer.
- Your Claude plan: custom connectors work on every Claude plan. The Free plan allows one custom connector. On Team and Enterprise plans, an organization owner adds the connector first (see below).
Claude Desktop and claude.ai#
A connector belongs to your Claude account, so once it's added it works in Claude Desktop and on claude.ai alike.
Add the connector#
In Claude, open Customize›Connectors.
Click + Add, then Add custom connector.
Name it GameLayer, enter the server URL
https://api.gamelayer.co/mcpand click Add. Leave the advanced and authentication settings empty.
An organization owner opens Organization settings›Connectors and clicks Add.
They choose Custom›Web, and add GameLayer with the URL
https://api.gamelayer.co/mcp.Each member then connects it for themselves, as in Sign in and approve.
Sign in and approve#
In Customize›Connectors, click Connect next to GameLayer. A GameLayer page opens.
Sign in to GameLayer. Approving a connection needs a sign-in from the last 5 minutes, so you may be asked to sign in again even if you're already signed in. This stops anyone using a dashboard left open to connect an agent. Your choices on the page are kept while you sign in.
Check the page shows Claude (Desktop and web) and claude.ai.
Approve only a connection you started yourself. If this page opened and you didn't click Connect, close it.
Choose the account, and what Claude may do:
- Read and Write are ticked by default.
- Delete and restore is off unless you tick it.

The approval page in the dashboard Click Approve. You're returned to Claude, and the connector shows as connected.
The connection appears on the account's Agent Keys page as Claude – your name – date.
Claude Code (the CLI)#
Choose one of two ways. Signing in is the recommended one: no key is copied or stored in your configuration.
Add the server. Run this in the folder where you'll use Claude Code, or add
--scope userto make it available in every folder:Terminal$ claude mcp add --transport http gamelayer https://api.gamelayer.co/mcp
Start Claude Code in that folder, type
/mcp, choose gamelayer and then Authenticate. Your browser opens the GameLayer page.Sign in and approve as described in Sign in and approve. The page shows A local app on this computer, such as the Claude CLI.
Finish within a few minutes.
Claude Code stops waiting for the browser after a short time. If you see localhost refused to connect, run
/mcpagain and approve straight away.
The connection appears on the Agent Keys page as Local app – your name – date.
In the GameLayer dashboard, open the account, go to Agent Keys and click Create key. Choose its scopes and expiry, then Create.
Copy the
claude mcp addcommand the dashboard shows, which includes the key, and run it. The key is shown only once.In Claude Code,
/mcpshows gamelayer as connected.
The key is stored in your Claude Code configuration, so treat that file like a password.
Move from a key to signing in#
Remove the server:
Terminal$ claude mcp remove gamelayerAdd the server again without the key and sign in, as in the Sign in tab.
Revoke the old key on the Agent Keys page.
What Claude can do#
The tools Claude gets depend on the permissions you approve.
| Tool | What it does | Needs |
|---|---|---|
get_context | The account's element limits and usage, its languages, and the connection's permissions and expiry | Read |
get_guide | How GameLayer elements behave for players, and how to change them safely | Read |
get_schema | The exact shape of an element for creating or changing it | Read |
list_elements | Lists the elements of a type, in short form | Read |
get_element | Reads one element in full | Read |
get_changeset | Reads the result of a changeset | Read |
list_audit | Who changed what and when | Read |
create_element | Creates an element | Write |
update_element | Replaces an element | Write |
patch_element | Changes part of an element | Write |
plan_changeset | Checks up to 50 changes together without making them | Write |
apply_changeset | Makes up to 50 changes together, all or nothing | Write |
delete_element | Deletes an element, which can be restored | Delete and restore |
restore_element | Restores a deleted element | Delete and restore |
Ready-made prompts#
Two prompts come with the connector:
| Prompt | What it does | In Claude Code |
|---|---|---|
plan_campaign | Give a goal, and Claude reads your setup, plans the whole campaign as one changeset, shows you the plan, and applies it only after you confirm. | /mcp__gamelayer__plan_campaign |
review_account | Claude reviews your setup and reports anything that looks wrong, such as expired elements or missions pointing at missing ones. It changes nothing. | /mcp__gamelayer__review_account |
Limits per connection#
Each connection can make 600 reads, 120 writes and 20 changeset applies a minute.
Each change inside a changeset counts as one write. Over a limit, Claude is told to wait and try again.
Try it#
A good first prompt:
Using GameLayer, tell me what's set up in my account. Then suggest a 4-week onboarding campaign for new players. Plan it and show me the plan, but don't apply anything until I say so.
Disconnecting and revoking#
Revoke on the Agent Keys page to stop a connection everywhere. Revoking stops it within 60 seconds. Any account admin can revoke any connection to that account.
- Claude Desktop and claude.ai: remove the connector in Customize›Connectors. This removes it from Claude, but revoke it on the Agent Keys page too.
- Claude Code: run
claude mcp logout gamelayer, which revokes the connection, thenclaude mcp remove gamelayer.
$ claude mcp logout gamelayer $ claude mcp remove gamelayer
When someone leaves your team, remove them from the GameLayer account, and on the Agent Keys page revoke their connections. Use Approved by to filter by person.
Good to know#
- Connections last 30 days. After that, Claude asks you to sign in again, and you approve the connection as before. A key you create on the Agent Keys page lasts as long as you chose, at most 365 days.
- One connection per person, per kind, per account. Signing in to Claude Code on a second computer replaces the connection from the first. Adding the connector in a second Claude account (for example a personal one and a work one) replaces the first one's connection. Claude Desktop and claude.ai share one connection.
- If GameLayer turns agent access off, Claude's GameLayer tools answer that agent access isn't enabled, without asking you to sign in. They work again as soon as it's back on.
- Claude remembers the tool list until it reconnects. If GameLayer adds tools, disconnect and reconnect (or restart Claude Code) to see them.
- Every change is audited. Changes made through Claude appear in the account's audit log under the connection, and deleted elements can be restored.
Troubleshooting#
| You see | What to do |
|---|---|
| Only an account admin can connect an agent. | Your login isn't an admin of any account available for connecting. Ask an account admin to connect, or to give you admin access. |
| Agent access is not enabled for this account. Contact GameLayer. | Contact GameLayer to turn on agent access for the account. |
| Your sign-in is more than 5 minutes old. Sign in again to approve. | Click Sign in again. Your choices are kept. |
| localhost refused to connect (Claude Code) | Claude Code stopped waiting. Run /mcp, choose gamelayer, authenticate again, and approve straight away. |
| This account has 10 active Agent Keys. Revoke one on the Agent Keys page first. | Revoke a key you no longer need on the Agent Keys page, then approve again. |
| Claude asks you to sign in again | The connection expired or was revoked. Sign in and approve it again. |