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

claude mcp add kraiter -- npx -y @kraiter/mcp-server

Then set the environment variable in your project's .claude/settings.json:

{
  "env": {
    "KRAITER_API_KEY": "your-api-key-here"
  }
}

Or add the full server config manually:

{
  "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 62 tools across 10 resource categories:

ResourceToolsDescription
Contacts12Create, read, update, delete, upsert contacts; list sends, sequences, segments, and timeline
Events3Track events and list event history
Templates7Upsert email templates, preview renders, and manage versions
Sequences10Upsert drip campaigns, manage contact enrolment, versions, and dry runs
Campaigns9Organise sequences and templates into campaigns
Segments5Define and manage audience segments
Domains5Register and verify sending domains
Send4Send transactional emails and view send history
Scheduled Sends2List and inspect scheduled sends
Metrics5Tenant, sequence, and template metrics

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?"