For the complete documentation index, see llms-docs.txt or the site index llms.txt. Full docs corpus: llms-full-docs.txt. Prefer the markdown version of this page at /docs/integrations/ai-tools/mcp-server.md. Product capabilities: skill.md. Docs MCP: /docs/mcp. Site MCP: https://reloop.sh/mcp.

MCP Server

Connect Claude, Cursor, VS Code, Codex, and other MCP clients to Reloop with the hosted MCP server and sign in with your Reloop account.

The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools. The Reloop MCP server connects your assistant to your Reloop organization, so you can send email, manage contacts, check deliverability, and more by describing what you want in plain language.

Reloop runs a hosted MCP server for you. Add one URL to your client, sign in with your Reloop account, and you're done. There's no API key to copy and nothing to install.

SettingValue
Server URLhttps://reloop.sh/mcp
TransportStreamable HTTP
AuthenticationSign in with Reloop (OAuth)

What you can do

The MCP server is built to do everything you can do in the Reloop dashboard:

  • Emails: Send transactional email with HTML or plain text, CC/BCC, reply-to, tags, templates, and scheduled delivery. Check what you sent and its delivery status.
  • Contacts: Look up, create, update, unsubscribe, and delete contacts. Manage custom properties, groups, and channel subscriptions.
  • Campaigns: Draft, schedule, and send campaigns to your audience.
  • Templates: Create and edit email templates and reuse them when sending.
  • Automation: Build flows such as a welcome series that runs when someone signs up.
  • Inbox: Read inbound email and attachments on your receiving domains.
  • Metrics & logs: Inspect email logs, bounces, and engagement, and ask why a number changed.
  • Domains: Add sending domains, check DNS records, and verify them.
  • Webhooks & API keys: Create and manage webhooks for email events, and manage API keys.

See example prompts for ideas.

Quick setup

Pick your client for full steps, including how to verify the connection and fix common problems.

The short version for each:

claude mcp add --transport http reloop https://reloop.sh/mcp

Then run /mcp in Claude Code, pick reloop, and choose Authenticate.

How sign-in works

The hosted server is an OAuth protected resource. You don't need an API key.

  1. Your client connects to https://reloop.sh/mcp and gets a 401 with a WWW-Authenticate challenge.
  2. It reads https://reloop.sh/.well-known/oauth-protected-resource/mcp to find Reloop's authorization server, and registers itself automatically.
  3. Your browser opens the Reloop sign-in page. You sign in, pick the organization the client can access, and approve.
  4. The client sends the access token as Authorization: Bearer <token> on every request.

Tokens are short-lived, scoped to the MCP server, and tied to the organization you approved. Reloop checks every call against your permissions, so the assistant can only do what your account can do.

Choosing an organization

If you belong to several organizations, you pick one on the consent screen. To switch, sign in again from your client and pick a different one. Clients that support custom headers can also send an x-organization-id header to select an organization per request.

Local server (stdio)

Use the local server when your client can't connect to a remote URL, or when you prefer an API key over signing in. Your client starts reloop-mcp as a child process and talks to it over stdin/stdout.

You'll need Node.js 20 or later (for npx) and a Reloop API key. Replace rl_prod_your_api_key with your key.

claude mcp add reloop --env RELOOP_API_KEY=rl_prod_your_api_key -- npx -y reloop-mcp

For any other stdio client, run npx -y reloop-mcp (or bunx reloop-mcp) with RELOOP_API_KEY in the environment.

Self-hosted Reloop

If you run your own Reloop instance, set RELOOP_BASE_URL to its origin. Nothing is tied to reloop.sh beyond the default.

For the hosted-style setup, your instance serves the MCP endpoint at https://<your-domain>/mcp and every remote setup above works with that URL in place of https://reloop.sh/mcp.

For the local server, add RELOOP_BASE_URL next to your key:

{
  "mcpServers": {
    "reloop": {
      "command": "npx",
      "args": ["-y", "reloop-mcp"],
      "env": {
        "RELOOP_API_KEY": "rl_prod_your_api_key",
        "RELOOP_BASE_URL": "https://mail.example.com"
      }
    }
  }
}

Run the HTTP server yourself

You can run the Streamable HTTP server on your own infrastructure. It's stateless: there are no sessions, so you can run several instances behind any load balancer.

bunx reloop-mcp --transport http --host 0.0.0.0 --port 3000

The standalone HTTP server needs Bun. On Node.js, use the Docker image instead:

docker build -t reloop/mcp .
docker run --rm -p 3000:3000 -e RELOOP_BASE_URL=https://mail.example.com reloop/mcp

