Kraiter
MCP Server

MCP Server

Connect Claude and other AI assistants to the Kraiter API using the Model Context Protocol server.

The @kraiter/mcp-server package lets AI assistants like Claude interact with your Kraiter account directly — creating contacts, sending emails, managing sequences, and more — via the Model Context Protocol (MCP).

The server is a thin layer over the @kraiter/sdk: it translates MCP tool calls into SDK method calls and returns the results as structured text.

npm version

Installation

npm install -g @kraiter/mcp-server

Or install locally in a project:

npm install @kraiter/mcp-server

Configuration

The MCP server requires a KRAITER_API_KEY environment variable. Generate one from Settings in the dashboard.

Claude Desktop

Add the following to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "kraiter": {
      "command": "npx",
      "args": ["-y", "@kraiter/mcp-server"],
      "env": {
        "KRAITER_API_KEY": "your-api-key-here"
      }
    }
  }
}

Claude Code

Add the server with your API key in a single command. Use -s user to make it available across all projects, or omit it for the current project only:

claude mcp add kraiter -s user -e KRAITER_API_KEY=your-api-key-here -- npx -y @kraiter/mcp-server

The -e flag scopes the API key to the Kraiter server process rather than making it available to other MCP servers managed by Claude Code.

Alternatively, add the server config to your project's .mcp.json:

{
  "mcpServers": {
    "kraiter": {
      "command": "npx",
      "args": ["-y", "@kraiter/mcp-server"],
      "env": {
        "KRAITER_API_KEY": "your-api-key-here"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "kraiter": {
      "command": "npx",
      "args": ["-y", "@kraiter/mcp-server"],
      "env": {
        "KRAITER_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cursor

Add the server in Cursor Settings > MCP or in your .cursor/mcp.json:

{
  "mcpServers": {
    "kraiter": {
      "command": "npx",
      "args": ["-y", "@kraiter/mcp-server"],
      "env": {
        "KRAITER_API_KEY": "your-api-key-here"
      }
    }
  }
}

Running manually

You can also run the server directly:

KRAITER_API_KEY=your-api-key-here npx @kraiter/mcp-server

Or if installed globally:

KRAITER_API_KEY=your-api-key-here kraiter-mcp-server

Available tools

The MCP server exposes 83 tools across 13 resource categories:

ResourceToolsDescription
Contacts13Create, read, update, delete, upsert contacts; list sends, scheduled sends, sequences, segments, timeline, and stats
Events3Track events and list event history
Templates8Upsert email templates, preview renders, and manage versions
Sequences11Upsert drip campaigns, manage contact enrolment, versions, sends, and dry runs
Campaigns9Organise sequences and templates into campaigns
Segments7Define, manage, and recompute audience segments
Domains6Register, update, and verify sending domains
Send4Send transactional emails and view send history
Metrics5Tenant, sequence, and template metrics
Scheduled Sends2List and inspect scheduled sends
Identities6Manage SES email identities and DKIM signing
Tenant6Tenant details, sandbox whitelist, and SES account status
Billing3Billing info and Stripe checkout/portal sessions

See the full tool reference for details on every tool.

Error handling

When an API call fails, the MCP server returns an error response with a descriptive message. The error includes:

  • HTTP status code and message for API errors
  • Error code (e.g. VALIDATION_ERROR, NOT_FOUND) when available
  • Details for validation failures (e.g. which field failed)
  • Timeout indication for network timeouts

Errors are returned to the AI assistant as tool errors (isError: true) so it can reason about what went wrong and retry or adjust its approach.

Example conversation

Once configured, you can ask Claude things like:

  • "Create a contact for alice@example.com with firstName Alice"
  • "Show me all contacts"
  • "Send a welcome email to alice@example.com using the welcome-template"
  • "Check if bob@example.com is in the premium-users segment"
  • "List all active campaigns"
  • "What sequences is contact con_abc123 enrolled in?"