- Home
- MCP servers
- MCP Image Search and Icon Generation Service
MCP Image Search and Icon Generation Service
- python
14
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You have an MCP server that combines image search from multiple sources with AI-generated icons, designed to integrate seamlessly with Cursor IDE. You can search for high-quality images, download them to your project, and generate custom icons based on text descriptions, all through MCP tools exposed by this service.
How to use
You use this MCP server by connecting an MCP client (such as Cursor IDE) to the server’s MCP endpoints. Once connected, you can invoke the available tools to search images across Unsplash, Pexels, and Pixabay, download selected images to your project, and generate icons from descriptive prompts. The server exposes tools named search_images, download_image, and generate_icon. Use these tools from your MCP-enabled workflow to streamline your UI asset creation.
How to install
Prerequisites you need before installation: a Python 3.10+ environment and a modern package manager. You will run the server directly with Python, or through MCP runners like fastmcp or uvicorn-based workflows.
Step 1: Set up Python and package manager
- Install Python 3.10 or newer
- Install uv for fast package management or use your preferred method for running Python servers
Step 2: Install dependencies
python3 -m pip install fastmcp requests
If you encounter certificate issues, you can reinstall with trusted hosts:
python3 -m pip install fastmcp requests --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade --force-reinstall --no-cache-dir
Step 3: Prepare configuration
- Create a configuration file from a template and edit API keys as needed
cp config.json.template config.json nano config.json
- In config.json, add your API keys for Unsplash, Pexels, Pixabay, and Together AI, plus timeout and retry settings
{ "api": { "unsplash_access_key": "YOUR_UNSPLASH_KEY", "pexels_api_key": "YOUR_PEXELS_KEY", "pixabay_api_key": "YOUR_PIXABAY_KEY", "together_api_key": "YOUR_TOGETHER_KEY", "timeout": 30, "max_retries": 3, "retry_delay": 5 } }
Step 4: Run the server
- You can start the server directly with Python
python3.11 main.py
- Or use MCP-oriented runners if you prefer
fastmcp dev main.py
- You can also run via uvicorn-based workflows
uv run --with fastmcp fastmcp run main.py
Step 5: Verify startup
- The server should indicate the port it’s listening on and that the MCP tools are registered, for example:
启动图片搜索服务 - 端口: 5173 提供的工具: search_images, download_image, generate_icon INFO: Started server process [xxxxx] INFO: Uvicorn running on http://0.0.0.0:5173 (Press CTRL+C to quit)
Step 6: Connect from Cursor
- In Cursor, add a new MCP tool you want to connect to. Use the URL http://localhost:5173 and ensure the connection type is SSE. If your Cursor version requires ServerLink, use the /sse endpoint as the ServerLink path.
- If you see a client-creation error, verify the server is running, the port matches, and that the URL is correctly formatted.
Additional sections
Configuration and environment details
- The server reads API keys from a configuration file (config.json). Do not commit this file to version control; keep it local to your deployment.
- The default port used by the server is 5173, but you can adjust it by changing the runtime configuration if needed. Security and access notes
- Protect your API keys by restricting access to the configuration file and the server’s host. Do not expose keys in public repositories or logs.
- When using Cursor, ensure only trusted models and users can invoke image search and icon generation actions to avoid misuse.
Troubleshooting and notes
Common issues and fixes:
- If the server is not reachable, confirm it is running on the expected port with a process check and a local HTTP request (curl http://localhost:5173).
- Ensure that you are using the correct MCP endpoint path for ServerLink connections: /sse.
- If you switch ports, update your Cursor configuration to the new port accordingly.
- Restart the MCP server and Cursor if you encounter stale connections or memory issues. Recommended workflow tips
- Use clear, descriptive keywords when searching for images to improve result quality.
- Save images in a structured manner, naming them with a consistent pattern like category-name-size.png.
- Generate icons from precise prompts to ensure they align with your app’s visual style.
Server and tool metadata
This server exposes three MCP tools: search_images, download_image, and generate_icon. You interact with these tools through your MCP client to perform image search, download, and icon creation tasks as part of your project workflow.
Available tools
search_images
Search images across multiple providers (Unsplash, Pexels, Pixabay) using keywords and save results for further actions.
download_image
Download a selected image from search results to a specified path or project folder.
generate_icon
Create AI-generated icons from textual descriptions with configurable styles and sizes.