Back to Home
adamydwang icon

genai-mcp

Verified Safe

by adamydwang

Overview

This server acts as a Model Context Protocol (MCP) gateway for various GenAI image generation and editing services, with optional S3-compatible storage for generated images.

Installation

Run Command
go build . && ./genai-mcp

Environment Variables

  • GENAI_PROVIDER
  • GENAI_BASE_URL
  • GENAI_API_KEY
  • GENAI_GEN_MODEL_NAME
  • GENAI_EDIT_MODEL_NAME
  • GENAI_TIMEOUT_SECONDS
  • GENAI_IMAGE_FORMAT
  • SERVER_ADDRESS
  • SERVER_PORT
  • OSS_ENDPOINT
  • OSS_REGION
  • OSS_ACCESS_KEY
  • OSS_SECRET_KEY
  • OSS_BUCKET
  • LOG_LEVEL
  • LOG_FORMAT
  • LOG_OUTPUT
  • LOG_FILE

Security Notes

The server loads sensitive API keys and OSS credentials from `.env` files or environment variables, which is a good practice. Logging of API keys is masked. The `DownloadImageFromURL` function fetches images from external URLs, which could be a vector for Server-Side Request Forgery (SSRF) if user-provided URLs are not thoroughly validated to prevent access to internal networks or malicious external resources. However, this is an inherent risk of services processing external URLs, and the code itself doesn't show obvious malicious patterns. S3/OSS upload paths use UUIDs to prevent predictable file names.

Similar Servers

Stats

Interest Score33
Security Score7
Cost ClassHigh
Avg Tokens20
Stars1
Forks0
Last Update2025-12-08

Tags

Image GenerationImage EditingGenAIMCP ServerS3 Compatible Storage