A Model Context Protocol server that generates memes from user input using OpenAI's image editing capabilities.
This server implements the Model Context Protocol (MCP) to provide meme generation functionality. It takes a text description as input, refines it using AI, and generates a meme image by editing a base template. The generated images are uploaded to MinIO S3-compatible storage and returned as URLs.
- MCP-compliant server for seamless integration with MCP clients
- Prompt refinement using AI to optimize meme descriptions
- Image generation using OpenAI's GPT-image-1 model
- Automatic upload of generated images to MinIO S3 storage
- Node.js >= 22.0.0
- MinIO S3-compatible storage
- OpenAI API key
-
Clone the repository:
git clone https://github.com/sint-ai/image_mcp_server.git cd image_mcp_server -
Install dependencies:
npm install
-
Copy the example environment file and fill in your credentials:
cp .env.example .env
-
Edit
.envwith your configuration:PORT: Server portOPENAI_API_KEY: Your OpenAI API keyMINIO_ENDPOINT: MinIO server endpointMINIO_PORT: MinIO server portMINIO_USE_SSL: Whether to use SSL for MinIO connectionMINIO_ACCESS_KEY: MinIO access keyMINIO_SECRET_KEY: MinIO secret keyMINIO_BUCKET_NAME: MinIO bucket nameMINIO_BUCKET_URL: Public URL for accessing the MinIO bucket
Start the server:
npm startThe server will start running on the configured port (default: 3000).
POST /mcp: Main MCP endpoint for processing requests
This server provides the following MCP tool:
create_meme: Generates a meme from a text description- Input: String describing the desired meme
- Output: URLs to the generated images
Check TypeScript types:
npm run check-types