agentgate-mcp-server
v0.1.0
Published
MCP server for AgentGate — AI agent payment authorization and governance
Maintainers
Readme
@agentgate/mcp-server
MCP server for AgentGate — AI agent payment authorization and governance.
Lets any AI agent (Claude, OpenAI Agents SDK, LangChain, CrewAI) check payment authorization, confirm transactions, and manage budgets through AgentGate's policy engine.
Quick Start
# Claude Code
claude mcp add agentgate -- npx @agentgate/mcp-server
# Or run directly
AGENTGATE_API_URL=https://your-instance.vercel.app \
AGENTGATE_API_KEY=ag_live_xxxxx \
npx @agentgate/mcp-serverEnvironment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| AGENTGATE_API_URL | Yes | Your AgentGate instance URL |
| AGENTGATE_API_KEY | Yes | API key with evaluate scope |
Tools
check_payment_authorization
Check whether an agent is authorized to make a payment. Call this BEFORE executing any payment.
Returns AUTHORIZED (with transaction ID and token), DENIED (with reason), or ESCALATED (with approval URL).
confirm_payment
Report that a payment was executed. Call this AFTER the payment succeeds. Pass the tx_id and optionally the token from check_payment_authorization.
void_payment
Report that a payment attempt failed. Releases the budget reservation so the agent can retry.
check_budget_remaining
Check how much budget an agent has remaining. Call this BEFORE check_payment_authorization to avoid unnecessary denials.
check_escalation_status
Poll the status of a pending escalation (human approval request).
Agent Workflow
1. check_budget_remaining → "You have $1,800 remaining today"
2. check_payment_authorization → "AUTHORIZED: tx_id=agtx_abc123"
3. [Agent executes payment on Stripe/PIX/x402]
4. confirm_payment → "CONFIRMED: awaiting rail verification"If payment fails at the rail:
3. [Payment fails]
4. void_payment → "VOIDED: $4,500 budget released"If escalation required:
2. check_payment_authorization → "ESCALATED: needs human approval"
3. check_escalation_status → "PENDING: 42 minutes remaining"
... (poll) ...
4. check_escalation_status → "APPROVED"
5. check_payment_authorization → "AUTHORIZED" (bypass recognized)Amount Convention
All tool inputs use standard currency units (dollars, reais — e.g., 4500.00 for four thousand five hundred dollars). The MCP server converts to minor units (cents) internally.
License
Apache-2.0
