ASG Card
OfficialASG Card 是一个以代理为先的虚拟卡平台。AI 代理可以通过程序化方式发行和管理万事达虚拟卡,并使用 Stellar x402 (USDC) 或 Stripe 机器支付协议 (银行卡) 进行支付。
快速入门 — 第一张卡
# One-step onboarding (creates wallet, configures MCP, installs skill)
npx @asgcard/cli onboard -y --client codex
# Fund your wallet with USDC on Stellar (address shown by onboard)
# Then:
npx @asgcard/cli card:create -a 10 -n "AI Agent" -e you@email.comSDK 使用
import { ASGCardClient } from "@asgcard/sdk";
const client = new ASGCardClient({
privateKey: "S...", // Stellar secret key
rpcUrl: "https://mainnet.sorobanrpc.com"
});
// Automatically handles: 402 → USDC payment → card creation
const card = await client.createCard({
amount: 10, // $10 card load
nameOnCard: "AI Agent",
email: "agent@example.com"
});
// card.detailsEnvelope = { cardNumber, cvv, expiryMonth, expiryYear }SDK 方法
方法 | 描述 |
| 使用 x402 支付发行虚拟卡 |
| 为现有卡片充值 |
| 列出该钱包的所有卡片 |
| 获取卡片交易历史 |
| 获取实时卡片余额 |
| 获取当前定价 |
| API 健康检查 |
MCP 服务器 (AI 代理集成)
@asgcard/mcp-server 为 Codex、Claude Code 和 Cursor 提供了 11 个工具:
工具 | 描述 |
| 首先使用 — 钱包地址、USDC 余额、就绪状态 |
| 创建虚拟卡 (x402 支付) |
| 为现有卡片充值 (x402 支付) |
| 列出钱包所有卡片 |
| 获取卡片摘要 |
| 获取 PAN、CVV、有效期 |
| 冻结卡片 |
| 解冻卡片 |
| 查看定价 |
| 卡片交易历史 (真实的 4payments 数据) |
| 来自 4payments 的实时卡片余额 |
MCP 设置
npx @asgcard/cli install --client codex # or claude, cursor架构
graph TB
subgraph Clients
SDK["@asgcard/sdk<br>(npm, TypeScript)"]
CLI["@asgcard/cli<br>onboard + card ops"]
MCP["@asgcard/mcp-server<br>11 tools"]
TG["Telegram Bot<br>@ASGCardbot"]
WEB["asgcard.dev"]
STRIPE_WEB["stripe.asgcard.dev"]
end
subgraph ASG Infrastructure
API["ASG Card API<br>api.asgcard.dev"]
FAC["x402 Facilitator"]
DB["PostgreSQL"]
end
subgraph Payment Rails
STELLAR["Stellar Pubnet<br>USDC"]
STRIPE["Stripe<br>MPP"]
end
subgraph External
ISSUER["Card Issuer<br>(MasterCard)"]
end
SDK -->|"x402 HTTP"| API
CLI -->|"x402 HTTP"| API
MCP -->|"x402 HTTP"| API
TG -->|"Webhook"| API
WEB -->|"Pricing"| API
STRIPE_WEB -->|"MPP"| API
API -->|"verify/settle"| FAC
API -->|"SQL"| DB
API -->|"REST"| ISSUER
FAC -->|"Soroban RPC"| STELLAR
API -->|"PaymentIntent"| STRIPE
SDK -->|"Sign TX"| STELLAR支付轨道
ASG Card 支持两种支付轨道。卡片产品本身是一样的,只是支付方式不同。
Stellar 版 (x402)
代理请求一张卡 → API 返回
402 Payment Required以及 USDC 金额代理通过 SDK 签署 Stellar USDC 转账
x402 协调器在链上验证并结算支付
API 通过发卡机构发行万事达卡
卡片详情在响应中立即返回
使用:SDK、CLI、MCP 服务器。无需人工干预。
Stripe 版 (MPP)
代理创建支付请求 → API 返回
approval_required+approvalUrl所有者在
stripe.asgcard.dev/approve打开审批页面所有者审核并批准 → 使用实时定价的 Stripe Elements 表单
所有者通过 Stripe 支付 → 银行卡/Apple Pay/Google Pay
卡片创建 → 代理轮询直到状态为
completed
使用:基于会话的身份验证 (X-STRIPE-SESSION)。需要人工干预审批。
工作区
目录 | 描述 |
| ASG Card API (Express + x402 + Stripe MPP) |
|
|
|
|
|
|
| 营销网站 (asgcard.dev) |
| Stripe 版网站 (stripe.asgcard.dev) |
| 内部文档和 ADR |
API 端点
公共
路由 | 方法 | 描述 |
| GET | 健康检查 |
| GET | 定价信息 |
| GET | 定价信息 |
| GET | x402 功能 |
Stellar x402 (需要支付)
路由 | 方法 | 描述 |
| POST | 创建虚拟卡 |
| POST | 为现有卡片充值 |
钱包身份验证
路由 | 方法 | 描述 |
| GET | 列出钱包的卡片 |
| GET | 卡片详情 |
| GET | 敏感数据 (需要 nonce) |
| GET | 卡片交易历史 |
| GET | 实时卡片余额 |
| POST | 冻结卡片 |
| POST | 解冻卡片 |
Stripe MPP (测试版)
路由 | 方法 | 描述 |
| POST | 创建托管会话 |
| POST | 创建支付请求 |
| GET | 轮询请求状态 |
| GET/POST | 审批页面数据 / 批准或拒绝 |
| POST | 完成支付 (MPP 凭证) |
| GET | 列出会话的卡片 |
| GET | 卡片详情 (需要 nonce) |
定价
简单、透明,无隐藏费用。
$10 固定开卡费 (无需初始充值)
3.5% 每次充值手续费
就是这样。充值金额从 $5 到 $5,000 不等。
不充值开卡 → $10。开卡并充值 $100 → $113.50。稍后充值 $200 → 只需 $207。 Stellar 和 Stripe 轨道定价相同。
Telegram 机器人 (@ASGCardbot)
将你的钱包连接到 Telegram 以进行卡片管理:
命令 | 描述 |
| 欢迎 / 关联账户 |
| 列出你的卡片 |
| 常见问题 |
| 支持 |
安全性
卡片详情使用 AES-256-GCM 加密存储
基于代理 nonce 的防重放保护 (每小时 5 次读取)
钱包签名身份验证 (Stellar 版)
带有测试版门控的基于会话的身份验证 (Stripe 版)
Stripe 会话密钥已从日志中脱敏
Telegram Webhook 密钥验证
操作端点受 API 密钥 + IP 白名单保护
贡献
欢迎贡献!请参阅 CONTRIBUTING.md 获取指南,并查看标记为 good first issue 的问题以开始。
本项目遵循我们的 行为准则。
许可证
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/ASGCompute/asgcard-public'
If you have feedback or need assistance with the MCP directory API, please join our Discord server