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

@smashsend/mcp-server

v1.0.0

Published

SMASHSEND Model Context Protocol Server - Official MCP server for SMASHSEND API

Downloads

5

Readme

SMASHSEND MCP Server

A Model Context Protocol (MCP) server for SMASHSEND email marketing platform. Available as an npm package and deployable to Vercel.

📦 Installation

As an npm Package

npm install @smashsend/mcp-server
# or
pnpm add @smashsend/mcp-server
# or
yarn add @smashsend/mcp-server

For Development

git clone https://github.com/smashsend/mcp-server.git
cd mcp-server
pnpm install

🚀 Usage

Using as an npm Package

import { createSmashsendMcpServer } from "@smashsend/mcp-server";

// Create MCP server with default options
const mcpHandler = createSmashsendMcpServer();

// Or with custom configuration
const mcpHandler = createSmashsendMcpServer({
  basePath: "/api/mcp",
  verboseLogs: true,
  maxDuration: 1000,
});

Next.js App Router Integration

// app/api/mcp/[transport]/route.ts
import { createSmashsendMcpServer } from "@smashsend/mcp-server";

const handler = createSmashsendMcpServer({
  basePath: "/api/mcp",
});

export { handler as GET, handler as POST, handler as DELETE };

Express Integration

import express from "express";
import { createSmashsendMcpServer } from "@smashsend/mcp-server";

const app = express();
const mcpHandler = createSmashsendMcpServer();

app.all("/mcp/*", mcpHandler);

Environment Variables

Set your SMASHSEND API key:

SMASHSEND_API_KEY=your_smashsend_api_key_here

🌐 Vercel Deployment

One-Click Deploy

Deploy with Vercel

Manual Deployment

  1. Install Vercel CLI:

    npm install -g vercel
  2. Deploy:

    vercel
  3. Set Environment Variables:

    vercel env add SMASHSEND_API_KEY
  4. Deploy to Production:

    vercel --prod

Configuration

The project includes a vercel.json for optimal configuration:

{
  "functions": {
    "app/[transport]/route.ts": {
      "maxDuration": 800
    }
  }
}

🧪 Local Development

Running the Development Server

npm run dev

The server will be available at http://localhost:3000.

Testing

Test your MCP server locally:

# Test connection
npm run test:connection

# Test tools manually
npm run test:tools

# Full MCP protocol test
npm run test:mcp:full

# Test against local server
npm run test:local

📚 Available Tools

The MCP server provides the following tools:

1. createOrUpdateContact

Create or update a contact in SMASHSEND (updates if email exists).

2. searchContact

Find a contact by email address.

3. listContactProperties

List all available contact properties (default and custom).

4. createContactProperty

Create a custom contact property.

5. sendEmail

Send an email (raw or templated).

🔧 Configuration Options

When creating the MCP server, you can provide the following options:

interface McpServerOptions {
  basePath?: string; // Base path for the MCP server (default: "")
  verboseLogs?: boolean; // Enable verbose logging (default: false in production)
  maxDuration?: number; // Maximum request duration in ms (default: 800)
}

🏗️ Building

Build for npm Package

npm run build:npm

This creates:

  • dist/index.js - CommonJS build
  • dist/index.mjs - ESM build
  • dist/index.d.ts - TypeScript definitions

Build for Vercel

npm run build:next

Build Everything

npm run build

📝 Publishing

Publish to npm

# Beta release
npm run publish-beta

# Stable release
npm run publish-stable

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT © SMASHSEND

🔗 Links