Image Generator MCP Server
Enables MCP-compatible clients like Claude or ChatGPT to generate images from text prompts using AI, with options for aspect ratio and quality.
README
Image Generator MCP Server
A Laravel app that exposes AI image generation as a Model Context Protocol (MCP) tool, built with laravel/mcp and laravel/ai. Any MCP-compatible client — Claude, Claude Code, Cursor, ChatGPT, etc. — can call it to generate an image from a text prompt.
What it does
The server registers one tool, generate-image. When an MCP client calls it with a prompt, the tool passes the prompt to the Laravel AI SDK, which generates the image via OpenAI, Gemini, or xAI (whichever provider you've configured), stores the result, and returns the image (or a link to it) back to the client.
Requirements
- PHP 8.2+, Laravel 12.x or 13.x
- An API key for at least one supported image provider
Installation
composer require laravel/mcp laravel/ai
php artisan vendor:publish --tag=ai-routes
php artisan vendor:publish --provider="Laravel\Ai\AiServiceProvider"
php artisan migrate
Add a provider key to .env:
OPENAI_API_KEY=
GEMINI_API_KEY=
XAI_API_KEY=
The server is registered in routes/ai.php:
use App\Mcp\Servers\ImageGeneratorServer;
use Laravel\Mcp\Facades\Mcp;
Mcp::web('/mcp/image-generator', ImageGeneratorServer::class);
How to use it
Point any MCP client at the server's URL:
{
"mcpServers": {
"image-generator": {
"url": "https://your-app.test/mcp/image-generator"
}
}
}
Once connected, just ask the client to generate an image — for example, "generate an image of a private jet" — and it will call the generate-image tool with your prompt and return the result. The tool accepts:
prompt(required) — what to generateaspect_ratio—square,portrait, orlandscape(defaultsquare)quality—low,medium, orhigh(defaultmedium)
If the endpoint requires authentication, add a bearer token to the client config:
{
"mcpServers": {
"image-generator": {
"url": "https://your-app.test/mcp/image-generator",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.