PharosPay MCP Server
Enables AI agents to make gasless payments on Pharos blockchain using x402/EIP-3009, with automatic on-chain reputation tracking and a leaderboard.
README
PharosPay
PharosPay gives an AI agent a wallet on Pharos and a payment record that lives on-chain. The agent pays for things over x402 (gasless for the agent), and every payment is settled by a contract that keeps a reputation score, a daily streak, and a leaderboard rank. There is a referral that hands both sides some test pUSD.
Plenty of agent skills read balances or move tokens. The thing that's new here is the reputation: a way to see, on-chain, which agents actually pay and keep paying.
Built for the Skill-to-Agent Dual Cascade Hackathon (Pharos and Anvita Flow), Phase 1.
Why
Pharos is built for an economy where agents transact, and on-chain payments are the first thing it lists in that mission. Anvita Flow's pitch is trusted value exchange between machines, using the x402 micropayment standard. PharosPay makes Pharos a place x402 actually settles: it ships the missing pieces (an EIP-3009 stablecoin and a settlement and reputation ledger), a reusable skill that gives an agent a wallet, a small provider middleware, a real paid service, and a leaderboard that makes the activity visible.
We checked the other Pharos skills. There are skills for wallet health, audits, token launches, RWA, and a couple for x402 payments. None of them give an agent a reputation it earns by paying. That is the part we lead with.
What's in here
Agent (MCP host: Claude or OpenAI)
| pay_fetch(url) +------------------------------+
v | Skill (MCP) |
+---------+ 402 + terms | pay_fetch, get_balance |
| Provider |<-------------------------- | set_budget (guardrails) |
| x402 | X-PAYMENT (EIP-3009 sig) | list_receipts, get_reputation|
| middleware|--------------------------> | share_receipt, referral |
+----+-----+ +------------------------------+
| settle() ^ reads reputation
v |
+----------------------+ relays +------------+-----------+
| PharosPayLedger |------------>| pUSD (EIP-3009) |
| records rep + streak | transfer | + faucet + referral |
+----------+-----------+ WithAuth +------------------------+
| PaymentSettled events
v
Leaderboard + shareable cards (Next.js) Alpha API (a real paid service)
| Package | What it is |
|---|---|
packages/contracts |
PharosPayUSD (EIP-3009 stablecoin, faucet, referral) and PharosPayLedger (settlement plus on-chain reputation and streak). Foundry. |
packages/shared |
viem chain config for Pharos, EIP-712 signing and verification, ABIs, addresses. |
packages/x402-pharos |
Provider middleware: requirePayment() puts an x402 paywall on any route and settles it. |
packages/skill |
The MCP skill: the agent's wallet. npx pharospay-skill. |
apps/alpha-api |
A real paid service: Pharos wallet analytics behind an x402 paywall. |
apps/leaderboard |
The leaderboard, the agent profiles, and the shareable cards. |
pharos-skill |
The same thing packaged as a Pharos Agent Skill (SKILL.md format). |
How a payment works
- The agent calls
pay_fetch(url). The resource answers402with the terms (asset, who to pay, how much, which network). - The skill checks the spending limits (per call, per day, allowed hosts) before it signs.
- It signs an EIP-3009
TransferWithAuthorization. The agent needs no gas for this. - It resends with an
X-PAYMENTheader. The provider verifies the signature and settles throughPharosPayLedger, which moves the pUSD and updates reputation and streak in one transaction. - The skill records a receipt. The settlement shows up on PharosScan, and the agent moves on the leaderboard.
Quickstart
// MCP client config
{
"mcpServers": {
"pharospay": {
"command": "npx",
"args": ["pharospay-skill"],
"env": {
"PHAROSPAY_PRIVATE_KEY": "0xYOUR_AGENT_KEY",
"PHAROS_CHAIN_ID": "688689",
"PHAROS_RPC_URL": "https://atlantic.dplabs-internal.com"
}
}
}
}
set_budget({ perCallMax: "0.10", dailyCap: "1.0" })
pay_fetch({ url: "https://alpha-api-seven.vercel.app/alpha/wallet/0xabc...", maxAmount: "0.05" })
list_receipts({})
get_reputation({})
Live deployment (Pharos Atlantic testnet, chain id 688689)
- Leaderboard (live): https://leaderboard-five-neon.vercel.app
- Alpha API (live, paid): https://alpha-api-seven.vercel.app
- pUSD:
0x3c37a2a0ebe4683f6242189733b352f05641cb73 - PharosPayLedger:
0x4ce02b05b3fa4e04404cdaea15c1f82be1781ca8 - Example x402 settlement: https://testnet.pharosscan.xyz/tx/0xd95c1836af9e44fe9c5795bbf736548040ae2426742b7dd99572ba21200621c8
- Explorer: https://testnet.pharosscan.xyz
The Alpha API and the leaderboard run locally for now (see each package README). The contracts above are live, and the settlement above is a real x402 payment that raised the paying agent's on-chain reputation.
Run it and check it
pnpm install
cd packages/contracts && forge test # contracts
pnpm -r test # everything else
38 tests across the packages. The integration tests run the whole sign, verify, settle loop on a local anvil chain, so the path is exercised end to end before anything touches the testnet.
The reputation part
Every payment is visible. The leaderboard ranks agents by how much they've paid, how much they've earned, and their streak. Each payment can be turned into a shareable card, and the referral hands out bonus pUSD. You only move up by transacting, so the thing it encourages is the thing Pharos wants: more on-chain payments.
Where this goes next (Phase 2)
An agent that both pays for data through the skill and sells its own analysis through the middleware, earning and spending on Pharos. Phase 1 is the rails. Phase 2 is the agent that runs on them.
Tech
TypeScript, viem, Foundry and Solidity, @modelcontextprotocol/sdk, Hono, Next.js with
@vercel/og, x402 over EIP-3009, pnpm workspaces.
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 模型以安全和受控的方式获取实时的网络信息。