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"}
Metadata
Release files for richdaleai-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| richdaleai_mcp-0.1.0.tar.gz | 16.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| richdaleai_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.3 kB
Release files / richdaleai_mcp-0.1.0.tar.gz
| Download URL | richdaleai_mcp-0.1.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a98089bee011dd3abf743b59f149c77e0ce7b1cdac5e959dec6f8d0d24155f7
|
|
BLAKE2b-256 checksum How to use checksums |
22f3e790f047497968279622560fecfa83672ad6aed18608164e397914f8c908
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / richdaleai_mcp-0.1.0-py3-none-any.whl
| Download URL | richdaleai_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3245de1eb7ea0cd77eef287f932566eb23c4fc02f896007bac8e109deac73fa1
|
|
BLAKE2b-256 checksum How to use checksums |
ace9f816a223ad2227dafa9ce7800b84ac2acf3def7b59789d5efe1ad8986d76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|