meme-generator-mcp
v1.0.0
Published
A Model Context Protocol (MCP) server for generating memes using the ImgFlip API. This server enables AI models and tools to generate meme images from user prompts.
Readme
Meme MCP Server
A Model Context Protocol (MCP) server for generating memes using the ImgFlip API. This server enables AI models and tools to generate meme images from user prompts.
Features
- List all available meme templates from ImgFlip
- Create new memes by specifying a template and text for the placeholders
Installation
# Install dependencies
yarn installConfiguration
Create a .env file in the root directory with the following variables:
PORT=3000
IMGFLIP_USERNAME="your-imgflip-username"
IMGFLIP_PASSWORD="your-imgflip-password"You need to create a free account at ImgFlip to get the credentials.
Usage
Development
# Run in development mode
yarn devProduction
# Build the project
yarn build
# Start the server
yarn startAPI Endpoints
List Meme Templates
Endpoint: POST /listMemeTemplates
Description: Returns all available meme templates from ImgFlip.
Request Body: None needed
Response:
{
"status": "success",
"result": [
{
"id": "181913649",
"name": "Drake Hotline Bling",
"url": "https://i.imgflip.com/30b1gx.jpg",
"width": 1200,
"height": 1200,
"box_count": 2
}
// ... more templates
]
}Create Meme
Endpoint: POST /createMeme
Description: Creates a new meme using the specified template and text.
Request Body:
{
"template_id": "181913649",
"text_lines": ["First text", "Second text"],
"max_font_size": 50 // optional
}Response:
{
"status": "success",
"result": {
"url": "https://i.imgflip.com/generated-meme.jpg",
"page_url": "https://imgflip.com/i/some-id"
}
}For AI Models
This MCP server is designed to be used by AI models to generate memes from user prompts. When using this MCP in an AI system, you can:
- First list available templates to show options to the user
- Use the template ID and user-provided text to generate a meme
- Return the image URL to the user
License
MIT
