AgentPay Pharos
A drop-in MCP skill that gives AI agents a real on-chain wallet on Pharos — check balances, read live prices, move tokens, pay only when conditions are met, screen for scams, and buy x402 pay-per-use APIs, all from natural language.
README
AgentPay Pharos
A drop-in MCP skill that gives AI agents a real on-chain wallet on Pharos — check balances, read live prices, move tokens, pay only when conditions are met, screen for scams, and buy x402 pay-per-use APIs, all from natural language.
agentpay-pharos is a Model Context Protocol server. Point any MCP-compatible client (Claude Desktop, Cursor, …) at it and your agent gains 20 payment & safety tools backed by a live wallet on the Pharos network — no glue code required.
✨ Highlights
- Full wallet control — balances, transfers, wrap/unwrap, gas estimates, and history for PHRS / WPHRS, USDC, USDT, WETH.
- Conditional & batch payments — "pay 5 USDC only if WETH > $2000", or fan out a payroll run in one call.
- Built-in safety net — GoPlus-powered screening of wallets, tokens, and contracts;
safe_transferrefuses flagged recipients. No API key needed. - x402 native — agents autonomously pay for metered HTTP APIs over the x402 protocol.
- Testnet → mainnet — develop on Atlantic, ship to Pacific by flipping one env var.
🧰 Tools
Payments & wallet
| Tool | What it does |
|---|---|
get_wallet_balances |
All token balances (PHRS, USDC, USDT, WETH, WPHRS) in one call |
get_wallet_profile |
Snapshot of holdings + recent activity |
send_usdc / send_token |
Transfer a stablecoin or any supported token |
safe_transfer |
Like send_token, but blocks known-malicious recipients |
batch_send |
Multi-recipient payout with a per-token summary |
conditional_payment |
Send only if a price condition holds |
multi_condition_payment |
Combine several price/threshold conditions |
wrap_phrs / unwrap_phrs |
Wrap/unwrap native PHRS ↔ WPHRS |
estimate_gas |
Preview gas cost before sending |
get_transaction_history |
Recent transactions for the wallet |
Prices & network
| Tool | What it does |
|---|---|
get_token_price |
Live price for a supported token |
get_network_stats |
Pharos network status / metrics |
Safety (GoPlus)
| Tool | What it does |
|---|---|
check_wallet_safety |
Risk-screen an address |
check_token_safety |
Detect honeypots / risky tokens |
check_contract_safety |
Screen a contract before interacting |
x402 & payment requests
| Tool | What it does |
|---|---|
x402_pay_for_resource |
Pay for and fetch an x402-gated HTTP resource |
create_payment_request |
Generate a payment request others can fulfill |
verify_payment_received |
Confirm an expected payment landed |
🚀 Install
npm install -g pharos-paygate
From source:
git clone https://github.com/mo726278282/agentpay-pharos.git
cd agentpay-pharos && npm install && npm run build
⚙️ Configure
cp .env.example .env
PRIVATE_KEY=your_wallet_private_key_here # dedicated, low-value key
NETWORK=testnet # "testnet" (Atlantic) or "mainnet" (Pacific)
CHAIN_ID=688689
RPC_URL=https://atlantic.dplabs-internal.com
MAINNET_RPC_URL=https://rpc.pharos.xyz
FACILITATOR_URL=https://x402.org/facilitator
Register with your MCP client (Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"agentpay-pharos": {
"command": "pharos-paygate",
"env": { "PRIVATE_KEY": "your_wallet_private_key_here", "NETWORK": "testnet" }
}
}
}
💬 Example prompts
- "What's in my wallet right now?"
- "Send 25 USDC to 0xabc…, but only if it isn't a flagged address."
- "Pay 5 USDC to 0xdef… if WETH is above $2,000."
- "Is token 0x123… safe to receive?"
- "Buy access to this x402 API and fetch the data."
🛡️ Safety model
Screening is powered by GoPlus — malicious addresses, honeypot tokens, risky contracts — no API key required. safe_transfer refuses high-risk recipients outright. Treat these as guardrails, not guarantees.
🌐 Networks
| Network | Env | Chain ID |
|---|---|---|
| Atlantic (testnet) | NETWORK=testnet |
688689 |
| Pacific (mainnet) | NETWORK=mainnet |
1672 |
🧑💻 Development
npm run dev # run from source with tsx
npm run build # compile to dist/
npm run inspector # debug tools in the MCP Inspector
⚠️ Disclaimer
This software signs and broadcasts real blockchain transactions with the key you provide. Use a dedicated wallet, start on testnet, and never commit your .env. Nothing here is financial advice — you are responsible for every transaction your agent makes.
📄 License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。