EmailGuard
  • Pricing
Log inRegister
DocumentationAPI ReferenceKnowledge Base

API reference

Download spec

API reference

Guides and endpoint docs

  • SDK clients
  • TypeScript SDK
  • Go SDK
  • Python SDK
  • PHP SDK
  • Ruby SDK
  • MCP client
  • getGet team
  • patchUpdate team
  • getList team members
  • deleteRemove a team member
  • patchUpdate a team member role
  • deleteCancel a pending invite
  • postInvite a team member
  • getList pending team invites
  • getGet billing usage
  • postCreate notification channel
  • deleteDelete notification channel
  • getList notification channels
  • postTest notification channel
  • putUpdate notification channel
  • getList notification events
  • postCreate notification rule
  • deleteDelete notification rule
  • getList notification rules
  • putUpdate notification rule
  • getDetect email characteristics

MCP client

Connect Cursor, Claude Desktop, or other MCP clients via the published MCP npm package.

Loading article…

On this page

  • Prerequisites
  • Package and runtime
    • Environment variables
  • Cursor
  • Claude Desktop
  • Tools
  • Troubleshooting
Ruby SDKGet team

The MCP server exposes /api/v1 as Model Context Protocol tools. Your MCP client spawns it as a subprocess; the server speaks MCP over stdio and forwards each tool call as an authenticated HTTP request.

Authentication, scopes, and billing quota are identical to calling the REST API directly.

Prerequisites

  1. Create a team-scoped API key with the scopes your assistant needs — for example account:read, members:read, notifications:read, and tools:read / tools:write when your deployment exposes /api/v1/tools/*.

Package and runtime

npm packageemailguard-mcp (version 1.0.0)
Transportstdio (spawned by the MCP client)
API base URLBaked into the package; override with API_BASE_URL at runtime

Reference the package from your client config with npx:

npx -y emailguard-mcp

Environment variables

VariableRequiredDescription
API_KEY_APIKEYAUTHYesFull Authorization header value, e.g. Bearer gsk_live_...
API_BASE_URLNoOverride the spec default (useful for staging vs production)
LOG_LEVELNoServer log level (info, debug, …)

Cursor

Add to .cursor/mcp.json (or Cursor Settings → MCP):

{
  "mcpServers": {
    "emailguard": {
      "command": "npx",
      "args": ["-y", "emailguard-mcp"],
      "env": {
        "API_BASE_URL": "https://api.emailguard.co",
        "API_KEY_APIKEYAUTH": "Bearer gsk_live_YOUR_KEY"
      }
    }
  }
}

Restart Cursor after saving.

Claude Desktop

Add a server entry to claude_desktop_config.json:

{
  "mcpServers": {
    "emailguard": {
      "command": "npx",
      "args": ["-y", "emailguard-mcp"],
      "env": {
        "API_BASE_URL": "https://api.emailguard.co",
        "API_KEY_APIKEYAUTH": "Bearer gsk_live_YOUR_KEY"
      }
    }
  }
}

Tools

Each tool maps to one public /api/v1 route — team management (/api/v1/team/...) and, when registered, custom tool routes (/api/v1/tools/...). Tool names follow the OpenAPI operation (for example get_team, list_team_members). Path and body fields match the API reference schemas.

See the API reference sidebar for request shapes and response schemas.

Every tool call is subject to your API key scopes and counts toward the same monthly request quota as a direct REST call.

Troubleshooting

  • 401 Unauthorized — API_KEY_APIKEYAUTH is missing or invalid; use the full Bearer … value.
  • 403 Forbidden — the key lacks the scope for that route.
  • 404 Not Found — confirm path parameters and that the route exists in the API reference.

For HTTP examples, see SDK clients.