mcp-dalle-sse-server
The MCP Dall-E SSE Server is a server-side application that leverages OpenAI's Dall-E model to generate images from text prompts with real-time feedback using Server-Sent Events. It is designed for multiple clients and is developed in JavaScript and TypeScript.
MCP Dall-E SSE Server
A MCP SSE server for generating images via OpenAI Dall-E model.
Description
This project is a server-side implementation that utilizes OpenAI's Dall-E model to generate images based on text prompts. It leverages Server-Sent Events (SSE) to provide a real-time image generation experience.
Features
- Real-time Image Generation: Generate images in real-time using OpenAI's Dall-E model.
- Server-Sent Events: Stream the image generation process to clients using SSE.
- Multi-client Support: Supports multiple SSE clients connecting to the server simultaneously.
- JavaScript and TypeScript: Written primarily in JavaScript and TypeScript for robust and scalable development.
Language Composition
- JavaScript: 60.4%
- TypeScript: 38.4%
- Dockerfile: 1.2%
Getting Started
Prerequisites
- Node.js (v14.0.0 or above)
- Docker (optional, for containerized deployment)
Installation
-
Clone the repository:
git clone https://github.com/weester-yan/mcp-dalle-sse-server.git cd mcp-dalle-sse-server
-
Install dependencies:
npm install
Usage
-
Start the server:
npm start
-
Access the server:
Open your web browser and navigate to
http://localhost:3000
.
Docker Deployment
-
Build the Docker image:
docker build -t mcp-dalle-sse-server .
-
Run the Docker container:
docker run -p 3000:3000 mcp-dalle-sse-server
Configuration
Configuration options can be set using environment variables:
PORT
: The port on which the server will run (default:3000
).OPENAI_API_KEY
: Your OpenAI API key for accessing the Dall-E model.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
License
This project is licensed under the MIT License. See the file for details.
Acknowledgements
- OpenAI for providing the Dall-E model.
- The contributors who have helped improve this project.