Mails.ai for Continue

Built in

Email tools inside Continue

In Agent mode, Continue calls the mails tools when a task needs email and shows each call and its result in the chat.

Continue · Agent mode
  1. List the open threads for the hello agent

  2. tool mails_list_threadsagent_id: "hello"status: "open"
  3. { "data": [{ "id": "thrd_01K…", "subject": "Refund for order 4471", … }], "has_more": false }

  4. The hello agent has one open thread: “Refund for order 4471”.

Setup

Add mails to Continue

Save the snippet as .continue/mcpServers/mails.json, or add the YAML entry to config.yaml; Continue reloads it on save.

{
  "mcpServers": {
    "mails": {
      "command": "npx",
      "args": ["-y", "@mailsai/mcp-server"],
      "env": {
        "MAILS_API_KEY": "mk_live_..."
      }
    }
  }
}

Half of us use VS Code, half JetBrains, and Continue gives both the same mails tools.

Jonas EkbergDeveloper Experience Lead, Gorsewell

Hosted or local

Or add the hosted server

Save this as .continue/mcpServers/mails.yaml at the top of your workspace. The key comes from your Continue secrets, and the tools run in Agent mode. The MCP server page has the rest.

name: mails
version: 0.0.1
schema: v1
mcpServers:
  - name: mails
    type: streamable-http
    url: https://api.mails.ai/mcp
    apiKey: ${{ secrets.MAILS_API_KEY }}

Know-how

Teach Continue about email

Three open-source skills teach Continue to send, receive and safely act on email. The command asks which to add.

npx skills add mailsai/skills -a continue

In action

See the skills in action

With the skills added, Continue checks a message before it answers it, and replies in the same thread.

Guide

Drop-in MCP server in VS Code + JetBrains

MCP server · 4 min read · continue.dev

This guide adds email tools to Continue, the open-source AI assistant for VS Code and JetBrains. One config edit covers both editor families — you don’t need separate setups. Your Continue agent can then send email, read inbound replies, and manage threads in Agent mode. You’ll need a mails.ai API key to get started.

Continue is the open-source AI code assistant that runs in both VS Code and JetBrains IDEs. The same MCP server config works across both editor families — one snippet in ~/.continue/config.yaml and your Continue setup gets send, reply and thread tools in Agent mode.

Why Continue + mails.ai

Continue’s value proposition is multi-model + multi-IDE flexibility. The MCP server matches that posture — model-agnostic, IDE-agnostic, runs as a separate process via npx. Common Continue + mails.ai patterns:

  • Multi-model email drafting. Use Anthropic Sonnet for the customer response draft (high-quality writing), switch to a cheaper local model for classification or batch processing. Same mails_send tool behind both.
  • Per-IDE agent personas. Define different system prompts and slash commands per workspace. A doc-team workspace agent uses formal voice and emails reviewers; a backend-team workspace agent uses terse voice and emails on-call.
  • One config, both editors. Continue reads ~/.continue/config.yaml in JetBrains and in VS Code, so the mails_* tools work the same in both.

Setup

  1. Get an API key. Sign in at app.mails.ai/api-keys and mint one — self-serve, free tier, no card.
  2. Open ~/.continue/config.yaml in your editor.
  3. Add the snippet from the install card above. Save it as .continue/mcpServers/mails.json, or add the YAML entry to config.yaml. Replace mk_live_... with your key.
  4. Save the file; Continue reloads it. MCP tools work only in Agent mode, so switch to Agent and ask which mails_* tools it has.

First commands to test

# In Continue Agent mode (VS Code or JetBrains)
> What mails_* tools are available?

# Send a test email
> Use mails_send to email myself a hello message.

# Read recent inbound
> Get the last day of threads and summarize them.

Common patterns

  • Slash command for email tasks. Create a prompt file with name: email and invokable: true, then run /email in Agent mode to scope a session to email-handling.
  • Model routing per task type. Use Continue’s per-task model selection to route email-drafting tasks to a high-quality model, batch-classification to a cheaper one. Both call into mails_send identically.
  • Per-workspace MCP config. Put per-project servers in .continue/mcpServers/ (gitignored). Use per-project mails.ai keys to separate projects. Billing is per workspace, so use a separate workspace (POST /v1/workspaces) to isolate billing.

