Skip to content
XemGet started
Xem /MCP server

Email marketing, in conversation

Your assistant.
Your audience.
A little more connected.

The Xem MCP server brings newsletters, contacts, and campaign analytics into your AI workflow. Turn an idea into a draft, a CSV into an audience, and results into your next question.

Less switching. More doing.

Start with a simple ask.

Give the next newsletter a head start

Create a campaign or reusable newsletter draft using an audience, template, and sender from your workspace. Schedule a newsletter when you’re ready.

Create a draft of our weekly product newsletter using the community list.

Keep your audience close

Find contact lists, look up subscribers, create contacts, and unsubscribe people who no longer want your emails.

Find our community list and show me the first 20 active contacts.

Make that CSV useful

Map your column names to contact fields and preview the import before adding anyone. Existing addresses are skipped, including unsubscribed contacts.

Map Email Address to email and Given Name to firstName. Preview this import.

Ask what happened after send

Explore campaign opens, clicks, bounces, and unsubscribes. Review newsletter delivery counts by edition, then inspect an edition’s engagement.

Show clicks and unsubscribes for our latest campaign over the last 30 days.

Useful access.
Thoughtful defaults.

Access follows your workspace API key and its resource permissions. Grant the capabilities you need, from reading analytics to creating contacts.

Campaigns start as drafts. CSV imports preview first and validate the whole batch before a write. Suppressed contacts stay suppressed. Scheduling and sending are separate, explicit tools.

Contact data returned by the server is shared with your MCP client. Choose its approval and data settings to match your workflow.

A small setup.
A connected workspace.

Hosted · Recommended

Just bring your workspace.

Add the Xem HTTPS endpoint to your MCP client and connect with your workspace API key. No local server to install or maintain.

https://mcp.xem.email/mcp

  1. Create a Xem API key with the permissions you need.
  2. Add the endpoint as a Streamable HTTP server. Set the Authorization header using your client’s secret configuration.
  3. Connect and ask for your contact lists. Try a newsletter draft or CSV preview next.

Hosted access uses an API key, not an OAuth login. If your client cannot set custom headers, use the local option below.

Hosted MCP client configuration

{
  "mcpServers": {
    "xem": {
      "url": "https://mcp.xem.email/mcp",
      "headers": {
        "Authorization": "Bearer your-workspace-api-key"
      }
    }
  }
}

Local · npm + stdio

Prefer to run it yourself?

Use Node.js 20 or newer and let your MCP client launch the npm package. Your API key stays in the local server environment and requests go directly to the Xem API.

You can also install it with npm install -g @xem.email/mcp@2 and launch xem-email-mcp --stdio.

Local MCP client configuration

{
  "mcpServers": {
    "xem": {
      "command": "npx",
      "args": ["-y", "@xem.email/mcp@2", "--stdio"],
      "env": { "XEM_API_KEY": "your-workspace-api-key" }
    }
  }
}

Self-hosting Xem? Run the MCP service with Docker Compose and automatic HTTPS, or point the local package at your API with XEM_API_BASE_URL. Use matching 2.x MCP and Xem server releases. See the README for deployment, permissions, and migration instructions.

A few good questions.

What is the Xem MCP server?

It is an open-source Model Context Protocol server that connects an MCP-compatible AI client to the Xem email API. Connect over hosted HTTPS or run locally from npm over stdio. It exposes tools for newsletters, campaigns, contacts, CSV workflows, and analytics.

Which AI assistants can connect?

For hosted access, use an MCP client supporting Streamable HTTP and custom Authorization headers. Clients that only support OAuth can use the local npm server over stdio. Configuration formats vary; the examples use the common mcpServers format.

Does creating a newsletter send an email?

No. Newsletter and campaign creation produce drafts. Scheduling a newsletter is a separate operation that activates delivery at a future time. The individual email tool can also queue a send. Use your MCP client’s approval controls for these actions.

How does CSV mapping work?

Supply CSV text and map contact fields to your exact column headers. Each batch supports up to 500 rows and 1 MiB. Preview is the default; committing requires dryRun:false. Existing addresses are skipped without changing subscription status. You can also export contacts one page at a time as CSV.

What credentials does it need?

For hosted access, supply a Xem workspace API key in the Authorization header. For local stdio, configure it in the server environment. The API checks resource permissions and derives workspace access from that key. Credentials are not tool arguments. Returned contact data is visible to your AI client, so choose a client configuration suitable for that data.

Looking for email strategy alongside the tools? Explore the Xem journal.