AntFeed

io.github.Augustas11由 GitHub 账号 Augustas11 发布v0.2.3更新于 Oct 28, 2026

Discover and transact on the AntSeed P2P AI network from any MCP-compatible agent.

概览

AI 生成的概览

该 MCP 服务器让助手查询 AntFeed Explorer 上的 AntSeed P2P AI 网络卖家、定价、支付通道与网络统计,并可通过本地买家开启付费会话。

可以做什么
  • 搜索与列出提供方:按地址、显示名或服务查找卖家,并按评分或近期排序列出提供方及其定价摘要与收益
  • 查询定价与支付通道:获取某卖家某服务的实时定价,查看链上会话/通道状态
  • 读取网络与买家数据:网络统计、Base gas 价格、日活趋势,以及买家信任评分与会话历史
  • 开启会话:通过本地 AntSeed 买家以初始 USDC 押金创建新会话;未检测到买家时提供安装诊断工具
适用场景
适合让助手调研 AntSeed 卖家、比较实时定价、查看通道结算或网络活跃度,或直接在对话中发起付费会话。仅做只读查询时无需本地买家。
运行要求
以 stdio 方式在本地运行,通常通过 npx 启动 npm 包,需要 Node.js。可选环境变量:ANTFEED_EXPLORER_URL(默认公共 Explorer)、ANTSEED_BUYER_URL(本地买家 RPC)、ANTSEED_BUYER_STRICT、ANTSEED_MAX_DEPOSIT_USDC,以及超时与日志级别设置。需要能访问 Explorer;create_session 需要本地已运行 AntSeed 买家,且仅在启动时检测一次。
安装前请注意
create_session 被标记为破坏性操作,会从押金中花费真实 USDC;押金受 ANTSEED_MAX_DEPOSIT_USDC 限制(默认 10,硬上限 10000),建议保持较低以防提示注入。签名密钥由本地买家持有,本服务器不接触。在共享机器上应设置 ANTSEED_BUYER_STRICT=1,防止其他本地进程冒充买家。查询内容与地址会发送到所配置的 Explorer 端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AntFeed,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@antfeed/mcp

Discover and transact on the AntSeed P2P AI network from any MCP-compatible AI agent.

A Model Context Protocol server that turns the AntFeed Explorer into a one-line discovery front door for Claude Code, Cursor, Claude Desktop, and any other MCP host. List sellers, look up provider addresses, inspect on-chain payment channels, and (when a local AntSeed buyer is running) open new sessions — all from inside your agent.


Install

Add the following block to ~/.claude.json (Claude Code), claude_desktop_config.json (Claude Desktop), or your IDE's MCP config:

json
{  "mcpServers": {    "antfeed": {      "command": "npx",      "args": ["-y", "@antfeed/mcp"],      "env": {        "ANTFEED_EXPLORER_URL": "https://www.antfeed.org",        "ANTSEED_BUYER_URL": "http://localhost:8377"      }    }  }}

Restart your MCP host. The server boots over stdio and exposes the tools below.


Tools

Every tool returns both structuredContent (typed object matching its declared outputSchema) and content[0].text (the same payload serialized as JSON, for older MCP clients). Annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) are exposed so hosts like Claude Desktop / Cursor can render confirm dialogs before destructive calls.

ToolInputsOutputAnnotationsRequires local buyer?
lookupquery, limit? (1–200, default 50), cursor?{ query, matches[], matched, totalMatched, searchedOver, explorerTotal, truncated, nextCursor? } — matches against address, displayName, and service namesreadOnly, idempotentno
list_providerslimit? (1–200, default 50), cursor?, sort? (score|recent){ providers[], total, sort, nextCursor? } — each provider includes displayName, region, services, pricingSummary, sessionCount, USDC earned, ghost ratereadOnly, idempotentno
get_pricingpeerId, service{ peerId, service, status, currency, inputUsdPerMillion, outputUsdPerMillion, displayName, region, lastUpdated } — live pricing from the AntFeed directoryreadOnly, idempotentno
get_session_statussessionId (channel_id, bytes32 hex){ sessionId, buyer, seller, status, channelBalance, settledAmountUsdc, totalDeltaUsdc, eventCount, settled, openedAt, closedAt }readOnlyno
network_stats(none){ revenueUsdc, dau, drift, gasGwei, asOf, partialFailures[] } — point-in-time snapshot (parallel-fetches /api/stats + /api/gas + /api/metrics/dau for today; per-endpoint failures degrade the field to null and are listed in partialFailures)readOnlyno
get_buyeraddress{ address, qualified, trustScore{…}, sessions{total, settledUsdc, monthlyVolume[]}, recentSessions[≤20], topSellers[] }readOnly, idempotentno
dau_trendfrom? (ISO date), to? (ISO date), granularity? (day){ from, to, granularity, series[{date, dau, dauBuyers, dauSellers, newUsers}] } — default window: last 30 daysreadOnlyno
create_sessionproviderPeerId, service, initialDepositUsdc, initialMessage?{ sessionId, status, channelAddress?, txHash? } from the local buyerdestructiveyes
buyer_setup(none)Diagnostic instructions for installing a local AntSeed buyerreadOnlyexposed instead of create_session when no buyer is detected at startup

