Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

primitive-go-mcp-server

MCP.Pizza Chef: prasanthmj

primitive-go-mcp-server is a Go implementation of an MCP (Model Context Protocol) server designed to generate images from text descriptions using OpenAI's DALL-E API. It supports automatic handling of image save locations, configurable image dimensions, and robust error handling and logging. This server integrates seamlessly with MCP clients like Claude Desktop, enabling large language models to request and receive generated images in real time. It requires Go 1.19+, an OpenAI API key, and is easily configurable via JSON for environment variables and command paths. This server exemplifies how to build MCP tools that extend LLM capabilities with visual content generation.

Use This MCP server To

Generate images from text prompts in real time Integrate image generation into AI-assisted workflows Automate visual content creation for chatbots Test MCP client-server image generation interactions Configure and manage image output locations automatically

README

MCP Image Generation Server

A Go implementation of an MCP (Model Context Protocol) server that generates images using OpenAI's DALL-E API. This server demonstrates how to build MCP tools that can be used by Large Language Models like Claude.

Features

  • Generate images from text descriptions
  • Automatic handling of save locations
  • Configurable image dimensions
  • Proper error handling and logging
  • Works with Claude Desktop and other MCP clients

Prerequisites

  • Go 1.19 or higher
  • OpenAI API key
  • Claude Desktop (for testing)

Build command

go build -o ./bin/imagegen-go ./main

Configuration

Add this server to your Claude Desktop configuration at ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
   "imagegen-go": {
      "command": "/path/to/imagegen-go/bin/imagegen-go",
      "env": {
        "OPENAI_API_KEY": "your-api-key",
        "DEFAULT_DOWNLOAD_PATH":"/path/to/downloads"
      }
    }
  }
}

Usage

  1. Build the server using the command above
  2. Configure Claude Desktop with your server path and API key
  3. Restart Claude Desktop
  4. Ask Claude to generate images!

Example prompt: "Can you generate an image of a riverside home in cinematic style?"

Implementation Details

This server implements the MCP tools capability and provides a single tool:

  • generate-image: Generates an image from a text prompt using OpenAI's DALL-E

License

MIT License

primitive-go-mcp-server FAQ

How do I configure the primitive-go-mcp-server with Claude Desktop?
Add the server details to Claude Desktop's configuration JSON file, specifying the command path and environment variables like OPENAI_API_KEY and DEFAULT_DOWNLOAD_PATH.
What are the prerequisites for running primitive-go-mcp-server?
You need Go 1.19 or higher, an OpenAI API key, and optionally Claude Desktop for testing the server.
Can primitive-go-mcp-server handle errors during image generation?
Yes, it includes proper error handling and logging to ensure reliable operation.
Is it possible to customize the image dimensions generated by the server?
Yes, the server supports configurable image dimensions to tailor output images to your needs.
Does primitive-go-mcp-server support other MCP clients besides Claude?
Yes, it works with Claude Desktop and other MCP clients that follow the MCP protocol.
How do I build the primitive-go-mcp-server from source?
Use the Go build command: go build -o ./bin/imagegen-go ./main.
Which LLM providers can use this MCP server?
This server is designed for use with OpenAI's DALL-E API and is compatible with LLMs like Claude and Gemini through MCP clients.
Where are generated images saved by default?
Images are saved automatically to the path specified by the DEFAULT_DOWNLOAD_PATH environment variable.