Artifex MCP
Enables AI image generation via Antigravity (Google Gemini) and OpenAI DALL-E 3, supporting text-to-image, image editing, multiple outputs, and character consistency.
README
<p align="center"> <img src="assets/icon.png" alt="Artifex MCP" width="128" height="128"> </p>
<h1 align="center">Artifex MCP</h1>
⚠️ UNOFFICIAL TOOL: This is an independent, community-developed MCP server. It is not affiliated with, endorsed by, or supported by Google or OpenAI. Use at your own risk.
MCP (Model Context Protocol) server for AI image generation supporting multiple providers:
- Antigravity (default) - Google's Gemini 3 Pro Image model
- OpenAI - DALL-E 3
Features
- Multi-Provider Support: Switch between Antigravity and OpenAI with a simple parameter
- Text-to-Image: Generate images from text descriptions
- Image Editing: Modify existing images with text instructions (Antigravity only)
- Multiple Outputs: Generate up to 4 image variations per request (Antigravity only)
- Character Consistency: Session-based generation for consistent characters (Antigravity only)
- Multiple Aspect Ratios: 1:1, 16:9, 9:16, 3:4, 4:3, and more
Installation
Run directly with npx (recommended):
npx artifex-mcp
Or install globally:
npm install -g artifex-mcp
Authentication
Antigravity (Default)
npx artifex-mcp --login
This will:
- Open your browser for Google OAuth
- Store credentials securely in
~/.config/artifex-mcp/auth.json
OpenAI
Set the OPENAI_API_KEY environment variable:
export OPENAI_API_KEY=sk-...
Usage
As an MCP Server
Add to your MCP client configuration:
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"artifex": {
"command": "npx",
"args": ["artifex-mcp"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
OpenCode:
{
"mcp": {
"artifex": {
"type": "local",
"command": ["npx", "artifex-mcp"],
"enabled": true,
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Environment Variables
| Variable | Description | Default |
|---|---|---|
DEFAULT_IMAGE_PROVIDER |
Default provider to use | antigravity |
DEFAULT_IMAGE_MODEL |
Default model for the provider | gemini-3-pro-image |
OPENAI_API_KEY |
API key for OpenAI provider | - |
Provider Selection
Use the model parameter with provider:model format:
# Use Antigravity (default)
generate_image({ prompt: "a cat" })
# Use OpenAI DALL-E 3
generate_image({ prompt: "a cat", model: "openai:dall-e-3" })
# Use a specific Antigravity model
generate_image({ prompt: "a cat", model: "antigravity:gemini-3-pro-image" })
Available Tools
generate_image
Generate images from text prompts.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | Yes | - | Image description or editing instruction |
model |
string | No | env default | Provider and model in provider:model format |
aspect_ratio |
enum | No | "1:1" | 1:1, 16:9, 9:16, 3:4, 4:3, 2:3, 3:2, 4:5, 5:4, 21:9 |
output_path |
string | No | cwd | Directory to save images |
file_name |
string | No | auto | Custom filename |
input_image |
string | No | - | Path to image for editing (Antigravity only) |
count |
number | No | 1 | Number of images 1-4 (Antigravity only) |
session_id |
string | No | - | For character consistency (Antigravity only) |
Examples:
# Default provider (Antigravity)
Generate a cyberpunk cityscape at night
# Using OpenAI
Generate a cyberpunk cityscape at night, model: openai:dall-e-3
# Multiple images (Antigravity only)
Generate 4 variations of a majestic dragon, aspect ratio 16:9
# Character consistency (Antigravity only)
Create a hero named Luna, session_id: luna
auth_status
Check authentication status for a provider.
| Parameter | Type | Required | Description |
|---|---|---|---|
provider |
string | No | Provider to check (default: antigravity) |
auth_login
Get instructions for authenticating with a provider.
auth_logout
Delete stored credentials for a provider.
quota_status
Check rate limit and quota status for a provider.
Provider Capabilities
| Feature | Antigravity | OpenAI |
|---|---|---|
| Text-to-Image | ✅ | ✅ |
| Image Editing | ✅ | ❌ |
| Multiple Images | ✅ (1-4) | ❌ (1 only) |
| Sessions | ✅ | ❌ |
| Aspect Ratios | ✅ | ✅ (limited) |
| Auth Type | Google OAuth | API Key |
File Locations
| Purpose | Location |
|---|---|
| Credentials | ~/.config/artifex-mcp/auth.json |
| Sessions | ~/.cache/artifex-mcp/sessions/ |
| Generated Images | Current working directory (or custom path) |
Troubleshooting
"Not authenticated" error (Antigravity)
npx artifex-mcp --login
"OpenAI API key not found" error
Set the environment variable:
export OPENAI_API_KEY=sk-...
Rate limit exceeded
Wait for the time indicated in the error message. Rate limits are enforced per-account.
Unsupported feature error
Some features are only available on specific providers. For example:
session_idonly works with Antigravityinput_image(editing) only works with Antigravitycount > 1only works with Antigravity
License
MIT
<details> <summary><strong>Legal</strong></summary>
Intended Use
- Personal / internal development only
- Respect quotas and data handling policies
- Not for production services or bypassing intended limits
Warning
By using this plugin, you acknowledge:
- Terms of Service risk — This approach may violate ToS of AI model providers
- Account risk — Providers may suspend or ban accounts
- No guarantees — APIs may change without notice
- Assumption of risk — You assume all legal, financial, and technical risks
Disclaimer
Not affiliated with Google or OpenAI. This is an independent open-source project.
"Antigravity", "Gemini", "Google Cloud", "Google", "OpenAI", and "DALL-E" are trademarks of their respective owners.
</details>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。