link-cli
Let your agents spend on your behalf. Your payment credentials are never exposed. You approve every purchase.
Features
- ✓Secure one-time use payment credentials
- ✓Supports virtual cards, Link Pay Tokens, and Shared Payment Tokens
- ✓Integrates with Stripe and Machine Payment Protocols
- ✓Local MCP server for custom integrations
- ✓Detailed documentation and SDKs available
- ✓Visit GitHub for more tools and instructions
Installation Guide
npm i -g @stripe/link-cliOr run directly with npx:
npx @stripe/link-cliUse with agents
Install the skills:
npx skills add stripe/link-cliBy default when called from an agent (non-TTY), all commands use toon output — a compact, LLM-friendly text format. All commands accept --format [format] for structured output. Other formats: json, yaml, md, jsonl.
List available commands:
link-cli --llms-fullGet a command's full schema with --schema. Example:
link-cli spend-request create --schema#### MCP Server
Link CLI can run as a local MCP server. Add the following to your MCP client config (.mcp.json, etc.)
{
"mcpServers": {
"link": {
"command": "npx",
"args": ["@stripe/link-cli", "--mcp"]
}
}
}Alternatively, use serve to expose link-cli as an MCP endpoint over HTTP.
link-cli serve # binds 127.0.0.1:54321 (loopback only)
link-cli serve --port 8080
link-cli serve --host 0.0.0.0 # expose beyond localhost (see warning below)The server handles POST /mcp and GET skill discovery at /.well-known/skills/index.json and /.well-known/skills/{skill-name}/SKILL.md, with OPTIONS preflight support. Other paths return 404, unsupported methods return 405, and malformed or ambiguous request paths return 400. It binds to 127.0.0.1 by default so only the local host can reach it. Anyone who can reach the port can use this CLI's authenticated Link session, so only override --host on a trusted, isolated network — doing so prints a warning.