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

memecp

v0.0.6

Published

A simple Model Context Protocol (MCP) server

Readme

MemeCP - Meme Generation MCP Server

A fun test project! This is a Model Context Protocol (MCP) server built with TypeScript that provides meme generation tools using the Memegen.link API. Created purely for experimentation and entertainment - no serious intent other than having some fun with MCP and memes! 🎉

Features

The server provides three powerful meme tools:

  1. Show All Meme Templates - Browse all available meme templates from Memegen.link
  2. Show Meme Template - View details and preview of a specific meme template
  3. Compose Meme - Generate custom memes with intelligent template selection and text placement

Prerequisites

  • Node.js 18 or higher
  • pnpm package manager

Setup

  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm run build
  1. (Optional) Set up API key for watermark-free memes:
export MEMEGEN_API_KEY=your_api_key_here

Usage

Development Mode

Run the server in development mode with hot reload:

pnpm run dev

Production Mode

Build and run the server:

pnpm run build
pnpm start

Watch Mode

Run with file watching for development:

pnpm run watch

MCP Client Configuration

To use this server with an MCP client, configure it to run:

node /path/to/memecp/dist/index.js

Or in development:

pnpm --dir /path/to/memecp run dev

Available Tools

Show All Meme Templates

Lists all available meme templates from Memegen.link with their names, IDs, and keywords.

Usage:

{
  "name": "show_all_meme_templates",
  "arguments": {}
}

Show Meme Template

Shows details and preview image for a specific meme template. Supports search by name, ID, or keywords.

Input:

  • name (string): Name, ID, or keyword of the meme template

Example:

{
  "name": "show_meme_template",
  "arguments": {
    "name": "fine"
  }
}

Compose Meme

Generates a custom meme with automatic template selection and intelligent text placement.

Input:

  • text (string): Text content for the meme. Use | to split into top/bottom text, or let the AI split it intelligently
  • template (string, optional): Specific template name/ID to use. If not provided, the best template is selected automatically
  • returnImage (boolean, optional): Whether to return the image data. Defaults to true

Examples:

Auto-selected template:

{
  "name": "compose_meme",
  "arguments": {
    "text": "Updating documentation | Actually reading the code first"
  }
}

Specific template:

{
  "name": "compose_meme",
  "arguments": {
    "text": "One does not simply | Write documentation without bugs",
    "template": "mordor"
  }
}

Smart text parsing:

{
  "name": "compose_meme",
  "arguments": {
    "text": "When you find out the README describes a completely different project than what the code actually does"
  }
}

Template Selection Intelligence

The compose tool includes smart template selection based on text content:

  • Choice/comparison text (vs, or, choose) → Two Buttons template
  • Intelligence/brain text → Expanding Brain template
  • "Fine" or disaster text → This is Fine template
  • "Change my mind" text → Change My Mind template
  • Distraction/comparison → Distracted Boyfriend template
  • And many more patterns...

Text Encoding

The server automatically handles special character encoding for URLs:

  • Spaces become underscores
  • Special characters are properly escaped
  • Line breaks and formatting are preserved

API Integration

This server uses the Memegen.link API which provides:

  • 200+ popular meme templates
  • High-quality image generation
  • Customizable text styling
  • Optional API key for watermark removal

Development

  • pnpm run clean - Remove build artifacts
  • pnpm run build - Build TypeScript to JavaScript
  • pnpm run dev - Run in development mode
  • pnpm run watch - Run with file watching

Publishing

This package is automatically published to npm via GitHub Actions when a new version tag is pushed.

For Maintainers

  1. Update the version in package.json (follow semantic versioning)
  2. Update the repository URLs in package.json to match your actual GitHub repository
  3. Set up NPM_TOKEN secret in your GitHub repository:
    • Go to npm.com → Access Tokens → Generate New Token (Automation)
    • Add the token as NPM_TOKEN in your GitHub repository settings → Secrets and variables → Actions
  4. Create and push a version tag:
    git tag v1.0.1
    git push origin v1.0.1
  5. The GitHub Action will automatically:
    • Build the TypeScript code
    • Run tests (if any)
    • Publish to npm

Manual Publishing

For manual publishing (not recommended for production):

pnpm run build
pnpm publish

License

MIT