Generate placeholder images with MCP server using support providers like placehold and lorem-picsum
The Image Placeholder Server
is an MCP server designed to generate placeholder images from various providers seamlessly integrated into AI applications such as Claude Desktop, Continue, and Cursor. This tool not only provides a simple yet robust solution for developers but also enhances user experiences by dynamically generating placeholder images based on specified dimensions.
The server leverages two powerful providers:
Each provider supports a wide range of image dimensions, allowing developers to tailor placeholders precisely according to their needs. The server ensures that all generated images meet the required specifications by validating input parameters such as width
and height
.
The core capability lies in its ability to validate user inputs and generate valid URLs. This validation process prevents errors and ensures consistent performance across different scenarios, making it a reliable tool for developers.
graph TB
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
Here, the AI application uses the MCP client to communicate with the MCP protocol, which in turn talks to the server and eventually integrates with the data source or tool for fetching placeholder images.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
This table showcases the compatibility matrix, indicating that both Claude Desktop
and Continue
fully support this server, while Cursor
only supports tool integration.
Ensure you have:
uv
package manager installedIn a content management system (CMS) built on top of Claude Desktop, developers can dynamically generate placeholder images for articles before actual images are uploaded. This ensures an uninterrupted user experience and reduces load time.
Designers using Cursor can leverage this server to create mockups quickly by generating placeholder images in predefined dimensions. This allows for faster iteration without the need for real images, streamlining the design process significantly.
Claude Desktop
Add the following configuration snippet to your claude_desktop_config.json
file:
{
"mcpServers": {
"image-placeholder": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PROJECT",
"run",
"main.py"
]
}
}
}
Restart Claude Desktop
for the changes to take effect.
Cursor
Features
section, then scroll down to the MCP Servers
tab.Add new MCP server
button and enter:
image-placeholder
command
/ABSOLUTE/PATH/TO/uv --directory /ABSOLUTE/PATH/TO/PROJECT run main.py
Add ↵
button to finalize.This server is optimized for performance with a wide range of dimensions (1-10,000) and robust validation mechanisms. The compatibility matrix ensures that this server works seamlessly across multiple MCP clients, supporting real-time integration.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
To adjust the server behavior, modify main.py
as needed. For security reasons, store sensitive information like API keys in environment variables.
{
"mcpServers": {
"image-placeholder": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PROJECT",
"run",
"main.py"
],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
This server simplifies the process of generating placeholder images, which are crucial in various AI applications such as content management and user interface design.
Currently, only Claude Desktop
and Continue
fully support this server, while Cursor
integrates it for tool use.
The server validates input parameters (width, height) to ensure that generated URLs are always correct and usable.
Yes, you can modify the configuration files and code to support additional providers or customizations as needed.
Refer to the README file within this repository for more detailed instructions and examples of advanced usage.
Contributions are welcome! Please follow these guidelines:
Explore more about Model Context Protocol and find additional resources on the official documentation website. Engage with the community forums or GitHub issues to get support and share insights.
This comprehensive guide positions the Image Placeholder Server
as an essential tool in AI workflows, emphasizing its integration capabilities with various MCP clients and offering a robust solution for generating placeholder images efficiently.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods