Back to Home
jenreh icon

image.serv

Verified Safe

by jenreh

Overview

Provides an AI-powered server for generating and editing images from text prompts using OpenAI and Google models, accessible via both MCP and REST APIs.

Installation

Run Command
uv run python -m server.server

Environment Variables

  • OPENAI_API_KEY
  • OPENAI_BASE_URL

Security Notes

The server uses environment variables for API keys, preventing hardcoded secrets. It employs a layered architecture which aids in maintainability and potential security reviews. However, the `url_to_bytes` utility function accepts arbitrary URLs for image input, which could pose a Server-Side Request Forgery (SSRF) risk if not properly restricted in a production environment (e.g., to prevent access to internal network resources). Additionally, the `/_upload` endpoint, used for serving generated images, mounts a temporary directory (`TMP_PATH`) using FastAPI's `StaticFiles` with `check_dir=False`. While generated filenames are unique (UUID-based) which mitigates direct path traversal, careful consideration is needed to ensure the `TMP_PATH` has appropriate permissions and is not exposed beyond its intended use.

Similar Servers

Stats

Interest Score0
Security Score7
Cost ClassHigh
Avg Tokens150
Stars0
Forks0
Last Update2025-12-22

Tags

image generationimage editingAIFastAPIMCPDALL-EImagen