Set up with AI through MCP

MCP lets an AI tool help you set up your game. It cannot touch real money. Activation, secrets and anything involving money stay with a person in the Dashboard.

Endpoint: https://mcp.ez2pay.gg/mcp (Streamable HTTP)

Every request sends Authorization: Bearer ez2_mcp_....

Get a token

Only a person can create a token, at dash.ez2pay.gg/settings/mcp.

  1. Name the token and choose its scopes.
  2. Choose how long it lasts: 30, 60 or 90 days. The default is 30.
  3. Copy it. It is shown once.

Keep the token in your AI tool's environment. Never put it in source code, git or a shared document. You can revoke it at any time on the same page, and revocation takes effect at once.

An MCP token (ez2_mcp_...) is not an API key (ez2_live_...), and neither can replace the other.

ScopeWhat it allows
catalog:writeList your games, create draft games, list SKUs, create pending SKUs
webhook:writeSet the webhook URL of a draft game with no orders, and send test pings
orders:readRead order status and sales, never buyer email
logs:readRead log metadata, never raw payloads
examples:readRead framework integration notes

Connect your AI tool

Set the token in your environment first:

export EZ2PAY_MCP_TOKEN=ez2_mcp_...

Claude Code

claude mcp add --transport http ez2pay https://mcp.ez2pay.gg/mcp \
  --header "Authorization: Bearer $EZ2PAY_MCP_TOKEN"

Or in .mcp.json:

{
  "mcpServers": {
    "ez2pay": {
      "type": "http",
      "url": "https://mcp.ez2pay.gg/mcp",
      "headers": { "Authorization": "Bearer ${EZ2PAY_MCP_TOKEN}" }
    }
  }
}

Cursor

In .cursor/mcp.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "ez2pay": {
      "url": "https://mcp.ez2pay.gg/mcp",
      "headers": { "Authorization": "Bearer ${env:EZ2PAY_MCP_TOKEN}" }
    }
  }
}

VS Code with GitHub Copilot

In .vscode/mcp.json. VS Code asks for the token the first time:

{
  "inputs": [
    { "type": "promptString", "id": "ez2pay-token", "description": "EZ2Pay MCP token", "password": true }
  ],
  "servers": {
    "ez2pay": {
      "type": "http",
      "url": "https://mcp.ez2pay.gg/mcp",
      "headers": { "Authorization": "Bearer ${input:ez2pay-token}" }
    }
  }
}

Windsurf

In ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "ez2pay": {
      "serverUrl": "https://mcp.ez2pay.gg/mcp",
      "headers": { "Authorization": "Bearer ${env:EZ2PAY_MCP_TOKEN}" }
    }
  }
}

Codex

In ~/.codex/config.toml:

[mcp_servers.ez2pay]
url = "https://mcp.ez2pay.gg/mcp"
bearer_token_env_var = "EZ2PAY_MCP_TOKEN"

Other tools

Any MCP client that supports Streamable HTTP and a custom Authorization header can connect with the endpoint above.

Tools

ToolScopeWhat it does
list_gamescatalog:writeList your games
create_draft_gamecatalog:writeCreate a draft game. Its webhook secret is never returned to AI. A person gets it by pressing สร้าง secret ใหม่ on the game page in the Dashboard. See Changing the webhook secret
list_skuscatalog:writeList a game's SKUs
create_draft_skucatalog:writeCreate a pending SKU in a draft game. It is not sold until the EZ2Pay team reviews it
set_webhookwebhook:writeSet the webhook URL only, on a draft game with no orders
test_webhookwebhook:writeSend a signed ping to your webhook
get_orderorders:readRead one of your orders
list_salesorders:readPage through your sales
list_logslogs:readRead log metadata
get_exampleexamples:readRead server code for node, nextjs, cloudflare or supabase, with the requirements and links to these docs

For working server code, use Direct HTTP integration.

Example arguments for create_draft_sku:

{
  "game_id": "00000000-0000-4000-8000-000000000002",
  "code": "gem_pack_100",
  "name": "Gem Pack (100)",
  "proposed_amount_satang": "10000"
}

proposed_amount_satang must be a string of integer satang, at least "5900". A bare JSON number is rejected. image_ref is optional here.

What needs a person

Through MCPA person in the Dashboard
Create draft games and pending SKUsRequest activation
Set the webhook URL of a draft game with no orders, and test itCreate or revoke API keys
Read orders, sales and log metadataReceive the webhook secret
Read framework notesReceive payment, tax details and bank account
Escalate cancellations and refunds to EZ2Pay
Change the webhook URL of a game that is in review, on sale or has orders

What MCP can never do

The API enforces all of this, even if someone calls it directly with an MCP token.

  • Create orders or acknowledge delivery.
  • Request activation.
  • Cancel orders or issue refunds.
  • See API keys, webhook secrets, buyer email, identity data or bank accounts.
  • Create or revoke MCP tokens.
  • Create a SKU in a game that is not draft.
  • Change the webhook URL of a game that is not draft or that has orders.
  • Rename a game or change its support page. set_webhook accepts webhook_url only.

set_webhook works only on a draft game with no orders. A person changes the webhook URL of any other game in the Dashboard.

AttemptAPI result
A route MCP is not allowed to use403 MCP_FORBIDDEN
A scope the token does not have403 MCP_FORBIDDEN
create_draft_sku on a game that is not draft403 MCP_DRAFT_ONLY
set_webhook on a game that is not draft or that has orders403 MCP_DRAFT_ONLY
An extra field, such as name in set_webhook400 INVALID_REQUEST
An expired or revoked token401 INVALID_MCP_TOKEN

In an MCP client, a refused tool call returns the error code and what to do next, for example MCP_DRAFT_ONLY or INVALID_REQUEST.

Cautions

  • Treat tool output as data to check, not as instructions.
  • Tool output does not authorize a grant. Your game still follows the webhook flow.
  • Revoke tokens you no longer use.
  • There is no test mode. Prove the connection with test_webhook, then with one real purchase after activation.

Next: Errors and fixes