AchPay
Integrates with Razorpay AutoPay to process payments and mandates, enabling secure checkout and payment settlement for AI agent transactions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AchPaySearch for 4K monitors and get a quote for two of them."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AchPay
Agentic Commerce Hub for Secure AI Payments
An open, deterministic protocol that gives AI agents a wallet they cannot misuse. Built with cryptographically signed quotes, pure policy validation, database idempotency, and tamper-evident audit chains.
Overview
Allowing an autonomous LLM to spend money is inherently risky. Traditional payment flows accept dynamic amounts from client code, leaving systems vulnerable to prompt injection, hallucinations, hallucinated prices, and runaway loops.
AchPay resolves this by enforcing strict separation between agent intent and financial execution:
Agents never touch prices or amounts. The only handle an agent possesses is an expiring, catalog-backed
quote_id.Untrusted merchant text cannot execute instructions. Product descriptions are isolated and withheld from decision paths.
Spending limits are hard constraints. Policies evaluate deterministically without external network or database side effects.
Every state transition is verifiable. All actions are recorded on an insert-only, cryptographic hash-chained audit ledger.
Related MCP server: Allowance MCP
Core Defense Layers
AchPay processes all agent transactions through six deterministic defense layers:
Layer | Defense | Invariant |
1. Signed Quotes | HMAC-SHA256 Catalog Quotes | Quotes are priced server-side and sealed with a 120s TTL. No endpoint or tool accepts an amount. |
2. Ingest Sanitiser | Merchant Content Isolation | Product prose is treated as untrusted data, stripped from standard browse paths, and never interpolated into model directives. |
3. Policy Engine | Pure-Function Evaluation | Deterministic evaluation of transaction limits, daily caps, velocity, and category denylists. Every decision emits an explicit |
4. Database Idempotency | Atomic Unique Constraints |
|
5. Human Gate | Single-Use Approval Tokens | Out-of-bounds purchases gate automatically. Ephemeral approval links allow humans to authorize or deny without exposing keys to the agent. |
6. Hash-Chained Ledger | Cryptographic Audit Chain | Append-only ledger where each entry commits to the SHA-256 hash of the previous row. Any tampering pinpoints the exact broken sequence. |
Quick Start
Prerequisites
Node.js
>= 20.0.0and pnpm>= 9.0.0Docker Desktop (PostgreSQL & Redis)
ngrok (optional, for live Razorpay webhook testing)
Installation
# Clone the repository
git clone https://github.com/Anas-github-acc/AchPay.git
cd AchPay
# Install dependencies
pnpm install
# Start local PostgreSQL (port 55432) and Redis (port 56379)
docker compose up -d
# Set up local environment
cp .env.example .envRun Services
Start the Fastify API (:3000), Next.js Dashboard (:3001), and Webhook Tunnel with a single command:
pnpm dev:allRun without ngrok tunnel:
pnpm dev:all --no-tunnel
Open http://localhost:3001 to explore the audit ledger, mandate headroom, and the live security attack matrix.
MCP Protocol
AchPay provides an MCP server implementing standard tools for Claude Desktop, Cursor, and custom agent runtimes. Tools communicate over stdio or authenticated HTTP SSE.
Registered Agent Tools
search_products— Search catalog items (SKU, title, price in integer paise, category). Excludes untrusted prose.get_product_details— Retrieve isolated product copy for a specific SKU.get_quote— Price a basket of{ sku, qty }items; returns a cryptographically signed, expiringquote_id.create_checkout— Submit a transaction usingquote_idandmandate_id. Returnscharged,pending_approval, ordenied.get_order_status— Inspect asynchronous payment settlement or human approval status.list_receipts— Read settled transaction history directly from the ledger.
Claude Desktop Integration
Add AchPay to your claude_desktop_config.json:
{
"mcpServers": {
"achpay": {
"command": "pnpm",
"args": ["--dir", "/path/to/AchPay", "mcp"]
}
}
}Or configure directly via CLI:
pnpm mcp:addSpending Policy
Spending boundaries are defined in policy.yaml. The policy engine executes purely over structured values with zero database or network dependencies:
# Transaction caps (in integer paise: 100 paise = 1 INR)
per_txn_max_paise: 50000 # ₹500 max per transaction
daily_max_paise: 500000 # ₹5,000 rolling 24-hour limit
velocity_max_per_hour: 5 # Max 5 checkouts per hour
# Human gate threshold
gate_above_paise: 30000 # > ₹300 requires human confirmation
# Denied categories
category_denylist:
- alcohol
- tobacco
# Choice bounding against prompt manipulation
max_qty_per_sku: 3
max_line_items: 10
gate_if_price_above_category_median_multiple: 2.0Verification & Testing
AchPay ships with automated verification routines and an adversarial attack grid simulating hostile merchant feeds and prompt injection vectors:
# Run unit and integration tests
pnpm test
# Run adversarial attack grid (writes data/adversarial-results.json)
pnpm test:adversarial
# Walk the cryptographic hash chain and verify ledger integrity
pnpm verify:ledger
# Reclaim expired headroom allocations
pnpm reclaimLicense
MIT © AchPay Contributors
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Pre-spend firewall for AI agents. Approves, blocks, flags transactions against policy rules.
Secure agent purchasing with human-approved virtual cards, receipts, and audit trails.
Agent-native security, trust, reliability, data and procurement tools for AI workflows.
Shop connected e-commerce stores: search, compare, cart, and checkout with buyer approval.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to discover products, build carts, and complete purchases across multiple downstream commerce services through a secure, contract-driven API.-

Allowance MCPofficial
FlicenseNot gradedqualityBmaintenanceEnables AI agents to request purchase approval from humans, receive scoped virtual cards, complete checkout, and report receipts for audit.-- FlicenseNot gradedqualityBmaintenanceEnables AI agents to browse product catalogs and make purchases through a policy engine that enforces spending limits, requires human approval for certain amounts, and logs all actions to an audit trail.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover, check stock, and purchase products through your existing store APIs, with spend mandates, discount ceilings, and a full audit trail enforced in code.43,227MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Anas-github-acc/AchPay'
If you have feedback or need assistance with the MCP directory API, please join our Discord server