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

imgflip-meme-mcp

v1.3.0

Published

MCP server for generating memes using the Imgflip API

Downloads

52

Readme

Meme Generator MCP Server

npm version License: MIT

An Express.js-based Model Context Protocol (MCP) server that generates memes using the Imgflip API. This server provides a standardized MCP interface for AI agents and applications to create custom memes programmatically.

Features

  • 🎨 Meme Generation: Create memes from any Imgflip template with custom text
  • 🔌 MCP Protocol: Full Model Context Protocol implementation for seamless AI integration
  • 🚀 Express Server: Lightweight HTTP server with CORS support
  • Type Safety: Built with TypeScript and Zod schema validation

Installation

npm install imgflip-meme-mcp

Quick Start

1. Start the Server

npx imgflip-meme-mcp

Or if installed locally:

npm start

The server will start on http://localhost:3000 by default. You can customize the port using the PORT environment variable:

PORT=8080 npm start

2. Endpoints

  • MCP Endpoint: http://localhost:3000/mcp - Main MCP protocol endpoint
  • Health Check: http://localhost:3000/ - Server status and information

Usage

As an MCP Server

Connect to this server using any MCP-compatible client. The server exposes a single tool:

generate_meme

Generates a meme from an Imgflip template with custom text.

Parameters:

  • username (string, required): Your Imgflip username
  • password (string, required): Your Imgflip password
  • template_id (string, required): The Imgflip template ID (e.g., '181913649' for Drake template)
  • text0 (string, required): Text for the first text box (usually top text)
  • text1 (string, optional): Text for the second text box (usually bottom text)

Returns:

  • meme_url (string): Direct URL to the generated meme image

Example Request:

{
  "username": "your_username",
  "password": "your_password",
  "template_id": "181913649",
  "text0": "Using AI to generate memes",
  "text1": "Actually understanding how memes work"
}

Example Response:

{
  "meme_url": "https://i.imgflip.com/xxxxx.jpg"
}

Finding Template IDs

To find available meme templates and their IDs, visit the Imgflip API documentation or use the Imgflip website to browse templates. Popular template IDs include:

  • 181913649 - Drake Pointing
  • 87743020 - Two Buttons
  • 112126428 - Distracted Boyfriend
  • 131087935 - Running Away Balloon

Development

Prerequisites

  • Node.js 18+
  • npm or yarn

Setup

  1. Clone the repository:
git clone <repository-url>
cd imgflip-meme-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Start the server:
npm start

Development Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm start - Start the production server
  • npm run dev - Build and start the server
  • npm run watch - Watch for changes and rebuild

Project Structure

imgflip-meme-mcp/
├── src/
│   └── server.ts          # Main server implementation
├── dist/                   # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.md

Configuration

Environment Variables

  • PORT - Server port (default: 3000)

Error Handling

The server provides detailed error messages for common issues:

  • Missing credentials: Returns an error if username or password is not provided
  • Invalid template ID: Returns Imgflip API error messages
  • API failures: Returns descriptive error messages from the Imgflip API

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues, questions, or feature requests, please open an issue on the GitHub repository.

Related Links