ImageAPI AI MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ImageAPI AI MCP ServerGenerate a high-quality 1024x1024 image of an astronaut riding a horse on Mars."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ImageAPI AI MCP Server (@imageapiai/mcp)
Official Model Context Protocol (MCP) server for ImageAPI AI. Connects AI coding assistants and agents (such as Cursor, Claude Desktop, and Windsurf) to generate high-resolution images, refine prompts for 0 credits, and inspect account credits directly within your development workflows and chat sessions.
⚡ Quick Start
1. Claude Desktop Setup
Add the following to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"imageapiai": {
"command": "npx",
"args": ["-y", "@imageapiai/mcp"],
"env": {
"IMAGEAPIAI_API_KEY": "sk_live_YOUR_API_KEY_HERE"
}
}
}
}2. Cursor IDE Setup
Add to your project root under .cursor/mcp.json (or globally in ~/.cursor/mcp.json):
{
"mcpServers": {
"imageapiai": {
"command": "npx",
"args": ["-y", "@imageapiai/mcp"],
"env": {
"IMAGEAPIAI_API_KEY": "sk_live_YOUR_API_KEY_HERE"
}
}
}
}3. Windsurf Setup
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"imageapiai": {
"command": "npx",
"args": ["-y", "@imageapiai/mcp"],
"env": {
"IMAGEAPIAI_API_KEY": "sk_live_YOUR_API_KEY_HERE"
}
}
}
}Related MCP server: imagegen-mcp
🛠️ Available MCP Tools
Once installed, your AI agent has native access to the following 4 tools:
1. generate_image
Generates a new AI image from scratch based on a primary text prompt. Deducts standard credits from your account balance.
Parameters:
prompt (string, required): Primary text prompt describing the image to generate.
width (number, optional, default: 512): Width in pixels (min: 256, max: 2048).
height (number, optional, default: 512): Height in pixels (min: 256, max: 2048).
quality (string, optional, default: "medium"): Inference quality preset ("low", "medium", "high").
Example Prompt to AI:"Generate a 1024x1024 high quality cyberpunk city street in the rain."
Output: Returns JSON containing image_url, prompt_id, credits_remaining, and credits_deducted.
2. refine_image
Refines an existing image by appending modifications to the original prompt. Allows up to 5 free retries per generation ID for 0 credits.
Parameters:
parent_prompt_id (string, required): The prompt_id or generation_id of the original base image.
prompt_update (string, required): Additions or modifications to append to the base prompt.
quality (string, optional, default: "medium"): Optional quality level override ("low", "medium", "high").
Example Prompt to AI:"Take image gen_a1b2c3d4e5f6 and refine it: add golden neon reflections on the ground."
Output: Returns JSON containing the updated image_url, retries_remaining, and effective_prompt.
3. get_profile
Fetches user account details, current subscription status, and remaining monthly and purchased credit balance.
Parameters: None
Example Prompt to AI:"Check how many ImageAPI credits I have left."
Output: Returns JSON with email, credit_balance, monthly_credits, purchased_credits, and subscription_status.
4. get_history
Retrieves a list of recent historical image generations and their CDN asset URLs associated with the authenticated account.
Parameters: None
Example Prompt to AI:"List my latest 5 generated images from ImageAPI."
Output: Returns an array of historical image objects containing generation_id, original_prompt, prompt_text, r2_image_url, and retry_number.
🔑 Environment Variables
Variable | Description |
IMAGEAPIAI_API_KEY | Your secret API key (sk_live_...). Obtainable from imageapiai.com/dashboard. |
IMAGEAPI_API_KEY | Supported alias fallback. |
NEXT_PUBLIC_IMAGEAPIAI_API_KEY | Supported frontend/Next.js environment fallback. |
🔗 Resources |
Website: https://imageapiai.com
Dashboard & API Keys: https://imageapiai.com/dashboard
API Documentation: https://imageapiai.com/docs
Showcase Gallery: https://imageapiai.com/showcase
npm Package: https://www.npmjs.com/package/@imageapiai/mcp
📄 License
MIT © ImageAPI AI
Available Tools
4 toolsgenerate_imageA
Generate a fresh high-resolution AI image from a text prompt. Deducts credits from your ImageAPI account.
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Image width in pixels (Default: 512). Range: 256 to 2048. | |
| height | No | Image height in pixels (Default: 512). Range: 256 to 2048. | |
| prompt | Yes | The detailed text prompt describing the image to generate. | |
| quality | No | Inference quality level (Default: medium). | medium |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the transparency burden. It discloses a key side effect—credit deduction from the ImageAPI account—which is valuable. However, it doesn't mention other behaviors like output format, storage, or any limitations beyond credits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single well-structured sentence with no fluff. It front-loads the primary action ('Generate a fresh high-resolution AI image') and includes the key side effect efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should explain what the tool returns (e.g., URL, file object) or any prerequisites. It omits this entirely, leaving the agent without critical information about the tool's result. The credit deduction is helpful but insufficient for full contextual understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds minimal parameter meaning beyond the schema, only mentioning 'text prompt' and 'high-resolution' without further detail. No additional context is provided for width, height, or quality.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Generate') and resource ('AI image'), clearly distinguishing this tool from siblings like 'refine_image' by specifying 'fresh' from a text prompt. It unambiguously states the core function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for creating new images from prompts, but does not explicitly contrast with alternatives like refine_image. No when-to-use or when-not-to-use guidance is provided beyond the basic action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_historyA
Retrieve a list of all historical AI image generations associated with your ImageAPI account.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must carry the transparency burden. It does state a read-only action ('Retrieve') and the scope ('all historical'), but it does not disclose potential pagination, result ordering, response format, or any rate limits. This is adequate for a simple list operation but leaves some behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that states the action, resource, and scope without extraneous words. Every word is informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description is complete enough to understand the tool's function and how it differs from siblings. It tells the user exactly what will be returned—a list of historical generations. It could mention the structure of each generation entry, but that is not critical for an AI agent selecting the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema coverage is 100%, so there is no parameter ambiguity. The description adds the useful context that the history is 'all' and account-wide, which complements the empty schema. Baseline for a no-parameter tool is met.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Retrieve' with a clear resource, 'historical AI image generations,' scoped to the user's account. It clearly distinguishes this from sibling tools like generate_image and refine_image by focusing on viewing history rather than creating or modifying.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies the tool is for viewing past generations, and sibling names (generate_image, refine_image) reinforce the contrast. However, it does not explicitly mention when not to use it or name alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_profileA
Fetch your ImageAPI account profile, credit balance, monthly allowance, and active subscription status.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The verb 'Fetch' clearly implies a read-only operation, and the description enumerates exactly what data is returned. However, it does not disclose potential errors, authentication requirements, or rate limits, which would be valuable additional context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently lists all the data points included in the profile. Every word adds value, and there is no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (no parameters, no output schema) and the clear sibling context, the description is sufficiently complete. It explains exactly what the tool does and what information it retrieves, which is all a user needs to decide to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. The description adds no parameter-specific semantics, but none are needed since the schema is empty and the tool is a simple fetch operation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Fetch' with the resource 'your ImageAPI account profile' and lists concrete details (credit balance, monthly allowance, subscription status). This clearly distinguishes the tool from siblings like generate_image, refine_image, and get_history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving account/profile information but does not explicitly state when to use it versus alternatives, nor does it mention any exclusions. Given the sibling context, the intended use is fairly obvious, but the description itself offers no clear guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
refine_imageA
Refine or modify an existing generated image for 0 credits (up to 5 free retries per parent prompt ID). Appends prompt modifications to the locked base prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Optional width override in pixels. | |
| height | No | Optional height override in pixels. | |
| quality | No | Optional quality level override. | |
| prompt_update | Yes | Additional text instructions or modifications to append to the base prompt. | |
| parent_prompt_id | Yes | The prompt_id or generation_id of the original image generation. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses important behaviors: cost (0 credits), retry limit (5 per parent prompt ID), and that modifications are appended to the locked base prompt (implying additive changes). It doesn't mention output format or failure modes, but the core behavioral traits are covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff. Every word adds useful info: cost, retries, and the append behavior. Well-structured and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, 100% schema coverage, and no output schema, the description covers purpose, cost, retry limit, and prompt handling. It doesn't describe the response format, but for a refinement tool this may not be critical. The description is sufficiently complete for selection and basic invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining that prompt_update is appended to the base prompt and that parent_prompt_id refers to the original generation, which clarifies the relationship between parameters and the tool's operation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs ('Refine or modify') and a clear resource ('existing generated image'), distinguishing it from sibling tools like generate_image. It also mentions appending prompt modifications to the locked base prompt, which clarifies its unique function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: for modifying existing images with 0 credits and up to 5 free retries per parent prompt ID. It provides a strong reason to use this tool over generate_image, even if it doesn't explicitly state 'use when you want to edit an existing image rather than create a new one.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: generate creates new images, refine modifies existing ones, get_profile retrieves account data, and get_history lists past generations. No overlap or ambiguity between tools.
All tool names follow a consistent verb_noun pattern: generate_image, refine_image, get_profile, get_history. This makes the API predictable and easy to navigate.
With only 4 tools, the server is well-scoped for its purpose. Each tool covers a core capability without redundancy or bloat.
The surface covers the full lifecycle of image generation (create, refine) plus account management (profile, history). No obvious gaps for an image generation API.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for Qwen Image 3 AI image generation
Generate AI images and videos from any compatible MCP client.
MCP server for Flux AI image generation
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API. It allows users to create new images from text, modify existing files, and perform iterative edits through natural language prompts.6758MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps OpenAI's image generation and editing APIs, enabling text-to-image and image-to-image operations via tools.24938ISC
- FlicenseNot gradedqualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.
- FlicenseAqualityDmaintenanceMCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.2
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ImageAPIAI/imageapiai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server