npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@e2a/mcp-server

v0.4.0

Published

MCP server for e2a — email for AI agents

Downloads

1,132

Readme

@e2a/mcp-server

Model Context Protocol server for e2a — gives any MCP-aware AI agent its own email inbox to send, receive, reply, and (optionally) review held outbound mail before it ships.

Works with Google ADK, LangChain, OpenAI Agents SDK, Claude Desktop, Cursor, Cline, and any other MCP host.

Install

No install — invoke directly with npx:

npx -y @e2a/mcp-server

Requires Node 18+. The server speaks MCP over stdio.

Configuration

Set these in the MCP host's environment block.

| Variable | Required | Default | Description | | --- | --- | --- | --- | | E2A_API_KEY | yes | — | API key from the e2a dashboard | | E2A_AGENT_EMAIL | no | — | Default agent inbox. Scopes the tools so the LLM doesn't have to repeat the address. | | E2A_BASE_URL | no | https://e2a.dev | Self-hosted deployment URL |

Quick start

Google ADK (Python)

from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters

root_agent = Agent(
    model="gemini-flash-latest",
    name="e2a_agent",
    instruction="Help the user manage their email. Reply to threads with `reply_to_message` to preserve threading headers.",
    tools=[
        McpToolset(
            connection_params=StdioConnectionParams(
                server_params=StdioServerParameters(
                    command="npx",
                    args=["-y", "@e2a/mcp-server"],
                    env={
                        "E2A_API_KEY": "YOUR_E2A_API_KEY",
                        "E2A_AGENT_EMAIL": "[email protected]",
                    },
                ),
                timeout=30,
            ),
        ),
    ],
)

LangChain (Python)

Using langchain-mcp-adapters:

from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent

client = MultiServerMCPClient({
    "e2a": {
        "command": "npx",
        "args": ["-y", "@e2a/mcp-server"],
        "transport": "stdio",
        "env": {
            "E2A_API_KEY": "YOUR_E2A_API_KEY",
            "E2A_AGENT_EMAIL": "[email protected]",
        },
    },
})

tools = await client.get_tools()
agent = create_react_agent("anthropic:claude-sonnet-4-6", tools)

OpenAI Agents SDK (Python)

from agents import Agent, Runner
from agents.mcp import MCPServerStdio

async with MCPServerStdio(
    params={
        "command": "npx",
        "args": ["-y", "@e2a/mcp-server"],
        "env": {
            "E2A_API_KEY": "YOUR_E2A_API_KEY",
            "E2A_AGENT_EMAIL": "[email protected]",
        },
    },
) as e2a:
    agent = Agent(name="e2a_agent", mcp_servers=[e2a])
    result = await Runner.run(agent, "Reply to the latest unread email politely.")

Claude Desktop / Cline / Cursor

Add to the MCP config (claude_desktop_config.json, cline_mcp_settings.json, etc.):

{
  "mcpServers": {
    "e2a": {
      "command": "npx",
      "args": ["-y", "@e2a/mcp-server"],
      "env": {
        "E2A_API_KEY": "YOUR_E2A_API_KEY",
        "E2A_AGENT_EMAIL": "[email protected]"
      }
    }
  }
}

Tools

Identity

| Tool | Description | | --- | --- | | whoami | Get the default agent's full record (requires E2A_AGENT_EMAIL). | | list_agents | List every agent inbox owned by the authenticated user. | | create_agent | Register a new inbox using a slug on the shared domain. Defaults to local mode — no webhook required. See note below for cloud mode. |

Cloud-mode agents must verify webhook signatures. When you create an agent with agent_mode: "cloud", e2a HMAC-signs every webhook delivery against your account's webhook signing secret (E2A_WEBHOOK_SECRET, shown in the e2a dashboard). Your webhook handler must verify the signature on every request — the e2a SDK exposes parseWebhook(body, secret) which parses and verifies in one call. Local-mode agents (the default) avoid this entirely by polling via list_messages.

Messages

| Tool | Description | | --- | --- | | send_email | Send a new email. When the agent has HITL enabled, the message is held and returns status: pending_approval instead of sent. | | reply_to_message | Reply to an inbound message. Preserves In-Reply-To / References for thread continuity. | | list_messages | List inbound mail. Filter by status (unread / read / all), paginate with page_size + token. | | get_message | Fetch full body, headers, and attachment metadata for one message. |

Human-in-the-loop approval

| Tool | Description | | --- | --- | | list_pending_messages | List outbound mail awaiting human approval, soonest-expiring first. | | get_pending_message | Get the full draft (subject, recipients, body) of a pending message. | | approve_pending_message | Send a held message, optionally with reviewer edits (subject / body / recipients). | | reject_pending_message | Discard a held message; the optional reason is stored for audit. |

Links

License

Apache-2.0