A MCP SSE server for generating images via OpenAI Dall-E model.
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.
- 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.
- JavaScript: 60.4%
- TypeScript: 38.4%
- Dockerfile: 1.2%
- Node.js (v14.0.0 or above)
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/weester-yan/mcp-dalle-sse-server.git cd mcp-dalle-sse-server -
Install dependencies:
npm install
-
Start the server:
npm start
-
Access the server:
Open your web browser and navigate to
http://localhost:3000.
-
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 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.
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
This project is licensed under the MIT License. See the LICENSE file for details.
- OpenAI for providing the Dall-E model.
- The contributors who have helped improve this project.