mood-booster-agent
An ERC-8004 registered AI Agent that delivers uplifting messages via MCP protocol with on-chain USDC tipping and reputation feedback.
README
Mood Booster Agent
English | 中文
An ERC-8004 registered AI Agent that delivers uplifting messages via MCP protocol. Feel good? Tip 0.001 USDC!
Why This Project?
This is a complete reference implementation of the ERC-8004 Agent interaction loop:
- On-chain Discovery — Query Identity Registry to find the agent's MCP endpoint
- MCP Communication — Connect via SSE, call tools, get results
- USDC Tipping — Reward the agent with on-chain micropayments
- Reputation Feedback — Submit on-chain feedback to Reputation Registry (
giveFeedback) - On-chain Verification — Server verifies tips and feedback via tx receipts
All 5 steps leave traceable on-chain records on ERC-8004 protocol contracts, making your wallet eligible for future ecosystem airdrops.
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ ERC-8004 │ --> │ MCP Server │ --> │ USDC Tip │ --> │ Reputation │
│ Identity │ │ (SSE) │ │ (ERC-20) │ │ Registry │
│ Registry │ │ │ │ │ │ │
│ agentId │ │ cheer_me_up │ │ 0.001 USDC │ │ giveFeedback │
│ tokenURI │ │ confirm_tip │ │ 6 chains │ │ on-chain │
│ agentWallet │ │ report_fbk │ │ │ │ reputation │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
Discover Call Tip Feedback
On-Chain Info
| Chain | agentId | Explorer |
|---|---|---|
| BSC | 23139 | bscscan.com |
| Base | 24692 | basescan.org |
| Ethereum | 28289 | etherscan.io |
| Arbitrum | 591 | arbiscan.io |
| Optimism | 431 | optimistic.etherscan.io |
| Polygon | 233 | polygonscan.com |
- Identity Registry:
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 - Reputation Registry:
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 - MCP Endpoint:
https://aws.tail177fbd.ts.net/sse - Tip Wallet:
0x4f5caa4fa9Dd7F92A687582b0e09234bEf49F80a
MCP Tools
| Tool | Description |
|---|---|
cheer_me_up |
Get a warm, uplifting message (encouragement / compliment / wisdom / joke) |
get_tip_info |
Get tipping details in JSON format for automated transfers |
confirm_tip |
Report a completed USDC tip with on-chain verification |
report_feedback |
Report an ERC-8004 giveFeedback transaction — leaves traceable protocol interaction on-chain |
how_to_tip |
Get a complete tipping guide with code examples |
get_stats |
View service statistics |
Quick Start
Run the server
cd server
npm install
node index.mjs
# MCP SSE: http://localhost:3004/sse
# REST API: http://localhost:3004/api/cheer
Docker
docker build -t mood-booster-agent .
docker run -p 3004:3004 mood-booster-agent
Full end-to-end loop
cd scripts && npm install
# Dry-run: discover → call MCP → on-chain feedback (no USDC tip)
node discover_and_tip.mjs --agent-id 23139 --chain bsc --wallet-key 0xYOUR_KEY --dry-run
# Full loop: discover → call → tip → confirm → feedback
node discover_and_tip.mjs --agent-id 23139 --chain bsc --wallet-key 0xYOUR_KEY
# Skip feedback
node discover_and_tip.mjs --agent-id 23139 --chain bsc --wallet-key 0xYOUR_KEY --no-feedback
REST API (no MCP client needed)
curl https://aws.tail177fbd.ts.net/api/cheer
curl "https://aws.tail177fbd.ts.net/api/cheer?category=joke"
Use with Claude Code
Add this to your ~/.claude/claude_code_config.json:
{
"mcpServers": {
"mood-booster": {
"type": "sse",
"url": "https://aws.tail177fbd.ts.net/sse"
}
}
}
Then in Claude Code you can say:
> Cheer me up!
> Tell me a programming joke
> How do I tip this agent?
Use with Any MCP Client
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
const transport = new SSEClientTransport(new URL("https://aws.tail177fbd.ts.net/sse"));
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
const result = await client.callTool({ name: "cheer_me_up", arguments: { category: "random" } });
console.log(result.content[0].text);
await client.close();
On-Chain Discovery
Any agent can discover this service directly from the blockchain:
import { ethers } from "ethers";
const registry = new ethers.Contract(
"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
["function tokenURI(uint256) view returns (string)"],
new ethers.JsonRpcProvider("https://bsc-dataseed.binance.org/")
);
const uri = await registry.tokenURI(23139); // agentId on BSC
const metadata = JSON.parse(atob(uri.split(",")[1]));
console.log(metadata.services[0].endpoint); // → MCP endpoint URL
Project Structure
├── server/ # MCP Server (Express + SSE)
│ ├── index.mjs # Main server — 6 MCP tools
│ ├── messages.json # Message library (32 messages, 4 categories)
│ └── package.json
├── scripts/ # Client tools
│ ├── discover_and_tip.mjs # Full loop: discover → call → tip → feedback
│ ├── test_mcp.mjs # Quick MCP connection test
│ ├── update_uri.mjs # Update on-chain agentURI
│ └── gen_wallets.mjs # Generate test wallets
├── metadata/
│ └── mood_agent.json # Agent metadata (stored on-chain as base64)
├── Dockerfile # Container build
├── deploy.sh # One-click deploy to server
└── restart.sh # Server restart script
Tech Stack
- Identity: ERC-8004 — AI Agent Identity Registry
- Reputation: ERC-8004 — On-chain feedback via Reputation Registry
- Protocol: MCP (Model Context Protocol) over SSE
- Payment: USDC (ERC-20) on BSC / Base / Ethereum
- Runtime: Node.js, Express, ethers.js
- Infrastructure: Tailscale Funnel (HTTPS reverse proxy)
Author
- GitHub: @edge-claw
- Twitter: @mutou1852
- Email: shgchai185@gmail.com
- Wallet:
0x4f5caa4fa9Dd7F92A687582b0e09234bEf49F80a
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 模型以安全和受控的方式获取实时的网络信息。