Skip to content

[MCP] Add a spend ceiling for automatic x402 payments #557

Description

@manoahLinks

Summary

mindvault_buy wraps fetch with x402 payment, so an agent can settle any advertised price with no ceiling. Add a configurable maximum auto-pay amount that must be explicitly overridden per call.

Scope

  • Keep the implementation aligned with the existing MindVault architecture.
  • Add or update automated tests.
  • Update docs when the change affects contributors, deployers, or agent users.

Acceptance criteria

  • A configurable ceiling (env var with a documented default) blocks payments above the limit, naming the required amount and the override argument in the error.
  • Payments at or below the ceiling are unaffected, and tests cover below, at, and above the limit.
  • Failure cases are deterministic and safe to show in issue-driven contributor work.
  • Relevant local tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: mcpMCP server for AI agents (mcp/)difficulty: mediumModerate effort; touches a couple of areas or needs some contexttype: featureNew functionality or capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions