meme-generator-mcp-server

meme-generator-mcp-server

3.2

If you are the rightful owner of meme-generator-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Imgflip MCP Server is a Model Context Protocol server that enables meme generation using the Imgflip API, allowing AI assistants to access popular meme templates and create custom memes programmatically.

Imgflip MCP Server

A Model Context Protocol (MCP) server that provides meme generation capabilities through the Imgflip API. This server allows AI assistants to fetch popular meme templates and create custom memes programmatically.

Features

  • 🎭 Get Popular Memes: Retrieve a list of trending meme templates
  • 🎨 Create Custom Memes: Generate memes with custom text using popular templates
  • 🔍 Search Templates: Search for specific meme templates (Premium feature)

Prerequisites

  • Python 3.8+
  • Imgflip account (free account works for basic features)
  • MCP-compatible client (like Claude Desktop)

Installation

  1. Clone this repository:
git clone <repository-url>
cd meme-generator-mcp-server
  1. Install dependencies:
pip install mcp requests
  1. Configure your Imgflip credentials:
    • Edit main.py
    • Replace your_username and your_password with your actual Imgflip credentials

Configuration

Update the following variables in main.py:

IMGFLIP_USERNAME = "your_actual_username"
IMGFLIP_PASSWORD = "your_actual_password"

Usage

Run the MCP server:

python main.py

Available Tools

get_popular_memes

Fetches the top 10 popular meme templates from Imgflip.

Parameters: None

Returns: List of meme templates with ID, name, and preview URL

create_meme

Creates a custom meme using a template ID and text.

Parameters:

  • template_id (required): The ID of the meme template
  • top_text (required): Text for the top of the meme
  • bottom_text (optional): Text for the bottom of the meme

Returns: URL of the generated meme

search_memes

Search for meme templates by keyword (requires Imgflip premium account).

Parameters:

  • query (required): Search term for finding templates

Example Usage

# Get popular memes
popular_memes = await get_popular_memes()

# Create a meme
meme_url = await create_meme(
     template_id="61579",
     top_text="When you finish coding",
     bottom_text="But forgot to test it"
)

API Reference

This server uses the Imgflip API:

  • Get Memes: https://api.imgflip.com/get_memes
  • Caption Image: https://api.imgflip.com/caption_image

Error Handling

The server includes comprehensive error handling for:

  • Network connectivity issues
  • Invalid template IDs
  • Authentication failures
  • API rate limiting

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues and questions:

  • Check the Imgflip API documentation
  • Review the MCP specification
  • Open an issue in this repository

Acknowledgments