Mcp Ap2

io.github.codespar由 GitHub 帳號 codespar 發布v0.2.0-alpha.4更新於 Oct 27, 2026

DEPRECATED: no live endpoint (AP2 is a spec; ap2.googleapis.com serves no API)

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

已棄用的 Google AP2 代理支付協定 MCP 伺服器,提供 22 個支付、授權憑證與憑據工具,但不連接任何線上服務。

可以做什麼
  • 註冊、列出、檢視與撤銷作為付款方的 AI 代理,含信任狀態與消費額度
  • 申請、檢視與列出支付授權,執行已授權支付並檢視交易
  • 讀取交易稽核軌跡與稽核事件,列出合作方支付方式
  • 建立並驗證意圖、購物車與支付授權憑證、可驗證呈現與收據
  • 透過 AP2 通用解析器解析去中心化識別碼
適用情境
僅適合參考或試驗 AP2 規範的資料模型。此套件已棄用,沒有任何工具能連上服務,文件中的端點皆回傳錯誤,因此無法用於真實的代理支付。
執行需求
透過 npx 從 npm 套件在本機執行。需要 AP2_API_KEY 密鑰(以 Bearer 形式送出)與 AP2_AGENT_ID(以 X-Agent-Id 標頭送出),可選 AP2_SANDBOX 與 AP2_BASE_URL。沒有入口網站簽發這些憑證,預設端點也不可用。
安裝前請注意
已棄用且為 alpha 版本:沒有可用端點,呼叫無法成功。它要求 API 金鑰與代理 ID,但沒有簽發方。工具集涉及支付、授權憑證與收據,若設定了可用端點,可能授權並執行付款、撤銷代理授權。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Ap2,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@codespar/mcp-ap2

Deprecated: no live endpoint. Measured on 2026-09-27: ap2.googleapis.com answers every path with Google's generic Error 404 (Not Found) page, and sandbox.ap2.googleapis.com (used with AP2_SANDBOX=true) fails the TLS handshake, because the certificate served there covers *.googleapis.com and not the extra label. AP2 is an open specification, not an API Google hosts. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with AP2_BASE_URL. To bring the package back, open an issue in mcp-dev-latam with the provider's documented base URL.

Alpha release — published under the alpha npm dist-tag. Pin exact versions during 0.x.x-alpha. Install with npm install <pkg>@alpha.

MCP server for AP2 — Google's Agent-to-Agent Payment Protocol (authorization, audit, and trust for agentic payments)

[npm] [License: MIT]

What is AP2?

AP2 (Agent-to-Agent Payment Protocol) is Google's open framework for authorization, audit, and trust in agentic payments. It answers the critical questions: Who authorized this payment? What limits apply? What's the full audit trail?

The specification is published at ap2-protocol.org.

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

json
{  "mcpServers": {    "ap2": {      "command": "npx",      "args": ["-y", "@codespar/mcp-ap2"],      "env": {        "AP2_API_KEY": "your-key",        "AP2_AGENT_ID": "your-agent-id"      }    }  }}

Claude Code

bash
claude mcp add ap2 -- npx @codespar/mcp-ap2

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

json
{  "servers": {    "ap2": {      "command": "npx",      "args": ["-y", "@codespar/mcp-ap2"],      "env": {        "AP2_API_KEY": "your-key",        "AP2_AGENT_ID": "your-agent-id"      }    }  }}

Tools (22)

ToolPurpose
register_agentRegister an AI agent as a trusted payer in the AP2 network.
get_agentGet agent registration details, trust status, and current spend usage
list_agentsList registered agents with optional filters
revoke_agentRevoke an agent's payment authorization.
authorize_paymentRequest payment authorization with scoped limits.
get_authorizationGet authorization details including status, limits, and expiry
list_authorizationsList payment authorizations with optional filters
execute_paymentExecute an authorized payment.
get_audit_trailGet the complete audit trail for a transaction — every authorization, approval, execution, and settlement e..
list_audit_eventsList audit events across all transactions with filters
list_payment_methodsList payment methods offered by the AP2 partner network
get_transactionGet full transaction details including authorization, execution, and settlement status
list_transactionsList transactions with optional filters
create_intent_mandateCreate an AP2 intent mandate — a Verifiable Credential expressing the user's intent to delegate a transacti..
create_cart_mandateCreate an AP2 cart mandate — a signed, locked-cart commitment from a merchant binding line items, totals, a..
create_payment_mandateCreate an AP2 payment mandate — the final Verifiable Credential authorizing settlement against a cart mandate.
verify_credentialVerify a Verifiable Credential (intent, cart, or payment mandate).
create_presentationCreate a Verifiable Presentation bundling one or more credentials (e.g.
verify_presentationVerify a Verifiable Presentation and all embedded credentials, including holder binding and challenge nonce.
resolve_didResolve a Decentralized Identifier (DID) to its DID document via the AP2 universal resolver.
create_receiptCreate a signed receipt for a settled payment — a tamper-evident record linking transaction, mandates, and..
verify_receiptVerify a receipt's signature, issuer, and chain back to the originating mandates.

Authentication

The server sends AP2_API_KEY as an Authorization: Bearer header and AP2_AGENT_ID as an X-Agent-Id header on every request (src/index.ts:69-73).

There is no portal issuing those credentials. The developer portal this README used to link, developers.google.com/ap2, answers HTTP 404, as does the ap2-spec repository it pointed at. The published specification is at ap2-protocol.org.

Environment Variables

VariableRequiredDescription
AP2_API_KEYYesSent as Authorization: Bearer
AP2_AGENT_IDYesSent as the X-Agent-Id header
AP2_SANDBOXNotrue switches BASE_URL to https://sandbox.ap2.googleapis.com/v1, which fails TLS

Use Cases

  • Authorized agent purchases — Agent requests spend authorization, gets approval with limits, then executes payment
  • Multi-agent commerce — Agent A authorizes Agent B to make payments on its behalf with scoped limits
  • Compliance & audit — Full audit trail of every authorization, approval, execution, and settlement
  • Cross-rail payments — AP2 bridges card payments, bank transfers, wallets, and x402 micropayments

Roadmap

v0.2 (planned)

  • create_policy — Define reusable authorization policies
  • delegate_authority — Allow agent-to-agent authorization delegation
  • get_spend_report — Get spend analytics and reports
  • OAuth 2.0 authentication flow

v0.3 (planned)

  • Webhook support for real-time authorization events
  • Multi-currency support with automatic FX
  • Integration with x402 as payment method

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

來源:packages/payments/ap2/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.2.0-alpha.4最新Sep 27, 2026
  2. v0.2.0-alpha.3Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分