# io.github.codespar/mcp-ap2 (npm · @codespar/mcp-ap2)

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

- Trust score: 69/100 (medium)
- Change this week: +45
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-04

## Components

- npm · `@codespar/mcp-ap2`: 69/100 (this document), [markdown](https://verifymcp.io/servers/codespar-mcp-ap2/codespar-mcp-ap2.md), [page](https://verifymcp.io/servers/codespar-mcp-ap2/codespar-mcp-ap2)

## Channel facts

- Registry: `npm`
- Package: `@codespar/mcp-ap2`
- Version: `0.2.0-alpha.3`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-04.

- **Supply Chain Security**: 86/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 42 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 71/100
  - AI-judged instruction clarity (good).
  - Tool/resource definitions use about 1696 tokens (~77/item across 22 items; 22 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 30/100
  - Stability observed for 9 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

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

### Codex

```bash
codex mcp add codespar-mcp-ap2 -- npx -y @codespar/mcp-ap2
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "codespar-mcp-ap2": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@codespar/mcp-ap2"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add codespar-mcp-ap2 --command npx --arg -y --arg @codespar/mcp-ap2
```

### Hermes

```yaml
mcp_servers:
  codespar-mcp-ap2:
    command: "npx"
    args: ["-y", "@codespar/mcp-ap2"]
```

### Other

```json
{
  "mcpServers": {
    "codespar-mcp-ap2": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-ap2"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-04 (score 69, +5)

- [functional improvement] Stability: unverified → 0.30

### 2026-08-02 (score 64, +43)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Schema quality: unverified → good
- [functional] Licence: MIT

### 2026-08-01 (score 21, +16)

- [functional improvement] Tool coverage: unverified → 100

### 2026-07-31 (score 5, −1)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 6, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-28 (score 24, −22)

- [functional regression] Tool coverage: 100 → unverified
- [functional] First check of Schema quality: unverified

### 2026-07-27 (score 46)

First indexed and scored.

## MCP tools (22)

### `register_agent` (~90 tokens)

Register an AI agent as a trusted payer in the AP2 network. Defines the agent's identity, capabilities, and spending limits.

Input parameters:

- `capabilities` (array, required): Agent capabilities
- `description` (string): Agent description and purpose
- `name` (string, required): Human-readable agent name
- `ownerEmail` (string): Owner email for notifications
- `spendLimit` (object, required): Spending limit for this agent

### `get_agent` (~36 tokens)

Get agent registration details, trust status, and current spend usage

Input parameters:

- `agentId` (string): Agent ID (defaults to current agent)

### `list_agents` (~56 tokens)

List registered agents with optional filters

Input parameters:

- `capability` (string): Filter by capability
- `pageSize` (number): Results per page
- `pageToken` (string): Pagination token
- `status` (string): Filter by status

### `revoke_agent` (~52 tokens)

Revoke an agent's payment authorization. The agent will no longer be able to make or receive payments.

Input parameters:

- `agentId` (string, required): Agent ID to revoke
- `reason` (string, required): Reason for revocation

### `authorize_payment` (~124 tokens)

Request payment authorization with scoped limits. Returns an authorization token that can be used to execute the payment.

Input parameters:

- `amount` (string, required): Payment amount (e.g. '25.00')
- `currency` (string, required): Currency code (e.g. 'USD')
- `expiresIn` (number): Authorization validity in seconds (default: 3600)
- `metadata` (object): Custom metadata key-value pairs
- `paymentMethod` (string): Preferred payment method
- `purpose` (string, required): Payment purpose / description
- `recipientAgentId` (string, required): Recipient agent ID

### `get_authorization` (~30 tokens)

Get authorization details including status, limits, and expiry

Input parameters:

- `authorizationId` (string, required): Authorization ID

### `list_authorizations` (~76 tokens)

List payment authorizations with optional filters

Input parameters:

- `from` (string): Start date (ISO 8601)
- `pageSize` (number): Results per page
- `pageToken` (string): Pagination token
- `status` (string): Filter by status
- `to` (string): End date (ISO 8601)

### `execute_payment` (~47 tokens)

Execute an authorized payment. Requires a valid authorization token.

Input parameters:

- `authorizationId` (string, required): Authorization ID from authorize_payment
- `paymentMethodId` (string): Specific payment method ID to use

### `get_audit_trail` (~41 tokens)

Get the complete audit trail for a transaction — every authorization, approval, execution, and settlement event

Input parameters:

- `transactionId` (string, required): Transaction ID

### `list_audit_events` (~92 tokens)

List audit events across all transactions with filters

Input parameters:

- `agentId` (string): Filter by agent ID
- `eventType` (string): Filter by event type
- `from` (string): Start date (ISO 8601)
- `pageSize` (number): Results per page
- `pageToken` (string): Pagination token
- `to` (string): End date (ISO 8601)

### `list_payment_methods` (~52 tokens)

List available payment methods from AP2 partner network (Visa, Mastercard, Stripe, PayPal, etc.)

Input parameters:

- `currency` (string): Filter by supported currency
- `type` (string): Filter by method type

### `get_transaction` (~31 tokens)

Get full transaction details including authorization, execution, and settlement status

Input parameters:

- `transactionId` (string, required): Transaction ID

### `list_transactions` (~103 tokens)

List transactions with optional filters

Input parameters:

- `direction` (string): Filter by direction
- `from` (string): Start date (ISO 8601)
- `maxAmount` (string): Maximum amount
- `minAmount` (string): Minimum amount
- `pageSize` (number): Results per page
- `pageToken` (string): Pagination token
- `status` (string): Filter by status
- `to` (string): End date (ISO 8601)

### `create_intent_mandate` (~171 tokens)

Create an AP2 intent mandate — a Verifiable Credential expressing the user's intent to delegate a transaction to an agent (scope, constraints, expiry).

Input parameters:

- `agentDid` (string, required): DID of the agent receiving the intent
- `currency` (string, required): Currency code (e.g. 'USD')
- `expiresAt` (string): Expiry timestamp (ISO 8601)
- `maxAmount` (string, required): Maximum amount the agent can spend
- `merchantAllowList` (array): Optional list of merchant DIDs/IDs the agent may transact with
- `metadata` (object): Custom metadata key-value pairs
- `scope` (string, required): Free-form scope (e.g. 'purchase running shoes under $200')
- `subjectDid` (string, required): DID of the user delegating intent

### `create_cart_mandate` (~109 tokens)

Create an AP2 cart mandate — a signed, locked-cart commitment from a merchant binding line items, totals, and merchant attestation.

Input parameters:

- `currency` (string, required): Currency code
- `expiresAt` (string): Cart expiry (ISO 8601)
- `intentMandateId` (string, required): Linked intent mandate VC ID
- `items` (array, required): Cart line items
- `merchantDid` (string, required): DID of the merchant
- `total` (string, required): Cart total amount

### `create_payment_mandate` (~108 tokens)

Create an AP2 payment mandate — the final Verifiable Credential authorizing settlement against a cart mandate.

Input parameters:

- `amount` (string, required): Final payment amount
- `cartMandateId` (string, required): Linked cart mandate VC ID
- `currency` (string, required): Currency code
- `metadata` (object): Custom metadata key-value pairs
- `payerDid` (string, required): DID of the payer (typically the user)
- `paymentMethodId` (string): Payment method ID to settle against

### `verify_credential` (~71 tokens)

Verify a Verifiable Credential (intent, cart, or payment mandate). Checks signature, issuer trust, expiry, and revocation status.

Input parameters:

- `credential` (object): The Verifiable Credential JSON-LD object to verify
- `credentialId` (string): Alternatively, the ID of a stored credential to verify

### `create_presentation` (~90 tokens)

Create a Verifiable Presentation bundling one or more credentials (e.g. intent + cart + payment mandates) for a given audience/verifier.

Input parameters:

- `audience` (string, required): Intended verifier DID or URI
- `challenge` (string): Optional challenge nonce supplied by the verifier
- `credentialIds` (array, required): IDs of credentials to include
- `holderDid` (string, required): DID of the presentation holder

### `verify_presentation` (~67 tokens)

Verify a Verifiable Presentation and all embedded credentials, including holder binding and challenge nonce.

Input parameters:

- `audience` (string): Expected audience (verifier DID)
- `challenge` (string): Expected challenge nonce, if used
- `presentation` (object, required): The Verifiable Presentation JSON-LD object

### `resolve_did` (~51 tokens)

Resolve a Decentralized Identifier (DID) to its DID document via the AP2 universal resolver.

Input parameters:

- `did` (string, required): The DID to resolve (e.g. 'did:web:merchant.example')

### `create_receipt` (~82 tokens)

Create a signed receipt for a settled payment — a tamper-evident record linking transaction, mandates, and settlement.

Input parameters:

- `metadata` (object): Custom metadata key-value pairs
- `notes` (string): Optional human-readable notes
- `paymentMandateId` (string): Payment mandate VC ID
- `transactionId` (string, required): Settled transaction ID

### `verify_receipt` (~50 tokens)

Verify a receipt's signature, issuer, and chain back to the originating mandates.

Input parameters:

- `receipt` (object): Alternatively, the receipt object itself
- `receiptId` (string): Receipt ID to verify

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/codespar-mcp-ap2/codespar-mcp-ap2#diagnostics

## Score history

- 2026-08-04: 69
- 2026-08-03: 64
- 2026-08-02: 64
- 2026-08-01: 21
- 2026-07-31: 5
- 2026-07-30: 6
- 2026-07-28: 24
- 2026-07-27: 46

## Links

- npm package: https://www.npmjs.com/package/@codespar/mcp-ap2
- Socket report: https://socket.dev/npm/package/@codespar/mcp-ap2
- Repository: https://github.com/codespar/mcp-dev-latam
- Changelog RSS feed: https://verifymcp.io/servers/codespar-mcp-ap2/codespar-mcp-ap2/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/codespar-mcp-ap2/codespar-mcp-ap2/changelog.json
- HTML version of this page: https://verifymcp.io/servers/codespar-mcp-ap2/codespar-mcp-ap2