Security considerations

  • Per-key scope. One agent-bound mails.ai key (agent_id) per Continue agent. Put per-project servers, with project-specific keys, in .continue/mcpServers/ (gitignored).
  • Multi-model means multi-cost. Switching models in Continue affects model spend, not mails.ai cost. Mails.ai bills by plan (send and inbound allowances), regardless of which model drove the call.
  • Inbound safety. When your Continue agent reads inbound via mails_list_replies or mails_list_messages, the same prompt-injection rule applies: check each event’s injection_score before acting. The model your task is currently on doesn’t change the threat model — injection works against any LLM.

Compare against the Cline integration for VS-Code- specific setup, or the Claude Code integration for the original MCP example.

Read next: Mails.ai for Cline and Mails.ai for Cursor.

Questions developers ask after wiring this up.

Does this work with Continue’s multi-model setup?
Yes. Continue lets you configure multiple model providers (Anthropic, OpenAI, local Ollama, etc.) and switch between them per-task. The MCP server is model-agnostic — mails_* tools are available in Agent mode regardless of which model is actively driving the conversation. Use Anthropic Sonnet for high-stakes email drafts, switch to a local model for cheap classification tasks, both reach for the same mails_send tool.
Can I use Continue’s per-config slash commands with mails.ai?
Yes. Create a prompt file with name: email-reviewer and invokable: true, then run /email-reviewer in Agent mode. Useful when you want a dedicated email-handling persona separate from your default coding assistant.
What about Continue’s autocomplete mode — does it use mails.ai tools?
No. Autocomplete is single-shot completion based on cursor context; it doesn’t use tools. Tools (mails_* included) only fire in Agent mode, where the model has a tool-calling loop. Autocomplete continues to work normally — completing your code without firing mails_* calls.
Continue supports both VS Code and JetBrains. Is the integration identical?
Yes. The MCP server is JSON-config-driven and runs identically across both. The config file path is the same (~/.continue/config.yaml — Continue stores config in the same location regardless of IDE). Save the file; Continue reloads it.

“Replies come back as events with an injection score already on them. We deleted a whole layer of parsing code the week we switched, and we gate on the quarantine flag, so our agent never sees the ones that look like attacks.”

Tomás VargaStaff Engineer, Cinderjay

“Moving our agent onto our own domain was a few DNS records at the registrar. No nameserver move, and our existing mail kept working. Replies to the agent still come back to its inbox, threaded with the message they answer.”

Ishani VaidyaCTO, Sedgequay

“The 422 on cold outreach is the feature I didn’t know I wanted. An agent can’t talk itself into emailing strangers.”

Marcus FeldFounder, Marrowkite

“Our tests send to the test address and wait for the real reply, so the whole loop is covered before a customer ever writes in. It answers in about a second, which keeps the suite fast.”

Ana Lucía RíosEngineering Lead, Gorsefinch

“Adding the MCP server was one JSON block. Claude Code could send and read its own inbox a minute later.”

Jonah AbramsDeveloper, Wickerjay

“A reputation score per agent tells us exactly which one needs attention, instead of one number for the whole account. It comes from each agent’s own replies, bounces and complaints, and we read it from the API.”

Mei Lin ZhouOperations, Larchwhistle

“Sends and replies have separate allowances, so a busy inbox never eats our sending quota. Pricing was the easy part.”

Kwabena AdomakoFounder, Oxbowlark

“Half our agents are LangGraph in Python and half are Node. Both SDKs make the same calls, so the team doesn’t have to think about it.”

Sofia BrandtEngineer, Moss & Ladder

“Signed webhooks, retries with backoff and an event id to dedupe on. The boring plumbing, done properly.”

Nikhil BhonsleBackend Lead, Thimblecrow

“We signed up, made a key and sent our first message without talking to anyone, and the free tier never asked for a card. That’s how infrastructure should feel.”

Frieda WesselFounder, Ploverwick Studio

Give your first agent an inbox

Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.

Get your API key