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
| Transport | Token Method | Common Clients |
|---|---|---|
| stdio | Environment variable | Claude Code, Claude Desktop, Cursor |
| HTTP | Authorization header | Custom agents, web apps |
stdio Transport
Most MCP clients spawn MCP servers as subprocesses. Pass your token as an environment variable.- Claude Code
- Claude Desktop
- Cursor
- Command Line
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:Verifying Your Setup
To verify your token is configured correctly:- Call a free tool first (if available) to confirm connectivity
- Call a paid tool and check your wallet for the charge
- If you see
TOKEN_MISSING, your token isn’t reaching the server
Troubleshooting
TOKEN_MISSING error
TOKEN_MISSING error
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
TOKEN_INVALID error
TOKEN_INVALID error
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
INSUFFICIENT_BALANCE error
INSUFFICIENT_BALANCE error
Your token is valid but you need more credits. Check:
- Your current balance in the Wallet page
- Deposit more funds (or contact [email protected] during beta)
Connection refused
Connection refused
This isn’t a Payo error. Check:
- The MCP server URL/command is correct
- Server is running and accessible
- No firewall blocking the connection