Cover image
Try Now
2025-01-03

MCP(模型上下文协议)服务器工具的实现

3 years

Works with Finder

1

Github Watches

3

Github Forks

6

Github Stars

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • XLwebDev.com
  • PR Professional: Guiding You to Get Media Placements and Publicity Quickly and Effectively

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

    Reviews

    5 (1)
    Avatar
    user_zi880Td9
    2025-04-17

    I've been using the primitive-go-mcp-server from prasanthmj and I'm thoroughly impressed. The server is robust and reliable, perfectly suited for my needs as a loyal MCP application user. The setup process is smooth, thanks to the detailed instructions provided. This project truly showcases prasanthmj's expertise and dedication. I highly recommend checking it out if you're looking for a high-quality MCP server solution. Visit the GitHub link for more information: https://github.com/prasanthmj/primitive-go-mcp-server.