Package Exports
- @privacy-com/privacy-mcp
Readme
@privacy-com/privacy-mcp
MCP server for the Privacy.com API. Manage virtual cards, transactions, and spend controls through any MCP-compatible AI client.
Quick Start
PRIVACY_API_KEY=your-api-key npx @privacy-com/privacy-mcpRequires Node.js >= 20 and a Privacy.com API key.
Available Tools
| Tool | Description |
|---|---|
list_cards |
List virtual cards with pagination |
create_card |
Create a virtual card with type, spend controls, and memo |
get_card |
Get card details by token |
pause_card |
Pause a card to temporarily block transactions |
unpause_card |
Unpause a previously paused card |
close_card |
Permanently close a card (irreversible) |
update_card_memo |
Update a card's memo (friendly name) |
update_card_spend_limit |
Update a card's spend limit and reset duration |
get_pan |
Get full card number (PAN), CVV, and expiry |
list_transactions |
List transactions with filtering by card, date range, and result |
Spend limits are specified in dollars (e.g. 25.00), not cents.
Configuration
Claude Desktop (stdio)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"privacy": {
"command": "npx",
"args": ["@privacy-com/privacy-mcp"],
"env": {
"PRIVACY_API_KEY": "your-api-key"
}
}
}
}Cursor (stdio)
Add to your Cursor MCP settings:
{
"mcpServers": {
"privacy": {
"command": "npx",
"args": ["@privacy-com/privacy-mcp"],
"env": {
"PRIVACY_API_KEY": "your-api-key"
}
}
}
}Claude Code
Add to your Claude Code project settings (.mcp.json):
{
"mcpServers": {
"privacy-mcp": {
"command": "npx",
"args": ["@privacy-com/privacy-mcp"],
"env": {
"PRIVACY_API_KEY": "your-api-key"
}
}
}
}Remote (Streamable HTTP)
The server also supports Streamable HTTP transport for hosted deployments. Send JSON-RPC requests to the /mcp endpoint with your Privacy API key as a Bearer token:
POST https://your-deployment-url/mcp
Authorization: Bearer your-api-key
Content-Type: application/jsonEnvironment Variables
| Variable | Required | Description |
|---|---|---|
PRIVACY_API_KEY |
Yes | Privacy.com API key |
MAX_CARD_SPEND_LIMIT |
No | Maximum spend limit for card creation/updates in cents (0 = no limit) |
MAX_TRANSACTION_AMOUNT |
No | Maximum single transaction amount in cents (0 = no limit) |
PORT |
No | HTTP server port for remote transport (default: 3000) |
Development
From the repository root:
npm install
npm run build --workspace=packages/api # build API dependency first
npm run build --workspace=packages/mcp # build MCP server
npm test --workspace=packages/mcp # run tests
npm run lint --workspace=packages/mcp # lint + type checkTests use Vitest with MSW for API mocking. No real API key is needed to run tests.