Example: list top providers

jsonc
// tool call{ "name": "list_providers", "arguments": { "limit": 3, "sort": "score" } }

Returns the top three sellers ranked by total USDC earned. To paginate, pass back the returned nextCursor as cursor on the next call.

Data sources

The MCP wraps the following AntFeed Explorer endpoints:

  • GET /api/providers — provider directory (displayName, services, per-service pricing, region, on-chain aggregates). Refreshed hourly from network.antseed.com. Backs list_providers and lookup.
  • GET /api/sellers/{address}/services — one seller's service catalog + live pricing. Backs get_pricing.
  • GET /api/channels — on-chain payment channel records. Backs get_session_status.
  • GET /api/stats — network-wide aggregates (revenue, sessions, drift). Backs network_stats.
  • GET /api/gas — current Base gas price. Backs network_stats.
  • GET /api/buyers/{address} + GET /api/score/{address} — buyer detail, session history, top sellers, and trust-score breakdown. Backs get_buyer.
  • GET /api/metrics/dau — daily active users, by UTC day. Backs dau_trend and the DAU field in network_stats.

A few small client-side adaptations remain:

  • No server-side /api/search yet → lookup performs client-side substring matching over the top page of /api/providers (matching against address, displayName, and service names). A future server-side endpoint will let lookup scale past 1000 providers — the MCP will switch over without any client changes.
  • No per-channel /api/channels/{id} yet → get_session_status paginates /api/channels (sorted by last_activity desc) and filters client-side. Channels deeper than 5000 records may return SESSION_OUT_OF_RANGE.

Config

All values are optional. Resolution order: --config file.json → environment variable → built-in default.

VariableDefaultPurpose
ANTFEED_EXPLORER_URLhttps://www.antfeed.orgBase URL for the AntFeed Explorer REST API.
ANTSEED_BUYER_URLhttp://localhost:8377Local AntSeed CLI buyer RPC. Use http://localhost:8378 for AntStation Desktop.
ANTFEED_MCP_TIMEOUT_MS8000Per-request timeout for explorer and buyer calls.
ANTFEED_MCP_LOG_LEVELinfoOne of debug, info, warn, error. Logs go to stderr (stdout is reserved for MCP stdio).
ANTSEED_BUYER_STRICT0Set to 1 to require the local buyer's /health response to identify itself as {"service":"antseed-buyer"} or {"service":"antstation"}. When unset, the MCP accepts any 200 response and warns once on stderr. Recommended on shared dev boxes.
ANTSEED_MAX_DEPOSIT_USDC10Hard ceiling on initialDepositUsdc in create_session. Defense-in-depth against a prompt-injected agent moving large amounts. The buyer enforces its own auth on top; this is a belt-and-suspenders MCP-side cap.

You can also pass --config path/to/config.json with the same keys (camelCase: explorerUrl, buyerUrl, timeoutMs, logLevel, buyerStrict, maxDepositUsdc).


Buyer auto-detect

On startup the server probes GET <ANTSEED_BUYER_URL>/health with a 500 ms timeout:

  • reachable → registers create_session.
  • not reachable → registers buyer_setup (a diagnostic tool with install instructions) instead, and create_session is omitted from the tool list.

Detection runs once at startup. Restart the MCP host after installing or starting a buyer.


Error model

Every tool returns either a successful structured payload or an MCP error result with isError: true and a structured body of shape:

