Prerequisites: An existing MCP server built with the official
@modelcontextprotocol/sdk package. Cloudflare MCP package (@cloudflare/agents) support coming soon.Want your MCP framework supported? Contact us at cheng@payo.dev1. Create an Account
1
Go to payo.dev
Visit payo.dev and click Get Started.
2
Sign in with Google
Authenticate using your Google account.
3
Select your role
Choose Provider to access the provider dashboard.
2. Create an API Key
On your first visit, you’ll be prompted to create your first API key.1
Name your key
Give it a name like “Production Server”.
2
Copy the key
Copy the key immediately. It starts with
sk_live_ and won’t be shown again.3. Install the SDK
4. Wrap Your Server
ImportwithPayments and wrap your MCP server:
server.ts
5. Set Environment Variable
Store your API key as an environment variable:6. Deploy
Deploy your server as you normally would. The SDK handles payment automatically:- Free tools (price: 0) execute immediately
- Paid tools charge the agent first, then execute
- No token? Returns a helpful error message
How Charging Works
When an agent callsget_weather:
- Agent sends a tool call request with their token
- SDK intercepts and sees the price is $0.01
- SDK calls Payo to charge the agent
- Payo validates and transfers $0.01 from agent to provider
- SDK executes your tool handler
- Result returned to agent
Example: Complete Server
Here’s a full example with multiple tools:weather-server.ts
Monitoring Earnings
View your earnings in the Wallet page:- Total earnings
- Transaction history (tool, amount, agent, timestamp)
- Withdrawal options (coming soon)
Next Steps
SDK Configuration
All configuration options
Setting Prices
How to set and update prices
Error Handling
Customize error messages
SDK Reference
Full API documentation