PRIV ProtocolPRIV Docs
MCP Server

Authentication

API key setup, rate limits, and spending caps for the PRIV MCP server

Authentication

The PRIV MCP server uses the same API key authentication as the REST API.

API Key Setup

  1. Sign up or log in at app.privlabs.io
  2. Navigate to Settings > API Keys
  3. Click Create New Key
  4. Copy your key (it won't be shown again)

Key Types

PrefixEnvironmentMCP Access
pk_live_ProductionFull access
pk_test_DevelopmentTestnet only

How Authentication Works

The MCP server passes your API key to the PRIV API on every tool call. Keys are validated using SHA-256 hash comparison — your key is never stored in plaintext.

Agent → MCP Server → API (X-API-Key header) → SHA-256 validation → Response

Rate Limits

TierRequests/minRequests/dayPrice
Free6010,000$0
Builder300100,000$49/mo
Enterprise2,000UnlimitedCustom

Rate limit headers are included in tool responses when approaching limits.

Rate limits apply per API key. If you need higher limits, upgrade your plan at app.privlabs.io/dashboard/billing.

Spending Caps (Phase 2+)

When transaction tools become available, you can set spending caps per API key:

SettingDescriptionDefault
max_per_transactionMaximum PRIV per single purchase1,000 PRIV
daily_limitMaximum PRIV spent per day10,000 PRIV
require_confirmationRequire dry-run before executionEnabled

All financial operations default to dry-run mode — the tool returns a preview of what would happen without executing. The agent must explicitly confirm to proceed.

Security Best Practices

  • Store API keys in environment variables, not in code
  • Use pk_test_ keys for development and testing
  • Set spending caps before enabling transaction tools
  • Monitor usage in the dashboard
  • Rotate keys periodically