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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mailhooks/mcp

v1.0.9

Published

MCP server for Mailhooks API - list and read emails

Readme

Mailhooks MCP Server

An MCP (Model Context Protocol) server that provides tools to interact with the Mailhooks API for listing and reading emails.

Features

  • list_emails: List emails with optional filtering by sender, recipient, or subject
  • read_email: Read the full content of a specific email by ID
  • wait_for_email: Wait for an email that matches specific filters (useful for testing and automation)
  • list_domains: List all domains configured in your Mailhooks account

Installation

Option 1: Install from npm

npm install -g @mailhooks/mcp

Option 2: Use npx (no installation required)

You can run the MCP server directly using npx without installing it globally.

Configuration

Required Environment Variables

  • MAILHOOKS_API_KEY (required): Your Mailhooks API key
  • MAILHOOKS_API_URL (optional): API base URL (defaults to https://mailhooks.dev)

Getting your API Key

  1. Sign up or log in to your Mailhooks account
  2. Navigate to Settings → API Keys
  3. Create a new API key or copy an existing one

Usage with Claude Desktop

Quick Setup with Claude CLI

claude mcp add-json mailhooks --scope user '
  { 
    "command": "npx", 
    "args": ["@mailhooks/mcp"],
    "env": {
      "MAILHOOKS_API_KEY": "mh_your_api_key_here"
    }
  }
'

Manual Configuration

Add to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

Using npx (Recommended)

{
  "mcpServers": {
    "mailhooks": {
      "command": "npx",
      "args": ["@mailhooks/mcp"],
      "env": {
        "MAILHOOKS_API_KEY": "mh_your_api_key_here"
      }
    }
  }
}

Using global installation

{
  "mcpServers": {
    "mailhooks": {
      "command": "mcp-mailhooks",
      "args": [],
      "env": {
        "MAILHOOKS_API_KEY": "mh_your_api_key_here"
      }
    }
  }
}

Development

# Install dependencies
pnpm install

# Build the package
pnpm build

# Run in development mode
pnpm dev

Tools

list_emails

Lists emails from your Mailhooks account.

Parameters:

  • page (optional): Page number (default: 1)
  • perPage (optional): Items per page (default: 20, max: 100)
  • from (optional): Filter by sender email
  • to (optional): Filter by recipient email
  • subject (optional): Filter by subject (partial match)

read_email

Reads the full content of a specific email.

Parameters:

  • emailId (required): The ID of the email to read

wait_for_email

Waits for an email that matches specific filters. Useful for testing email flows and automation.

Parameters:

  • from (optional): Filter by sender email address
  • to (optional): Filter by recipient email address
  • subject (optional): Filter by subject (partial match)
  • lookbackWindow (optional): How far back to look for emails on first check in ms (default: 10000)
  • initialDelay (optional): Delay before starting to poll in ms (default: 0)
  • timeout (optional): Maximum time to wait in ms (default: 30000)
  • pollInterval (optional): Time between checks in ms (default: 1000)
  • maxRetries (optional): Maximum number of polling attempts (default: unlimited)

list_domains

Lists all domains configured in your Mailhooks account.

No parameters required.