Server data from the Official MCP Registry
x402 micropayments MCP: Xiaohongshu notes and paid APIs settled in USDC on Base.
About
x402 micropayments MCP: Xiaohongshu notes and paid APIs settled in USDC on Base.
Remote endpoints: streamable-http: https://agentpay-xhs-production.up.railway.app/mcp
Security Report
AgentPay is a micropayment MCP server for accessing paid APIs (Xiaohongshu, wholesale pricing) with USDC on Base. The architecture is reasonable and permissions align with its purpose, but several security concerns lower the score: (1) Private key handling relies on environment variables without explicit validation or secure storage guidance, (2) Credential leakage risk through logging and error messages, (3) External API dependency trust without validation, and (4) Demo mode signature implementation creates a false security boundary that could be confused with real payments. Supply chain analysis found 6 known vulnerabilities in dependencies (0 critical, 5 high severity). Package verification found 1 issue.
7 files analyzed · 17 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: AGENT_PRIVATE_KEY
Environment variable: MAX_SPEND_PER_CALL
Environment variable: GATEWAY_BASE_URL
How to Install & Connect
Available as Local & Remote
This plugin can run on your machine or connect to a hosted endpoint. during install.
Documentation
View on GitHubFrom the project's GitHub README.
AgentPay MCP Server
Agent-to-Agent micropayments via x402 + MCP — let AI agents autonomously pay for API access with USDC on Base.
Install
Option A — Remote MCP(推荐,无需本地安装)
在 Cursor / Claude / 任意支持 Streamable HTTP 的客户端添加:
https://agentpay-xhs-production.up.railway.app/mcp
官方 Registry 条目:io.github.yyxqqq777/agentpay
Option B — 本地 stdio(uvx / PyPI)
{
"mcpServers": {
"agentpay": {
"command": "uvx",
"args": ["mcp-server-agentpay"],
"env": {
"AGENT_PRIVATE_KEY": "0xYourAgentPrivateKey"
}
}
}
}
只需填付款钱包私钥(需有 USDC)。网关地址已内置,一般不用改。
或永久安装:
pip install mcp-server-agentpay
# or
uv tool install mcp-server-agentpay
Tools
| Tool | Description | Cost |
|---|---|---|
xhs_get_note_detail | Xiaohongshu note detail | 0.01 USDC/call |
xhs_get_user_notes | Xiaohongshu user posted notes list | 0.01 USDC/call |
china_wholesale_pricing_query | Factory-direct wholesale pricing (1688/Yiwu) | 0.01 USDC/call |
agentpay_payment_status | View payment config, wallet, and spending limits | Free |
Example prompts
- "帮我看看这条小红书笔记写了什么:https://www.xiaohongshu.com/explore/..."
- "拉一下这个博主最近发的笔记,user_id=..."
- "Search wholesale prices for wireless earbuds under $3"
- "What's my AgentPay wallet and spending limit?"
Environment Variables
| Variable | Required | Description |
|---|---|---|
AGENT_PRIVATE_KEY | Yes(付费工具) | 付款钱包私钥 |
MAX_SPEND_PER_CALL | No | 单次上限(默认 0.10) |
GATEWAY_BASE_URL | No | 网关地址(默认已指向公网 Gateway) |
How it works
MCP Client → mcp-server-agentpay → x402 Gateway → Paid API
(auto 402 → sign → retry) (verify USDC)
- Tool call hits a paid API endpoint
- Gateway returns
402 Payment Requiredwith USDC payment details - MCP server signs payment and retries automatically
- JSON data flows back to the LLM
Self-host the Gateway
If you operate the paid API, deploy the gateway separately:
pip install "mcp-server-agentpay[gateway]"
# .env: PAYMENT_MODE=production + upstream keys + your receive wallet
agentpay-gateway
Real USDC settlement (x402)
| Mode | Behavior |
|---|---|
PAYMENT_MODE=demo | Local fake pay (dev only) |
PAYMENT_MODE=production | Official Facilitator verify + settle on-chain |
Testnet (Base Sepolia) — use https://x402.org/facilitator, network eip155:84532.
# Fund a test agent with Sepolia USDC, then:
PYTHONPATH=src python scripts/test_x402_settlement.py
Mainnet — set PAYMENT_NETWORK=eip155:8453 and a mainnet facilitator
(https://api.cdp.coinbase.com/platform/v2/x402 or PayAI). USDC goes to WALLET_RECIPIENT_ADDRESS.
See .env.example.
Publish to MCP Registry
This package is designed for the official MCP Registry.
# 1. Publish to PyPI
pip install build twine
python -m build && twine upload dist/*
# 2. Publish to MCP Registry (packages + remotes)
./scripts/publish_all.sh
Or create a GitHub Release (v0.1.0) — Actions uses Trusted Publishing to PyPI then updates the Registry.
Before publishing, update server.json and README mcp-name with your GitHub namespace (io.github.<username>/agentpay).
Development
git clone https://github.com/yyxqqq777/mcp-server-agentpay
cd mcp-server-agentpay
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v
License
MIT
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Git
Freeby Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
mcp-creator-python
Freeby mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
MarkItDown
Freeby Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