Clients connect to http://<host>:3000/mcp and authenticate on every request with one of:

  • An OAuth access token: Authorization: Bearer <token> (recommended; clients get this by signing in)
  • A Reloop API key: Authorization: Bearer rl_prod_... or x-api-key: rl_prod_...

RELOOP_API_KEY is not used by the HTTP transport. For example, to connect Claude Code with an API key:

claude mcp add --transport http reloop http://127.0.0.1:3000/mcp \
  --header "Authorization: Bearer rl_prod_your_api_key"

Check that the server is up:

curl -s http://127.0.0.1:3000/mcp/healthz
{ "status": "ok", "name": "reloop", "version": "0.1.0" }

GET /healthz returns the same response.

Options

CLI flags

FlagDefaultDescription
--transport <stdio|http>stdioTransport to serve
--host <hostname>127.0.0.1HTTP bind hostname
--port <number>3000HTTP bind port
--base-url <url>https://reloop.shOrigin of the Reloop instance
--versionPrint the version and exit
--helpPrint help and exit

Environment variables

VariableDefaultDescription
RELOOP_API_KEYReloop API key. Required for stdio, ignored by HTTP
RELOOP_BASE_URLhttps://reloop.shOrigin of the Reloop instance
RELOOP_MCP_RESOURCE<base>/mcpCanonical MCP resource identifier. Must match the auth server's MCP_RESOURCE
RELOOP_AUTH_ISSUER<base>/api/auth/v1OAuth issuer advertised in the protected resource metadata
RELOOP_TIMEOUT_MS30000Per-request timeout to Reloop, from 1000 to 600000
HOST127.0.0.1HTTP bind hostname
PORT3000HTTP bind port
MCP_ALLOWED_HOSTS*Comma-separated Host header allowlist. * or unset accepts any host
MCP_ALLOWED_ORIGINSloopback originsComma-separated Origin header allowlist
LOG_LEVELinfodebug, info, warn, error, or silent
OTEL_EXPORTER_OTLP_ENDPOINTunsetOTLP/HTTP endpoint (for example SigNoz). When set, every log line is also exported there
OTEL_EXPORTER_OTLP_HEADERSunsetHeaders for the OTLP endpoint as key=value,key2=value2, for example signoz-ingestion-key=<key>

Even with MCP_ALLOWED_HOSTS unset, every request still needs an OAuth token or API key. Set it to restrict which hostnames the server answers on.

Security

  • Credentials are per request. The server forwards the caller's token or key to Reloop and never stores, caches, or shares it.
  • API keys and tokens are redacted from logs, and email content is never logged.
  • Host and Origin headers are validated to block DNS-rebinding attacks from a browser.
  • RELOOP_BASE_URL is server configuration, never a tool parameter, so a model can't redirect traffic to another host.
  • Tools that send email or delete data are marked destructive, so clients can ask you to confirm before they run.

Local development

The server's source is at github.com/reloop-labs/reloop-mcp.

git clone https://github.com/reloop-labs/reloop-mcp.git
cd reloop-mcp
bun install
bun run dev:stdio   # stdio transport
bun run dev:http    # HTTP transport on http://127.0.0.1:3000/mcp, reloads on change
bun run build       # builds dist/cli.js

To point a stdio client at your local build, replace npx -y reloop-mcp with node:

{
  "mcpServers": {
    "reloop": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_PROJECT/dist/cli.js"],
      "env": {
        "RELOOP_API_KEY": "rl_prod_your_api_key"
      }
    }
  }
}

Before opening a pull request, run bun run lint, bun run typecheck, and bun test.

Test with MCP Inspector

MCP Inspector is a browser UI for calling MCP tools by hand.

Stdio

From the reloop-mcp folder:

npx @modelcontextprotocol/inspector -e RELOOP_API_KEY=rl_prod_your_api_key bun src/cli.ts

Inspector opens in your browser with the server already configured. Click Connect, then List Tools.

HTTP

  1. Start the server:

    bun run dev:http
  2. Start Inspector:

    npx @modelcontextprotocol/inspector
  3. In the browser, choose Streamable HTTP and set the URL to http://127.0.0.1:3000/mcp.

  4. Add a header Authorization: Bearer rl_prod_your_api_key and turn it on.

  5. Click Connect, then List Tools.

To test against the hosted server, use https://reloop.sh/mcp without a header. Inspector walks you through the OAuth sign-in.

Troubleshooting

Was this page helpful?

Edit this page