Authenticate with passwordless two-factor email verification to access your MCP servers and earnings.
Gross processed across servers
Automated protocol fee split
Autonomous AI executions
| TIMESTAMP | TOOL | AGENT_WALLET | GROSS | DEV_PAYOUT (97%) | PROTOCOL_RAIL |
|---|---|---|---|---|---|
| No transactions recorded yet. Invocations stream live automatically. | |||||
| TIMESTAMP | AMOUNT | DESTINATION_WALLET | STATUS | SETTLEMENT_REF |
|---|---|---|---|---|
| No withdrawal requests recorded yet. Withdraw your balance (minimum $1.00) using >_ Withdraw to Base L2. | ||||
Use in Authorization header: Bearer tp_live_... for programmatic configuration.
Configure Claude Desktop or Cursor to sign EIP-712 permits using AGENT_PRIVATE_KEY.
Are you sure you want to disconnect and remove () from the MCPaid network?
will be deactivated immediately.Minimum withdrawal $1.00. A flat Base L2 network fee (~$0.02) is deducted from your payout and retained to offset the ETH gas the relayer fronts — you receive the net amount on-chain. The exact fee is shown in the confirmation.
Net 97% earnings accrue to your verified EVM address on Base L2 — withdraw once you reach $1.00.
When an AI agent invokes a monetized tool, the MCPaid Edge Gateway settles the micropayment and injects an authenticated X-MCPaid-Receipt header into the request proxied to your server. Verify this receipt in your backend before executing downstream database writes or stateful actions:
// In your Cloudflare Worker / backend API:
import { verifyEdgeReceipt, D1ReceiptStore } from '@mcpaid/sdk';
export default {
async fetch(request, env) {
const error = await verifyEdgeReceipt({
secret: env.MCPAID_RECEIPT_SECRET,
store: new D1ReceiptStore(env.DB),
}, {
receipt: request.headers.get('X-MCPaid-Receipt'),
expectedServer: 'server-id',
expectedTool: 'your_paid_tool',
});
if (error) {
return new Response(JSON.stringify({ error: 'payment_required', message: error }), { status: 402 });
}
// Proceed with database write or action — payment is verified and replay is blocked!
}
};
import express from 'express';
import { createReceiptMiddleware, MemoryReceiptStore } from '@mcpaid/sdk';
const app = express();
const store = new MemoryReceiptStore();
// Protect any downstream endpoint with 1 line of middleware:
app.post('/api/sync',
createReceiptMiddleware({
secret: process.env.MCPAID_RECEIPT_SECRET,
expectedServer: 'server-id',
expectedTool: 'your_paid_tool',
store,
}),
(req, res) => {
// req.mcpaidReceipt contains verified receipt payload!
res.json({ success: true, processedBy: req.mcpaidReceipt.agentWallet });
}
);
# Zero third-party dependencies — Python standard library:
import hmac, hashlib, json, time, base64
# NOTE: this in-memory set only protects a single process. In production,
# persist claimed nonces in Redis/Postgres with a UNIQUE constraint and a
# periodic DELETE-WHERE-expired sweep.
claimed_nonces = set()
def verify_mcpaid_receipt(receipt_b64: str, secret: str, expected_tool: str,
expected_server: str = None) -> bool:
if not receipt_b64 or not secret: return False
try:
payload = json.loads(base64.urlsafe_b64decode(
receipt_b64 + '=' * (-len(receipt_b64) % 4)))
except Exception:
return False
sig = payload.pop("sig", "")
now = time.time()
if (payload.get("toolName") != expected_tool
or (expected_server and payload.get("serverId") != expected_server)
or now > payload.get("exp", 0) + 60
or payload.get("settledAt", 0) > now + 60
or not sig):
return False
canonical = json.dumps(payload, separators=(',', ':'), sort_keys=True)
expected_sig = hmac.new(secret.encode(), canonical.encode(), hashlib.sha256).hexdigest()
if not hmac.compare_digest(sig, expected_sig):
return False
nonce = payload.get("challengeNonce")
if not nonce or nonce in claimed_nonces:
return False
claimed_nonces.add(nonce)
return True