MCP IntegrationModel Context Protocol

MCP Server for AI Agents

Enable autonomous AI coding and browsing agents like Claude Code, Cursor, Antigravity, and OpenClaw to resolve Email/SMS 2FA challenges, extract magic links, and query KMS-vaulted TOTP tokens via our official dual-transport Model Context Protocol server (@sentryrelay/mcp).

6 Canonical MCP Tools

wait_for_verification_code
Params: identity (required), channel?, sender?, subject?, timeoutSeconds? (1..45), sinceMs?

Long-polls an Identity inbox until a fresh Email/SMS OTP code or unwrapped magic link arrives and returns structured JSON ready for browser input.

get_latest_verification_code
Params: identity (required), channel?, sender?, lookbackSeconds? (1..300), consume?

Performs an instant non-blocking lookback check on an Identity timeline for a recently delivered OTP or magic link.

get_totp_code
Params: identity (required), secretId (required), autoWaitFreshWindow? (default: true)

Generates a live RFC 6238 Authenticator (TOTP) code for a vaulted service secret, automatically waiting if the window is expiring (<4s remaining).

list_identities
Params: search?, limit? (1..100)

Lists accessible Identities along with their assigned @in.sentryrelay.com email address, dedicated US SMS DID, and TOTP secret count.

create_identity
Params: name (required), emailHandle?, fallbackEmail?

Provisions a new isolated Identity inbox for an autonomous workflow with optional Human-Fallback email routing.

store_totp_secret
Params: identity (required), secretId (required), otpauthUriOrSecret (required), issuer?

Vaults an otpauth:// URI or raw Base32 TOTP secret under an Identity using Cloud KMS AES-256-GCM envelope encryption.

Client Configuration

1. Claude Code

Run a single terminal command or add the configuration to your project's .mcp.json / ~/.claude.json:

claude mcp add sentry-relay -e SENTRY_RELAY_API_KEY=sr_live_... -- npx -y @sentryrelay/mcp

2. Cursor IDE

Create .cursor/mcp.json in your repository or add via Cursor Settings → MCP:

json
{
  "mcpServers": {
    "sentry-relay": {
      "command": "npx",
      "args": ["-y", "@sentryrelay/mcp"],
      "env": {
        "SENTRY_RELAY_API_KEY": "sr_live_your_actual_api_key_here"
      }
    }
  }
}

3. Streamable HTTP Endpoint (Zero-Subprocess Cloud Agents)

For autonomous agents running in cloud sandboxes, Docker containers, or serverless environments that connect directly over HTTP JSON-RPC (discoverable at /.well-known/mcp.json):

json
{
  "mcpServers": {
    "sentry-relay-http": {
      "url": "https://sentryrelay.com/api/mcp",
      "headers": {
        "Authorization": "Bearer sr_live_your_api_key"
      }
    }
  }
}
Why Ephemeral OTPs via MCP Are Safe (vs. Static Master Passwords): Unlike static password managers that restrict MCP usage to keep master passwords out of LLM context windows, Sentry Relay MCP tools only return ephemeral, single-use 6-digit OTP codes and unwrapped verification links. Raw Base32 TOTP seeds remain envelope-encrypted inside Google Cloud KMS (AES-256-GCM) and are never exposed to the model, while raw email/SMS bodies are never returned.