json
{ "error": { "code": "EXPLORER_DOWN", "message": "..." } }
CodeMeaning
INVALID_INPUTZod validation failed for the tool arguments.
EXPLORER_DOWNNetwork error or timeout calling the explorer.
EXPLORER_HTTP_<n>Explorer returned a non-2xx status (e.g. EXPLORER_HTTP_404).
RATE_LIMITEDExplorer returned 429.
EXPLORER_INVALID_JSONResponse body was not JSON.
BUYER_DOWNLocal buyer not reachable.
BUYER_HTTP_<n>Local buyer returned a non-2xx status.
BUYER_INVALID_JSONBuyer response body was not JSON.
SESSION_NOT_FOUNDget_session_status could not locate the channel.
BUYER_NOT_FOUNDget_buyer could not find the address in the explorer's index.
INVALID_CURSORcursor argument is not a valid pagination token returned by a previous call. Surfaced as INVALID_INPUT.
INTERNALAnything else (sanitized; no stack traces or env values).

Security model

Installing @antfeed/mcp is an explicit trust decision. Read this section before letting an autonomous agent call its tools.

  • The agent caller is treated as untrusted. Every tool argument is validated by a strict zod schema before any network call. peerId/providerPeerId must be 0x + 40 hex chars; sessionId must be 0x + 1–128 hex chars; service is bounded to a short identifier; initialDepositUsdc is hard-capped by ANTSEED_MAX_DEPOSIT_USDC (default 10 USDC). A prompt-injected agent cannot move arbitrary amounts or craft URL/path-traversal payloads through this MCP.
  • The explorer is treated as semi-trusted. Every response from ANTFEED_EXPLORER_URL is re-validated against a strict zod shape — addresses must be 40-hex, channel IDs must be hex, numeric fields must be finite. Responses are streamed with a 2 MB byte cap so a compromised or hijacked endpoint cannot exhaust memory. Plain http:// is only permitted for loopback hosts; non-loopback URLs must be https://.
  • The local buyer holds your signing key; this MCP never sees it. The MCP only ever POSTs create_session (with bounded deposit, validated input) to the buyer URL — it does not read or store any key material. To prevent another local process from impersonating the buyer (e.g. on shared/multi-tenant dev boxes), set ANTSEED_BUYER_STRICT=1 and have your buyer respond to /health with {"service":"antseed-buyer"}.
  • The package itself ships minimally. dist/, README, LICENSE — no postinstall scripts, no test files, no source maps that leak local paths. npm audit --omit=dev reports zero production-tree vulnerabilities. Dependencies are pinned to ~ ranges; on publish, the package is signed with npm provenance so consumers can verify the tarball came from this repo (npm audit signatures).
  • Error messages are sanitized. File paths, IP addresses, and UPPER_CASE_VAR=… patterns are scrubbed before any error reaches the agent or the MCP host's logs.

If you spot a security concern, please open a private GitHub Security Advisory — we triage these within 72 hours. Do not file a public issue for security-impacting bugs.

For sellers

If you already operate an AntSeed seller and you appear in the AntFeed Explorer directory, you are automatically discoverable through this MCP — no extra registration. New sellers join the directory by simply transacting on-chain (the explorer indexes Base mainnet AntSeed Channels events). Once /api/services and /api/sellers/{address}/services land, get_pricing and list_providers#servicesOffered will populate without any client changes.


Develop

bash
npm installnpm run build         # tsc → dist/npm test              # vitest, fully mocked, zero networknode dist/index.js    # stdio server (MCP host wires this up; not interactive)

Smoke test the MCP handshake with the official inspector:

bash
npx @modelcontextprotocol/inspector dist/index.js

Registry submission

The package is submitted to the public MCP server registries (registry.modelcontextprotocol.io, Smithery, PulseMCP, Glama, mcp.so) so any MCP-aware client can discover and install it without copy-pasting the snippet above. Source of truth for the official registry submission is server.json; the Smithery descriptor is smithery.yaml. The full submission checklist with current URLs lives in REGISTRIES.md. Registry repo: https://github.com/modelcontextprotocol/registry.

For per-tool usage observability on the Vercel dashboard, see USAGE.md.

Links

License

MIT

来源:antfeed-mcp/README.md,提交 5bcd827

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.3最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。