Mcp-Server-Placeholder-Image-Generator
Image Generator MCP Server
Documentation
Image Generator MCP Server
A Model Context Protocol (MCP) server that generates test images with customizable width, height, and color. Saves images as PNG files to specified file paths.
Features
- Generate test images with specified dimensions (1-4096 pixels)
- Support for hex color format (e.g., #FF0000, #f00)
- Automatic text overlay showing image dimensions
- Optional custom label text displayed in the top-left corner
- Smart contrast color selection for readable text
- Saves images as PNG files to specified file paths
- Automatically creates directories if they don't exist
Installation
1. Clone or download this repository
2. Install dependencies:
npm install3. Build the server:
npm run build4. Add the server to your MCP configuration:
For VSCode:
{
"servers": {
"Image Placeholder Gen": {
"type": "stdio",
"command": "node",
"args": [
"~/mcp_servers/image-gen/build/index.js"
]
}
}
}For Claude Desktop:
{
"mcpServers": {
"image-gen": {
"command": "node",
"args": ["/path/to/image-gen/build/index.js"]
}
}
}Usage
The server provides one tool:
generate_test_image
Generate a test image with specified parameters.
Parameters:
- `width` (number): Width of the image in pixels (1-4096)
- `height` (number): Height of the image in pixels (1-4096)
- `color` (string): Color of the image as hex code (e.g., #FF0000 or #f00)
- `filepath` (string): Full path where the PNG image should be saved
- `label` (string, optional): Custom text to display in the top-left corner of the image
Example:
{
"name": "generate_test_image",
"arguments": {
"width": 400,
"height": 300,
"color": "#3498db",
"filepath": "/tmp/test_image.png",
"label": "My Custom Label"
}
}Returns:
- Text confirmation that the image was successfully generated and saved
Color Format
The tool supports hex color format:
- Hex colors: `#FF0000`, `#f00`
Testing
Run the test script to verify the server works:
npm run build
npm testDependencies
- Node.js canvas library for image generation
- Model Context Protocol SDK
Notes
- Maximum image dimensions are capped at 4096x4096 pixels for performance
- Generated images include dimension text overlay for easy identification
- Text color is automatically chosen for optimal contrast against the background
- The server automatically creates directories if they don't exist in the specified file path
Contributing
Feel free to submit issues and enhancement requests!
Frequently asked questions
What is Mcp-Server-Placeholder-Image-Generator?
Mcp-Server-Placeholder-Image-Generator is Image Generator MCP Server
How do I install Mcp-Server-Placeholder-Image-Generator?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is Mcp-Server-Placeholder-Image-Generator open source?
Yes — it is hosted on GitHub at https://github.com/sam2332/Mcp-Server-Placeholder-Image-Generator.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP