Let an AI agent buy gift cards with USDC over x402, within limits the wallet owner sets.
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add spendthebits-gift-cards --env STB_AGENT_PRIVATE_KEY='<STB_AGENT_PRIVATE_KEY>' -- npx -y @spendthebits/mcp-giftcards~/.codex/config.toml
[mcp_servers.spendthebits-gift-cards]
command = "npx"
args = ["-y", "@spendthebits/mcp-giftcards"]
env = { STB_AGENT_PRIVATE_KEY = "<STB_AGENT_PRIVATE_KEY>" }
# codex mcp add spendthebits-gift-cards --env STB_AGENT_PRIVATE_KEY='<STB_AGENT_PRIVATE_KEY>' -- npx -y @spendthebits/mcp-giftcards~/.cursor/mcp.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"command": "npx",
"args": [
"-y",
"@spendthebits/mcp-giftcards"
],
"env": {
"STB_AGENT_PRIVATE_KEY": "<STB_AGENT_PRIVATE_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"spendthebits-gift-cards": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@spendthebits/mcp-giftcards"
],
"env": {
"STB_AGENT_PRIVATE_KEY": "<STB_AGENT_PRIVATE_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"command": "npx",
"args": [
"-y",
"@spendthebits/mcp-giftcards"
],
"env": {
"STB_AGENT_PRIVATE_KEY": "<STB_AGENT_PRIVATE_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"command": "npx",
"args": [
"-y",
"@spendthebits/mcp-giftcards"
],
"env": {
"STB_AGENT_PRIVATE_KEY": "<STB_AGENT_PRIVATE_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"command": "npx",
"args": [
"-y",
"@spendthebits/mcp-giftcards"
],
"env": {
"STB_AGENT_PRIVATE_KEY": "<STB_AGENT_PRIVATE_KEY>"
}
}
}
}Remote
claude mcp add --transport http spendthebits-gift-cards https://x402.spendthebits.com/mcp~/.codex/config.toml
[mcp_servers.spendthebits-gift-cards]
url = "https://x402.spendthebits.com/mcp"
# codex mcp add spendthebits-gift-cards --url https://x402.spendthebits.com/mcp~/.cursor/mcp.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"url": "https://x402.spendthebits.com/mcp"
}
}
}.vscode/mcp.json
{
"servers": {
"spendthebits-gift-cards": {
"type": "http",
"url": "https://x402.spendthebits.com/mcp"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"httpUrl": "https://x402.spendthebits.com/mcp"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"spendthebits-gift-cards": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://x402.spendthebits.com/mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"spendthebits-gift-cards": {
"url": "https://x402.spendthebits.com/mcp"
}
}
}Environment variables
STB_AGENT_PRIVATE_KEY
Replace the placeholders with your own credentials and keep them out of version control.