# Mailspring MCP

> Mailspring plugin that exposes email data through a local Model Context Protocol server

- **Type:** MCP server
- **Install:** `agentstack add mcp-ryamosthomas-mailspring-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [RyamosThomas](https://agentstack.voostack.com/s/ryamosthomas)
- **Installs:** 0
- **Category:** [Communication](https://agentstack.voostack.com/c/communication)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [RyamosThomas](https://github.com/RyamosThomas)
- **Source:** https://github.com/RyamosThomas/Mailspring-MCP

## Install

```sh
agentstack add mcp-ryamosthomas-mailspring-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Mailspring MCP Server Plugin

A Mailspring plugin that runs an MCP (Model Context Protocol) server, giving AI agents read-only access to your email data — threads, messages, contacts, folders, and labels.

The plugin uses Mailspring's own `DatabaseStore` API, making setup easy and seamless.

## Installation

Use this if you want to install the plugin into Mailspring and run it normally.

1. Install dependencies and build the plugin:

  ```bash
  npm install
  npm run build
  ```

2. Install the built plugin into Mailspring through Mailspring's plugin install flow, or place the built plugin directory in Mailspring's `packages` directory.

3. Restart Mailspring. The MCP server starts automatically on `http://127.0.0.1:2525/mcp`.

## MCP Configuration

Import the configuration using the following JSON snippet, example vscode snippet included in repo:
```json
{
  "mcpServers": {
    "mailspring": {
      "url": "http://127.0.0.1:2525/mcp"
    }
  }
}
```

## Development

Use this if you are actively working on the plugin code.

1. Install dependencies and build:

   ```bash
   npm install
   npm run build
   ```

2. Link the repo into Mailspring's `packages` directory so Mailspring loads your working copy:

  ```bash
  ./install.sh
  ```

3. Restart Mailspring.

## Available Tools

| Tool | Description |
|------|-------------|
| `search_emails` | Full-text search with structured filters (from, to, subject, date range, folder, label, unread, starred, attachments). Supports FTS5 syntax: `OR`, `NOT`, quoted phrases, prefix matching. |
| `read_email` | Read a specific email with full plain-text body content and attachment list |
| `batch_read_emails` | Read multiple emails at once by ID — full body + attachments for each |
| `list_threads` | List threads with filters (folder, label, unread, starred, date range, attachments). Returns enriched metadata: message count, last sender, reply status. |
| `read_thread` | Read a full thread with all messages, reply status, attachment details, sanitized `bodyHtml`, and stripped plain-text `body` |
| `list_contacts` | List or search contacts by name/email |
| `list_folders` | List all mailbox folders |
| `list_labels` | List all email labels |
| `get_recent_emails` | Get recent emails with date range filtering and pagination |
| `list_drafts` | List draft emails with pagination |
| `email_stats` | Get mailbox statistics |

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [RyamosThomas](https://github.com/RyamosThomas)
- **Source:** [RyamosThomas/Mailspring-MCP](https://github.com/RyamosThomas/Mailspring-MCP)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ryamosthomas-mailspring-mcp
- Seller: https://agentstack.voostack.com/s/ryamosthomas
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
