ASG Card
Virtual MasterCards for AI agents. Issue and manage cards via MCP.
README
<p align="center"> <a href="https://npmjs.com/package/@asgcard/sdk"><img src="https://img.shields.io/npm/v/@asgcard/sdk?label=sdk" alt="npm"></a> <a href="https://npmjs.com/package/@asgcard/cli"><img src="https://img.shields.io/npm/v/@asgcard/cli?label=cli" alt="cli"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License"></a> <a href="https://api.asgcard.dev/health"><img src="https://img.shields.io/badge/API-live-brightgreen" alt="API Status"></a> <a href="https://asgcard.dev/docs"><img src="https://img.shields.io/badge/Docs-asgcard.dev-blue" alt="Docs"></a> </p>
<p align="center"> <a href="#quick-start">Quick Start</a> · <a href="https://asgcard.dev/docs">Docs</a> · <a href="https://asgcard.dev">Website</a> · <a href="https://x.com/asgcardx402">Twitter</a> · <a href="SECURITY.md">Security</a> </p>
Public mirror — this repo is a read-only mirror of the internal monorepo. For issues and feature requests use GitHub Issues. For code contributions see CONTRIBUTING.md.
Agent Card
Agent Card is an agent-first virtual card platform. AI agents programmatically issue and manage MasterCard virtual cards, paying in USDC via the x402 protocol on Stellar.
<div align="center"> <table> <tr> <td align="center"><strong>Works<br/>with</strong></td> <td align="center"><a href="https://openai.com/index/codex/"><img src=".github/assets/logos/codex.svg" width="32" alt="Codex" /></a><br/><sub>Codex</sub></td> <td align="center"><a href="https://claude.ai/code"><img src=".github/assets/logos/claude.svg" width="32" alt="Claude Code" /></a><br/><sub>Claude Code</sub></td> <td align="center"><a href="https://cursor.com"><img src=".github/assets/logos/cursor.svg" width="32" alt="Cursor" /></a><br/><sub>Cursor</sub></td> <td align="center"><a href="https://openclaw.ai"><img src=".github/assets/logos/openclaw.svg" width="32" alt="OpenClaw" /></a><br/><sub>OpenClaw</sub></td> <td align="center"><a href="https://modelcontextprotocol.io"><img src=".github/assets/logos/mcp.svg" width="32" alt="Any MCP Client" /></a><br/><sub>Any MCP</sub></td> </tr> </table>
<table> <tr> <td align="center"><strong>Built<br/>with</strong></td> <td align="center"><a href="https://stellar.org"><img src=".github/assets/logos/stellar.svg" width="32" alt="Stellar" /></a><br/><sub>Stellar</sub></td> <td align="center"><a href="https://www.circle.com/usdc"><img src=".github/assets/logos/circle.svg" width="32" alt="Circle USDC" /></a><br/><sub>Circle USDC</sub></td> <td align="center"><a href="https://www.mastercard.com"><img src=".github/assets/logos/mastercard.svg" width="32" alt="MasterCard" /></a><br/><sub>MasterCard</sub></td> </tr> </table>
<em>If it speaks MCP, it can spend.</em>
</div>
🎬 Demo
<p align="center"> <img src=".github/assets/demo.gif" alt="Agent Card CLI Demo" width="600"> </p>
Agent Card is right for you if
- ✅ Your AI agent needs to pay for things — hosting, domains, APIs, SaaS
- ✅ You want a virtual MasterCard issued programmatically
- ✅ You want your agent to manage cards autonomously via MCP
- ✅ You want to pay in USDC without touching fiat banking
- ✅ You need transparent, on-chain proof of every payment
Quick Start
For Codex
npx @asgcard/cli onboard -y --client codex
For Claude Code
npx @asgcard/cli onboard -y --client claude
For Cursor
npx @asgcard/cli onboard -y --client cursor
Using the SDK directly
npm install @asgcard/sdk
Via ClawHub
npx clawhub@latest install agentcard
The onboarding flow creates a Stellar wallet (~/.asgcard/wallet.json), configures MCP, installs the agent skill, and prints the next step.
Note: If you already have a wallet, run
npx @asgcard/cli doctorto verify your setup.
How It Works
- Agent requests a card → API returns
402 Payment Requiredwith USDC amount - Agent signs a Stellar USDC transfer via the SDK
- x402 Facilitator verifies and settles the payment on-chain
- API issues a real MasterCard via the card issuer
- Card details returned in the response
Live pricing: GET https://api.asgcard.dev/pricing · Full docs: asgcard.dev/docs
MCP Server (11 tools)
@asgcard/mcp-server exposes 11 tools via the Model Context Protocol. The MCP server reads your Stellar key from ~/.asgcard/wallet.json — no env vars needed in client configs.
| Tool | What it does |
|---|---|
get_wallet_status |
Wallet address, USDC balance, readiness |
create_card |
Create virtual MasterCard (x402 payment) |
fund_card |
Top up existing card |
list_cards |
List all wallet cards |
get_card |
Card summary |
get_card_details |
PAN, CVV, expiry (nonce-protected) |
freeze_card / unfreeze_card |
Freeze or re-enable a card |
get_pricing |
Current tier pricing |
get_transactions |
Card transaction history (real issuer data) |
get_balance |
Live card balance from card issuer |
SDK
import { ASGCardClient } from "@asgcard/sdk";
const client = new ASGCardClient({
privateKey: "S...", // Stellar secret key
rpcUrl: "https://mainnet.sorobanrpc.com"
});
const card = await client.createCard({
amount: 10,
nameOnCard: "AI Agent",
email: "agent@example.com"
});
// List cards, check balance, view transactions
const { cards } = await client.listCards();
const balance = await client.getBalance(cards[0].cardId);
const txns = await client.getTransactions(cards[0].cardId);
See /sdk for full API reference.
CLI Commands
npx @asgcard/cli transactions <cardId> # View card transaction history
npx @asgcard/cli balance <cardId> # Get live card balance
npx @asgcard/cli history # All cards with live balances
npx @asgcard/cli cards # List all your cards
npx @asgcard/cli pricing # View pricing tiers
Repository Structure
This is a monorepo. Most users should use npx @asgcard/cli or npm install @asgcard/sdk — cloning is only needed for contributing.
| Directory | Package |
|---|---|
/api |
ASG Card API (Express + x402 + wallet auth) |
/sdk |
@asgcard/sdk — TypeScript client |
/cli |
@asgcard/cli — CLI + onboarding |
/mcp-server |
@asgcard/mcp-server — MCP server (11 tools) |
/web |
Marketing website (asgcard.dev) |
/docs |
Documentation and ADRs |
Security
- 🔒 AES-256-GCM encryption at rest for card details
- 🔑 Stellar private key never leaves your machine (
~/.asgcard/wallet.json) - 🛡️ Nonce-based anti-replay protection
- ✅ Wallet signature authentication — no API keys
- 📋 Security Policy · Technical Overview
Community
- GitHub Issues — bugs and feature requests
- asgcard.dev — docs and website
- Twitter/X — updates
License
MIT © 2025 ASG Compute
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.