Skip to content

Add vault payment MCP tools - #182

Open
hiroTamada wants to merge 2 commits into
mainfrom
hypeship/mcp-vault-payments
Open

Add vault payment MCP tools#182
hiroTamada wants to merge 2 commits into
mainfrom
hypeship/mcp-vault-payments

Conversation

@hiroTamada

@hiroTamada hiroTamada commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Expose payment-vault preparation and observation through the existing MCP server using the published TypeScript SDK v0.100.0. These tools do not submit merchant payments or complete provider approvals.

  • Add manage_vaults, manage_vault_wallets, manage_vault_cards, and manage_vault_items under one configurable vaults toolset, with existing authentication and project-scope enforcement.
  • Support both provider specifications, full card-spec replacement, live payment-method expansion, fresh advertised-operation checks, bounded observation, event cursors, and idempotent deletion on HTTP 404.
  • Add creation-only browser vault references by ID/name, with a 20-reference cap and duplicate validation. Disable automatic retries for vault requests and vault-bound browser creation; propagate request cancellation.
  • Project public response fields, retain non-secret checkout aliases, filter credential-bearing URLs and opaque provider data, and avoid raw error-body fallbacks. Test the existing analytics payload filter against payment data.
  • Document both provider flows, user approval boundaries, response shapes, and toolset configuration in docs/vault-payments.md.

Validation

  • bun test: 383 passed, 0 failed. Includes MCP discovery/call tests with the real SDK and synthetic HTTP responses, plus input validation, project isolation, no-retry failures, safe output, and browser attachment tests.
  • Regression coverage verifies inline tools/list schemas without $refs and rejects wait outside get/events before making an API request.
  • bunx tsc --noEmit: passed.
  • Prettier check for all changed supported files: passed.
  • git diff main...HEAD --check: passed. Reviewed the complete diff and removed redundant validation.
  • All seven documentation JSON examples parse.
  • bun run format:check: blocked only by the unchanged AGENTS.md formatting warning.
  • bun run build: compilation and TypeScript stages passed; page-data collection stopped because KERNEL_CLI_PROD_CLIENT_ID is not configured locally.

No live payment credentials were created, no merchant payments were submitted, and no end-to-end provider payment flow was run.


Note

High Risk
Introduces payment-vault credential workflows (wallets, cards, browser aliases) with new external API surface; mistakes in projection, retries, or operation gating could leak secrets or encourage unsafe payment replay despite safeguards.

Overview
Adds a vaults MCP toolset (four manage_vault_* tools) on @onkernel/sdk v0.100.0, wired through existing auth, project scope, and KERNEL_MCP_ENABLED/DISABLED_TOOLSETS. The tools prepare and observe Link/AgentCard wallets and cards—they do not submit merchant payments.

manage_vaults handles vault CRUD with paginated list and idempotent delete on 404. manage_vault_wallets and manage_vault_cards upsert/update items with strict provider spec schemas (no raw card/OAuth fields). manage_vault_items lists, gets with optional wait/expand, invokes only API-advertised operations (fresh GET before invoke), streams events with cursors, and deletes items. Shared vault-responses projection strips secrets, unsafe URLs, and opaque provider payloads; errors avoid dumping full API bodies. Vault SDK calls use maxRetries: 0 and propagate cancellation; bounded waits add timeout headroom.

manage_browsers create gains optional vaults (up to 20 id/name refs, creation-only, no retries when bound). docs/vault-payments.md and README document flows and toolset toggles. Tests cover registration, validation, no-retry behavior, safe output, browser attachment, and analytics redaction for vault tool payloads.

Reviewed by Cursor Bugbot for commit ee4a7a0. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mcp Ready Ready Preview Sep 5, 2026 2:04am UTC
mcp (staging) Ready Ready Preview Sep 5, 2026 2:04am UTC

@socket-security

socket-security Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​onkernel/​sdk@​0.98.0 ⏵ 0.100.082100100 +199 +1100

View full report

@hiroTamada
hiroTamada marked this pull request as ready for review September 5, 2026 01:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0be41fc. Configure here.

Comment thread src/lib/mcp/vault-schemas.ts
Comment thread src/lib/mcp/vault-schemas.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant