Mood Booster Agent

AI 与智能体

by edge-claw

基于 ERC-8004 的 AI Agent,提供鼓舞消息、USDC 打赏,以及 on-chain 声誉反馈功能。

什么是 Mood Booster Agent

基于 ERC-8004 的 AI Agent,提供鼓舞消息、USDC 打赏,以及 on-chain 声誉反馈功能。

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:

  1. On-chain Discovery — Query Identity Registry to find the agent's MCP endpoint
  2. MCP Communication — Connect via SSE, call tools, get results
  3. USDC Tipping — Reward the agent with on-chain micropayments
  4. Reputation Feedback — Submit on-chain feedback to Reputation Registry (giveFeedback)
  5. 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.

code
┌──────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  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

ChainagentIdExplorer
BSC23139bscscan.com
Base24692basescan.org
Ethereum28289etherscan.io
Arbitrum591arbiscan.io
Optimism431optimistic.etherscan.io
Polygon233polygonscan.com
  • Identity Registry: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
  • Reputation Registry: 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
  • MCP Endpoint: https://oc-001.tail177fbd.ts.net/mcp/sse
  • Tip Wallet: 0x4f5caa4fa9Dd7F92A687582b0e09234bEf49F80a

MCP Tools

ToolDescription
cheer_me_upGet a warm, uplifting message (encouragement / compliment / wisdom / joke)
get_tip_infoGet tipping details in JSON format for automated transfers
confirm_tipReport a completed USDC tip with on-chain verification
report_feedbackReport an ERC-8004 giveFeedback transaction — leaves traceable protocol interaction on-chain
how_to_tipGet a complete tipping guide with code examples
get_statsView service statistics

Quick Start

Run the server

bash
cd server
npm install
node index.mjs
# MCP SSE: http://localhost:3004/sse
# REST API: http://localhost:3004/api/cheer

Docker

bash
docker build -t mood-booster-agent .
docker run -p 3004:3004 mood-booster-agent

Full end-to-end loop

bash
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)

bash
curl https://oc-001.tail177fbd.ts.net/mcp/api/cheer
curl "https://oc-001.tail177fbd.ts.net/mcp/api/cheer?category=joke"

Use with Claude Code

Add this to your ~/.claude/claude_code_config.json:

json
{
  "mcpServers": {
    "mood-booster": {
      "type": "sse",
      "url": "https://oc-001.tail177fbd.ts.net/mcp/sse"
    }
  }
}

Then in Claude Code you can say:

code
> Cheer me up!
> Tell me a programming joke
> How do I tip this agent?

Use with Any MCP Client

javascript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const transport = new SSEClientTransport(new URL("https://oc-001.tail177fbd.ts.net/mcp/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:

javascript
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

code
├── 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

License

MIT

常见问题

Mood Booster Agent 是什么?

基于 ERC-8004 的 AI Agent,提供鼓舞消息、USDC 打赏,以及 on-chain 声誉反馈功能。

相关 Skills

Claude接口

by anthropics

Universal
热门

面向接入 Claude API、Anthropic SDK 或 Agent SDK 的开发场景,自动识别项目语言并给出对应示例与默认配置,快速搭建 LLM 应用。

想把Claude能力接进应用或智能体,用claude-api上手快、兼容Anthropic与Agent SDK,集成路径清晰又省心

AI 与智能体
未扫描165.3k

RAG架构师

by alirezarezvani

Universal
热门

聚焦生产级RAG系统设计与优化,覆盖文档切块、检索链路、索引构建、召回评估等关键环节,适合搭建可扩展、高准确率的知识库问答与检索增强应用。

面向RAG落地,把知识库、向量检索和生成链路系统串联起来,做架构设计时更清晰,也更少踩坑。

AI 与智能体
未扫描23.5k

多智能体架构

by alirezarezvani

Universal
热门

聚焦多智能体系统架构设计,梳理 Supervisor、Swarm、分层和 Pipeline 等模式,覆盖角色定义、通信协作与性能评估,适合规划稳健可扩展的 AI agent 编排方案。

帮你系统解决多智能体应用的架构设计与协同编排难题,适合构建复杂 AI 工作流,成熟度高、社区认可也很亮眼。

AI 与智能体
未扫描23.5k

相关 MCP Server

顺序思维

编辑精选

by Anthropic

热门

Sequential Thinking 是让 AI 通过动态思维链解决复杂问题的参考服务器。

这个服务器展示了如何让 Claude 像人类一样逐步推理,适合开发者学习 MCP 的思维链实现。但注意它只是个参考示例,别指望直接用在生产环境里。

AI 与智能体
89.1k

知识图谱记忆

编辑精选

by Anthropic

热门

Memory 是一个基于本地知识图谱的持久化记忆系统,让 AI 记住长期上下文。

帮 AI 和智能体补上“记不住”的短板,用本地知识图谱沉淀长期上下文,连续对话更聪明,数据也更可控。

AI 与智能体
89.1k

by deusdata

热门

持久化的代码库知识图谱,可跨会话保留上下文,在 session 重启或上下文压缩后仍能继续使用。

专治 AI 编程助手“会话失忆”,把代码库沉淀为持久知识图谱,重启或压缩上下文后也能无缝续上开发状态。

AI 与智能体
36.7k

评论