PubFi MCP

ai.pubfi由 pubfi.ai 发布官方发布者v0.3.21更新于 Nov 16, 2026

Use MCP 2026-07-28 discovery or 2025-11-25 initialize to list and execute PubFi routes.

已验证Streamable HTTP可网页运行云端与基础设施开发者工具

概览

AI 生成的概览

PubFi MCP 让助手浏览固定的 PubFi API 路由目录,并通过 PubFi 网关执行精确的 GET 或 POST 路径。

可以做什么
  • 以紧凑分页摘要列出已安装的 Registry v2 能力目录
  • 获取某个精确能力 id 的完整类型化请求、响应、计量与就绪契约
  • 通过已认证的 PubFi 账户通道执行一个精确的 GET 或 POST 路径
  • 按预期代码负载哈希校验一笔已审核的 Substrate 运行时升级外部交易
适用场景
当你已经知道需要哪个 PubFi 路由或能力,想让助手查看其契约并执行,或在应用前校验 Substrate 运行时升级时使用。它不是发现或推荐工具:PubFi 不对能力排序也不推断意图,需由客户端选定精确 id。
运行要求
远程 Streamable HTTP 端点 mcp.pubfi.ai,另有独立的预发布端点。目录列表与详情读取是公开的。执行路由需要以 Authorization Bearer 令牌形式提供 PubFi API 密钥,或使用 OAuth 访问令牌;也可通过 x402 路径配合官方 x402 客户端免账户执行。README 中的本地 stdio 桥接需要 Node.js 24.19.0 或更高版本。
安装前请注意
执行会消耗账户中的 PubFi Credits,并可能触发真实的上游服务调用,请使用明确的实跑开关和独立的生产密钥。不要把密钥写入受版本控制的配置文件,也不要把预发布密钥发往生产端点。x402 通道涉及付款;该流程中不要传入 API 密钥、私钥或付款签名请求头。运行时升级校验涉及区块链升级负载。

AI 概览如何生成和校验

安装

在 SourceWeft 中

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

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/ai.pubfi%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "pubfi": {
      "type": "http",
      "url": "https://mcp.pubfi.ai/"
    }
  }
}

README

PubFi MCP Stdio Bridge Smoke Fixture

This public example is a local, dependency-free MCP-compatible stdio bridge and smoke fixture for the PubFi hosted MCP endpoint. Run it with Node.js 24.19.0 or a later Node.js 24 release.

The bridge forwards modern server/discover, list, and tools/call requests to the Rust MCP endpoint instead of synthesizing a second handshake, running a retired TypeScript route-tool implementation, or creating one public tool per provider. Every request carries complete MCP 2026-07-28 metadata and the bridge mirrors the standard HTTP routing headers. PubFi does not create protocol sessions. The bridge itself accepts only modern input; clients that need MCP 2025-11-25 initialize-era compatibility connect directly to the same hosted endpoint.

For hosted authenticated use, configure an MCP client for PubFi's Streamable HTTP endpoint at https://mcp.pubfi.ai. The hosted authenticated service uses four fixed Registry v2 tools. Catalog list/detail reads are public. Exact execution on this root requires a PubFi API key or OAuth access token. Eligible accountless x402 execution uses https://mcp.pubfi.ai/x402 without a Bearer credential. Upstream provider credentials stay server-side.

Tools

  • pubfi.capabilities.list
  • pubfi.capabilities.get
  • pubfi.route.execute
  • pubfi.substrate.runtime_upgrade.verify

pubfi.capabilities.list enumerates compact summaries with an opaque generation-bound cursor. pubfi.capabilities.get returns the full typed contract for one exact capability id. The client agent selects the capability; PubFi does not rank candidates or infer intent. Executable paths, methods, matchers, schemas, method-specific PubFi pricing, and readiness come only from the installed signed Registry generation.

Run In Staging

From the repository root:

export STG_PUBFI_API_KEY='<Staging PubFi API key>'
export PUBFI_MCP_ENDPOINT='https://mcp-stg.pubfi.ai'
node examples/agents/pubfi-route-tools-mcp/server.ts

Example MCP client config:

{
  "mcpServers": {
    "pubfi-route-tools": {
      "command": "node",
      "args": ["examples/agents/pubfi-route-tools-mcp/server.ts"]
    }
  }
}

Start the client from an environment that supplies these variables, or use its secret-store integration. Do not put the key in a tracked configuration file.

Move To Production

Create a separate Production key and use the exact Production endpoint:

export PROD_PUBFI_API_KEY='<Production PubFi API key>'
export PUBFI_MCP_ENDPOINT='https://mcp.pubfi.ai'
node examples/agents/pubfi-route-tools-mcp/server.ts

The client configuration above uses the same local command. Do not send a Staging key to the Production endpoint.

Smoke

node examples/agents/pubfi-route-tools-mcp/smoke_pubfi_route_tools_mcp.ts
node --test examples/agents/pubfi-route-tools-mcp/bridge-response.test.ts \
  examples/agents/pubfi-route-tools-mcp/endpoint-policy.test.ts

For an authenticated Staging smoke:

export STG_PUBFI_API_KEY='<Staging PubFi API key>'
export PUBFI_MCP_ENDPOINT='https://mcp-stg.pubfi.ai'
node examples/agents/pubfi-route-tools-mcp/smoke_pubfi_route_tools_mcp.ts

