Mails.ai for Continue — drop-in MCP server in VS Code + JetBrains
continue.devAdd to ~/.continue/config.json under mcpServers (Continue v1.0+). Restart your IDE.
{
"mcpServers": {
"mails": {
"command": "npx",
"args": ["-y", "@mailsai/mcp-server"],
"env": {
"MAILS_API_KEY": "mk_live_..."
}
}
}
}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.json and your Continue setup gets send + reply + identity primitives in chat mode and 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.
- Cross-IDE task continuity. Start a task in JetBrains, finish in VS Code. The MCP server config travels with the user; mails.* tools work identically in both.
Setup
- Get an API key.
api.mails.ai/keysat Phase 1 launch, or request a closed-beta key from support@mails.ai. - Open ~/.continue/config.json in your editor.
- Add the snippet from the install card above. If you already have an
mcpServersblock, just addmailsas a sibling key. Replacemk_live_...with your key. - Restart your IDE.The next Continue session spawns the MCP server via npx on first tool invocation. Verify in Continue’s settings panel that
mailsappears under MCP servers.
First commands to test
# In Continue chat (VS Code or JetBrains)
> What mails.* tools are available?
# Send a test email
> Use mails.send to email myself a hello message from agent "test".
# Read recent inbound
> Get the last day of threads on the test agent and summarize them.Common patterns
- Slash command for email tasks. Define
"/email": "Use mails.* tools to handle email work for this codebase"in Continue config. Invoke with/emailin chat 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. Continue supports workspace-specific configs in
.continue/config.json(project-level, gitignored). Use per-project mails.ai keys for billing isolation.
Security considerations
- Per-key scope. One mails.ai key per Continue agent. Workspace-level configs override user-level for project-specific keys.
- Multi-model means multi-cost. Switching models in Continue affects model spend, not mails.ai cost. Mails.ai billing is per-event regardless of which model drove the call.
- Inbound safety. When your Continue agent reads inbound via
mails.list_threads, the same prompt-injection rule applies: checkevent.injection_scorebefore 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.
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 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. Define a custom slash command like '/email-reviewer' in Continue's config that combines a system prompt with mails.* tool access. 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 chat mode and 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.json — Continue stores config in the same location regardless of IDE). Restart the IDE after editing the config.
Built for agents.
Self-serve at every volume.
Public API opens Q3 2026. Drop ~6 lines into your agent and ship.
$ npm install @mailsai/sdk