This MCP server provides a tool for generating placeholder images with different providers, allowing you to easily integrate placeholder images in your applications or design mockups through the Model Context Protocol.
To install the MCP Image Placeholder Server, follow these steps:
uv
package manager installedAdd the following to your claude_desktop_config.json
:
{
"mcpServers": {
"image-placeholder": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PROJECT",
"run",
"main.py"
]
}
}
}
Replace /ABSOLUTE/PATH/TO/PROJECT
with the actual path to the project directory
Restart Claude for Desktop
Features
sectionMCP Servers
sectionAdd new MCP server
buttonimage-placeholder
command
uv --directory /ABSOLUTE/PATH/TO/PROJECT run main.py
/ABSOLUTE/PATH/TO/PROJECT
with the actual path to the project directoryAdd ↵
buttonThe server provides a single tool called image_placeholder
that generates URLs for placeholder images.
image_placeholder
This tool generates a placeholder image URL based on the parameters you specify.
Parameters:
provider
: The image provider to use (placehold
or lorem-picsum
)width
: The width of the image (1-10000)height
: The height of the image (1-10000)Returns:
Generate a basic placeholder image:
url = image_placeholder(provider="placehold", width=300, height=200)
Generate a square placeholder with real images:
url = image_placeholder(provider="lorem-picsum", width=500)
If the tool isn't being detected properly, try using the absolute path to the uv
command:
/ABSOLUTE/PATH/TO/uv --directory /ABSOLUTE/PATH/TO/PROJECT run main.py
Make sure to replace the path placeholders with your actual system paths.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.