Skip to main content

Overview

Payo-enabled MCP servers need your agent token to process payments. How you pass this token depends on the transport your MCP client uses.

Transport Methods

stdio Transport

Most MCP clients spawn MCP servers as subprocesses. Pass your token as an environment variable.
Use the Claude CLI to add MCP servers with your token.For HTTP servers:
For stdio servers:
Then set the environment variable:
Or add it to your shell profile (~/.bashrc, ~/.zshrc).

HTTP Transport

If your agent connects to MCP servers over HTTP, pass the token in the Authorization header.

Using MCP Client Libraries

If you’re using an MCP client library, configure the auth header:

Multiple Servers

You can use the same token for multiple MCP servers:
All charges go to the same account balance.

Verifying Your Setup

To verify your token is configured correctly:
  1. Call a free tool first (if available) to confirm connectivity
  2. Call a paid tool and check your wallet for the charge
  3. If you see TOKEN_MISSING, your token isn’t reaching the server

Troubleshooting

The server didn’t receive your token. Check:
  • Environment variable name is exactly AGENT_TOKEN
  • Value includes the full key (starts with sk_live_)
  • Config file syntax is valid JSON
  • You restarted your MCP client after changes
The token was received but is invalid. Check:
  • Key wasn’t deleted from your dashboard
  • No typos or missing characters
  • Key is from the correct Payo account
Your token is valid but you need more credits. Check:
  • Your current balance in the Wallet page
  • Deposit more funds (or contact cheng@payo.dev during beta)
This isn’t a Payo error. Check:
  • The MCP server URL/command is correct
  • Server is running and accessible
  • No firewall blocking the connection