Without the endpoint-selected caller key, the smoke verifies modern discovery, the fixed tool list, complete catalog pagination, exact capability detail, and the execution credential gate. With STG_PUBFI_API_KEY for staging MCP endpoints or PROD_PUBFI_API_KEY for production MCP endpoints, the same catalog reads remain public. For a deliberate live request, set PUBFI_MCP_EXECUTE_LIVE=1, PUBFI_MCP_SMOKE_RAW_PATH, and PUBFI_MCP_SMOKE_METHOD from the current catalog. Optional PUBFI_MCP_SMOKE_QUERY and PUBFI_MCP_SMOKE_BODY supply the exact route input. PUBFI_MCP_SMOKE_BODY is the exact compact ASCII request body (for example, {"limit":10}), not a nested MCP JSON value. The smoke never invents a provider route or capability id.

See the Staging guide for login, key creation, HTTP checks, the Base Sepolia test boundary, and the Production transition.

For accountless payment, use an official x402 MCP client. An unsigned eligible pubfi.route.execute call on https://mcp-stg.pubfi.ai/x402 or https://mcp.pubfi.ai/x402 returns PaymentRequired in the MCP tool result. The retry carries the x402 V2 payment object at params._meta["x402/payment"]; the settled result carries result._meta["x402/payment-response"]. Do not pass a PubFi API key, private key, or PAYMENT-SIGNATURE HTTP header in this flow.

The stdio bridge accepts only the exact production and staging roots (https://mcp.pubfi.ai and https://mcp-stg.pubfi.ai). It rejects userinfo, ports, alternate paths, query strings, fragments, lookalike hosts, and redirects before forwarding a scoped caller key. PUBFI_MCP_ORIGIN is not a supported alias.

The hosted deploy-equivalent smoke is included in:

npm run smoke:mcp-e2e --workspace apps/web -- --json
npm run smoke:mcp-e2e --workspace apps/web -- --execute-live --json

Execution Boundary

pubfi.route.execute accepts an exact raw_path and method selected after list/detail catalog reads. The Rust Data Plane resolves that pair through the installed Registry v2 matcher and uses the same typed executor, credential authority, Credit accounting, generation, and fail-closed readiness state as the HTTP gateway. A blocked or absent current-catalog route remains non-executable. This bridge does not add provider branches, capability ranking, compatibility route ids, supplier procurement, automatic payment, or a second catalog authority.

来源:examples/agents/pubfi-route-tools-mcp/README.md,提交 13e8e5c

工具

4

pubfi.capabilities.list

Enumerate the complete installed Registry v2 catalog as deterministic compact pages. The server does not rank, infer intent, or choose a capability.

输入参数limitcursormethodprovider_key

pubfi.capabilities.get

Return the full typed request, response, metering, and readiness contract for one exact capability id from the installed Registry generation.

输入参数capability_id必填

pubfi.route.execute

Execute one exact GET or POST path through the authenticated PubFi account lane and the same Registry v2 matcher and typed executor as the HTTP gateway. Append :free only when the capability catalog publishes that exact account-scoped free variant.

输入参数bodyquerymethod必填raw_path必填request_ididempotency_key

pubfi.substrate.runtime_upgrade.verify

Verify one reviewed Substrate System.apply_authorized_upgrade extrinsic through the authenticated account lane. Supply the expected Blake2b-256 hash of the FRAME System AuthorizedUpgrade code payload, not the active :code hash at the apply block. The server streams and discards provider runtime code, persists only a compact proof, and returns independent comparison evidence.

输入参数network必填request_idextrinsic_hashextrinsic_indexidempotency_keyexpected_authorized_code_hash必填

版本历史

39
  1. v0.3.21最新Nov 16, 2026
  2. v0.3.19Nov 16, 2026
  3. v0.3.17Nov 16, 2026
  4. v0.3.16Nov 16, 2026
  5. v0.3.14Nov 15, 2026
  6. v0.3.10Nov 15, 2026
  7. v0.3.9Nov 15, 2026
  8. v0.3.8Nov 15, 2026
  9. v0.3.6Nov 13, 2026
  10. v0.3.5Nov 11, 2026
  11. v0.3.3Oct 29, 2026
  12. v0.2.85Oct 26, 2026
  13. v0.2.84Oct 12, 2026
  14. v0.2.83Oct 10, 2026
  15. v0.2.82Oct 9, 2026
  16. v0.2.81Oct 7, 2026
  17. v0.2.80Oct 4, 2026
  18. v0.2.79Oct 2, 2026
  19. v0.2.78Oct 1, 2026
  20. v0.2.77Oct 1, 2026
  21. v0.2.75Sep 29, 2026
  22. v0.2.73Sep 29, 2026
  23. v0.2.72Sep 29, 2026
  24. v0.2.69Sep 28, 2026
  25. v0.2.66Sep 27, 2026
  26. v0.2.65Sep 27, 2026
  27. v0.2.63Sep 23, 2026
  28. v0.2.60Sep 23, 2026
  29. v0.2.58Sep 22, 2026
  30. v0.2.55Sep 21, 2026
  31. v0.2.54Sep 21, 2026
  32. v0.2.51Sep 21, 2026
  33. v0.2.49Sep 20, 2026
  34. v0.2.48Sep 19, 2026
  35. v0.2.47Sep 18, 2026
  36. v0.2.46Sep 18, 2026
  37. v0.2.43Sep 17, 2026
  38. v0.2.41Sep 17, 2026
  39. v0.2.38Sep 16, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

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

这个评分如何计算