RichdaleAI MCP server for RunPod image generation
Project description
RichdaleAI MCP Server
A Model Context Protocol (MCP) server for AI image generation using RunPod's Stable Diffusion API.
Features
- Generate images using Stable Diffusion 3.5 Large model
- MCP-compatible server architecture
- Fast image generation with configurable parameters
- Support for various aspect ratios and style presets
Installation
From Source
# Clone the repository
git clone <repository-url>
cd MCP-API
# Install build dependencies
pip install build
# Build the package
python -m build
# Install locally
pip install dist/richdaleai_mcp-0.1.0-py3-none-any.whl
From TestPyPI
pip install --index-url https://test.pypi.org/simple/ richdaleai-mcp
Usage
From Terminal
Run the MCP server:
richdaleai-mcp
Set your RunPod API key in a .env file:
RUNPOD_API_KEY=your_api_key_here
RUNPOD_ENDPOINT_ID=your_endpoint_id_here
RUN From MCP Configuration
First install package.
pip install richdaleai-mcp
Configure the server in your mcp.json file:
{
"mcpServers": {
"richdaleai_mcp": {
"command": "python",
"args": ["-m", "richdaleai_mcp"],
"env": {
"RUNPOD_API_KEY": "your_runpod_api_key_here",
"RUNPOD_ENDPOINT": "https://api.runpod.ai/v2/your_endpoint_id/runsync",
"IMAGE_STORAGE_DIRECTORY": "/path/to/image/storage"
}
}
}
}
Environment Variables:
RUNPOD_API_KEY: Your RunPod API keyRUNPOD_ENDPOINT: RunPod endpoint URL for image generationIMAGE_STORAGE_DIRECTORY: Directory to store generated images
Development
Dependencies
- Python 3.11+
- fastmcp
- requests
- python-dotenv
Building
python -m build
Testing
# Install in development mode
pip install -e .
License
This project is licensed under the GNU Affero General Public License v3 - see the LICENSE file for details.
API Response Example
{"delayTime":1036,"executionTime":8805,"id":"sync-2f895f28-d6be-4264-a978-657041fe1754-e1","output":{"images":["data:image/png;base64,iVBORw0KJwFmxrbRK5CYII="],"images_info":{"count":1,"seed":15121496791610440000,"shape":"torch.Size([1, 3, 1024, 1024])"},"input_parameters":{"batch_count":1,"batch_size":1,"build_dynamic_shape":false,"build_static_batch":true,"denoising_steps":30,"framework_model_dir":null,"guidance_scale":3.5,"height":1024,"low_vram":false,"max_sequence_length":256,"negative_prompt":"","num_warmup_runs":0,"prompt":"A simple blue circle on a white background","seed":null,"use_cuda_graph":false,"version":"3.5-large","width":1024},"job_id":"sync-2f895f28-d6be-4264-a978-657041fe1754-e1","message":"Images generated successfully in 7631.47ms","status":"success"},"status":"COMPLETED","workerId":"gz8euubmvp42dr"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file richdaleai_mcp-0.1.0.tar.gz.
File metadata
- Download URL: richdaleai_mcp-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a98089bee011dd3abf743b59f149c77e0ce7b1cdac5e959dec6f8d0d24155f7
|
|
| MD5 |
0d64c541748c1c508f9e5461cecce830
|
|
| BLAKE2b-256 |
22f3e790f047497968279622560fecfa83672ad6aed18608164e397914f8c908
|
File details
Details for the file richdaleai_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: richdaleai_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3245de1eb7ea0cd77eef287f932566eb23c4fc02f896007bac8e109deac73fa1
|
|
| MD5 |
07ab00bd420582447918a270b5e6684c
|
|
| BLAKE2b-256 |
ace9f816a223ad2227dafa9ce7800b84ac2acf3def7b59789d5efe1ad8986d76
|