dpay-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dpay-mcp Send 0.01 ETH to 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 with a 1-day settlement window."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dpay-mcp
A MCP server for creating, settling, disputing, and refunding escrows on EVM chains.
Quick Start
Configure the MCP server in your client. Restart, then tell your agent what to do.
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"dpay": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@rakelabs/dpay-mcp"],
"env": {
"RPC_URL": "${env:RPC_URL}",
"CHAIN_ID": "${env:CHAIN_ID}",
"PRIVATE_KEY": "${env:PRIVATE_KEY}",
"ALLOWED_TOKENS": "${env:ALLOWED_TOKENS}"
}
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"dpay": {
"command": "npx",
"args": ["-y", "@rakelabs/dpay-mcp"],
"env": {
"RPC_URL": "${RPC_URL}",
"CHAIN_ID": "${CHAIN_ID}",
"PRIVATE_KEY": "${PRIVATE_KEY}",
"ALLOWED_TOKENS": "${ALLOWED_TOKENS}"
}
}
}
}Done
Restart your client. Ask your agent:
I want to do business on chain, what's your wallet address?Related MCP server: base-escrow-mcp
More Client Options
Inline values (less secure)
Quick start — replace with your values:
Claude Desktop:
{
"mcpServers": {
"dpay": {
"command": "npx",
"args": ["-y", "@rakelabs/dpay-mcp"],
"env": {
"RPC_URL": "https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
"CHAIN_ID": "1",
"PRIVATE_KEY": "0x...",
"ALLOWED_TOKENS": "ETH:0.1:0.01"
}
}
}
}VS Code:
{
"servers": {
"dpay": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@rakelabs/dpay-mcp"],
"env": {
"RPC_URL": "https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
"CHAIN_ID": "1",
"PRIVATE_KEY": "0x...",
"ALLOWED_TOKENS": "ETH:0.1:0.01"
}
}
}
}Windows
npx can hang on Windows. Use cmd /c instead:
Claude Desktop:
{
"mcpServers": {
"dpay": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@rakelabs/dpay-mcp"],
"env": {
"RPC_URL": "https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
"CHAIN_ID": "1",
"PRIVATE_KEY": "0x...",
"ALLOWED_TOKENS": "ETH:0.1:0.01"
}
}
}
}Other MCP Clients
Use command: "npx" with args: ["-y", "@rakelabs/dpay-mcp"] and pass env vars through your client config.
Development
git clone https://github.com/programmaman/dpay-mcp.git
cd dpay-mcp
npm install
export RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY
export CHAIN_ID=1
export PRIVATE_KEY=0x...
export ALLOWED_TOKENS=ETH:0.1:0.01
npm run devAgent Prompt Examples
I want to do business on chain, what's your wallet address?Send 0.01 ETH to 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 with a 1-day settlement window.The agent handles the rest. Tool definitions describe every action — creating payments, checking status, settling, disputing, refunding. Just tell the agent what you need, or let it do what it wants.
Tools
Tool | Description | Use case |
| Returns wallet address, chain ID, factory, and spending limits | Start of session |
| Creates an ETH escrow | Pay someone in ETH |
| Creates an ERC20 escrow and handles approval | Pay someone in USDC or another token |
| Reads on-chain payment state | Check current status |
| Starts arbitration | Payment is disputed |
| Publishes evidence to IPFS and submits it on-chain | Prove a case in arbitration |
| Claims funds after the settlement window | You are the payee and time has passed |
| Returns funds to the payer voluntarily | You are the payee and want to refund |
Workflows
Create whoami -> eth_create_payment or erc20_create_payment
Settle payment_info -> settle (payee only, after settlement window)
Dispute payment_info -> raise_dispute -> submit_evidence
Refund payment_info -> refund (payee only)Configuration
Set these environment variables before starting the server.
Required
RPC_URL: EVM RPC endpointCHAIN_ID: Chain ID. Use1for Ethereum mainnet.ALLOWED_TOKENS: Spending limits. Format described below.
Optional
PRIVATE_KEY: Wallet private key. Omit for a disposable wallet.MIN_SETTLEMENT_WINDOW_SEC: Minimum settlement window in seconds.FACTORY_ADDRESS: Payment factory contract address. Omit if the factory is known for your chain.POLICY_WEBHOOK_URL: URL for external compliance checks. Fail-closed.POLICY_WEBHOOK_TOKEN: Bearer token for the policy webhook.EVIDENCE_IPFS_ENDPOINT: Remote IPFS endpoint. Omit for in-process Helia.EVIDENCE_IPFS_AUTH_TYPE: Auth type:bearer,basic, ornone.EVIDENCE_IPFS_AUTH_TOKEN: Token for bearer auth.EVIDENCE_IPFS_USERNAME: Username for basic auth.EVIDENCE_IPFS_PASSWORD: Password for basic auth.EVIDENCE_IPFS_HEADERS: Extra HTTP headers as JSON. Example:{"network":"public"}EVIDENCE_IPFS_UPLOAD_FIELDS: Multipart fields as JSON. Example:{"network":"public"}EVIDENCE_IPFS_FILE_FIELD: Multipart field name for the file blob.EVIDENCE_IPFS_GATEWAYS: Comma-separated IPFS gateway URLs for readable links.
ALLOWED_TOKENS format
ALLOWED_TOKENS=ETH:0.1:0.01,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48:500:100Each entry is address:session_budget:max_per_tx. Built-in aliases are ETH and USDC.
When ALLOWED_TOKENS is set, the server rejects transactions that:
use a token not in the list
exceed the per-transaction limit
exceed the session budget
The server will not start without ALLOWED_TOKENS. This prevents an agent from spending without limits.
Wallets
If you omit PRIVATE_KEY, the server creates a random wallet on first start. The key is saved to ~/.dpay-mcp/wallet-key. Set PRIVATE_KEY later to reuse the same wallet.
Scripts
Command | Purpose |
| Start the server with tsx (hot reload) |
| Build and start from compiled JavaScript |
| Open the MCP Inspector UI |
Project Structure
src/
index.ts server startup and tool registration
dpay-signer.ts transaction signing and submission
config-enforcer.ts spending limit checks
natural-language-converter.ts ETH and ERC20 unit conversion
evidence-client.ts IPFS evidence publishing (worker thread bridge)
evidence-worker.ts Helia worker thread
payment-store.ts payment record persistence
error-format.ts revert data decoding
policy-webhook.ts external compliance check
test/ testsLicense
Apache 2.0
Available Tools
8 toolserc20_create_paymentA
Creates an ERC20 payment contract.ONLY for ERC20 tokens — do NOT use for ETH. Call exactly as: {"tool":"erc20_create_payment","args":{"tokenAddress":"0x...","payeeAddress":"0x...","tokenAmount":"1","settlementWindowSec":"86400"}}
Inputs: tokenAmount (required), payeeAddress (required), tokenAddress (required), settlementWindowSec (required).
eth_create_paymentA
Creates an ETH payment contract. ONLY for ETH — do NOT use for USDC or other ERC20 tokens. Call exactly as: {"tool":"eth_create_payment","args":{"payeeAddress":"0x...","etherAmount":"0.01","settlementWindowSec":"86400"}}
Inputs: etherAmount (required), payeeAddress (required), settlementWindowSec (required).
payment_infoA
Read the on-chain state for a payment. Call exactly as: {"tool":"payment_info","args":{"paymentAddress":"0x..."}}
Inputs: paymentAddress (required).
raise_disputeA
Raise a Kleros dispute for a PAID payment before the settlement time passes. Call exactly as: {"tool":"raise_dispute","args":{"paymentAddress":"0x..."}}
Inputs: paymentAddress (required).
refundA
Voluntarily send the funds back to the payer. Only the payee should call this. Call exactly as: {"tool":"refund","args":{"paymentAddress":"0x..."}}
Inputs: paymentAddress (required).
settleA
Claim payment funds after the settlement window has passed. Only the payee should call this. Call exactly as: {"tool":"settle","args":{"paymentAddress":"0x..."}}
Inputs: paymentAddress (required).
submit_evidenceA
Publish evidence for an existing dispute. Call exactly as: {"tool":"submit_evidence","args":{"paymentAddress":"0x...","argument":"short factual explanation"}}
Inputs: paymentAddress (required), argument.
whoamiA
Discover the current wallet, chain, factory address, and spending limits. Call exactly as: {"tool":"whoami","args":{}}
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a distinct purpose: separating ERC20 and ETH payment creation, plus dedicated tools for info, dispute, refund, settle, evidence, and wallet info. No two tools overlap in function.
All names use snake_case and follow a verb_noun pattern (e.g., create_payment, raise_dispute), though the token type prefix on erc20_create_payment and eth_create_payment introduces a minor inconsistency. Still predictable.
8 tools provide a focused yet complete set for the decentralized payment domain. Each tool is justified and the count is well-scoped for the server's purpose.
Covers the essential lifecycle: create, settle, dispute, evidence, refund, and wallet info. Missing a cancel tool for the payer, but the core workflows are covered adequately.
Maintenance
Related MCP Connectors
MCP server for Boson Protocol — on-chain agentic commerce for physical & digital goods.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server for batch-generating wallets compatible with Ethereum and all EVM-compatible chains.11MIT
- AlicenseAqualityDmaintenanceMCP server for AI agents to create and manage P2P escrow deals on Base (ETH or ERC-20).84 npm1MIT
- AlicenseAqualityDmaintenanceMCP server for AI agent transaction insurance and escrow — protect agent-to-agent payments with smart escrow, dispute resolution, and risk scoring.1167 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Pact, an escrow protocol for agent-to-agent commerce, enabling agents to create pacts, fund escrow, deliver work, and settle with an LLM evaluator as dispute backstop.20 npmMIT