genspark-mcp
Click 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., "@genspark-mcpGenerate a 16:9 product hero image of a red sneaker"
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.
genspark-mcp
Use Genspark image and video generation from Claude Code, Codex CLI, or any stdio-compatible MCP client — locally, with your own Genspark account.
genspark-mcp exposes two local MCP servers:
genspark-image-mcp— text-to-image and reference-image generation, withGPT Image 2as the default model.genspark-video-mcp— text-to-video and image-to-video generation through Genspark's video UI.
The browser stays on the user's Mac. There is no hosted API, shared cookie pool, shared account, or server-side credential store.
Unofficial community project. It is not affiliated with or endorsed by Genspark. Genspark's UI, plans, and access policies can change.
The short version
After installing and logging in once, ask a coding agent to call the MCP:
Create a 16:9 product hero image with GPT Image 2.
Save the result and show me the generated path.The agent calls generate_image; the local browser operates the user's own
Genspark session; the generated file is saved under ~/Genspark-MCP/outputs.
The same pattern works for video with generate_video.
Related MCP server: mcp-media-engine
GPT Image 2 and “unlimited” usage
Genspark's current membership guidance lists unlimited AI Image Agent image creation at zero credit cost for Plus and Pro plans. The same guidance says that session-based rate limits and abuse guardrails still apply. This MCP does not bypass those limits.
The accurate promise is therefore:
If the user's Genspark plan and current UI provide access to GPT Image 2, the user can request it repeatedly from Claude Code, Codex CLI, or another local MCP client, subject to Genspark's account, session limits, and policies.
The GPT Image 2 page describes the model's current quality and size options. The MCP passes the requested model, size, and aspect ratio to the UI and refuses to claim success when the UI does not confirm the requested setting.
Supported clients
Client | Support | Setup |
Claude Code | Yes |
|
Codex CLI | Yes | Add the two local stdio servers with |
Other MCP clients | Yes, if they support local stdio | Use |
The MCP protocol is client-neutral. The package's installer is intentionally conservative and only edits Claude Code configuration; Codex and other client configurations are shown explicitly so an existing setup is not overwritten.
Features
Image generation
GPT Image 2by default; also supports the models exposed by the current image UI, such as Nano Banana Pro, Nano Banana 2, Flux 2 Pro, Ideogram V3, Recraft V3, Seedream, and Qwen Image 2.Aspect ratios from
21:9through9:21, including1:1,16:9, and9:16.Image sizes
0.5K,1K,2K, and4K, plus automatic selection.Up to 10 local reference images (
png,jpg,jpeg,webp,gif,bmp,heic, oravif).Reference-image attachment is fail-closed: if one requested image is not attached, generation is stopped instead of silently generating a different image.
Results are saved locally and can be returned inline to the MCP client.
A no-browser
list_optionscall exposes the known model, size, and ratio choices.
Video generation
Text-to-video and image-to-video through the current Genspark video UI.
Model-specific choices such as Gemini Veo, Kling, Seedance, PixVerse, MiniMax, Vidu, Wan, Runway, and other models visible to the logged-in user.
Model, aspect ratio, resolution, duration, count, audio, fast mode, tier, and auto-prompt controls.
Ordered input images for reference, motion-control, and first/last-frame workflows.
list_video_optionsreads the live UI because video controls vary by model.Fail-closed settings: if an explicitly requested setting cannot be applied and read back, the MCP refuses to submit a generation.
dry_run=trueapplies and verifies the requested settings without clicking submit. Use it before a high-tier or multi-output request.
The complete parameter and return-value reference is in
docs/FEATURES.md.
MCP tools
genspark-image-mcp
Tool | Generates media? | Purpose |
| Yes | Generate, save, and optionally return image data |
| No | Check the local Genspark image session |
| No | Return known image models, sizes, and ratios |
generate_image arguments:
Argument | Default | Meaning |
| required | Japanese or English image instruction |
|
| Model name or partial match |
| automatic | For example |
| automatic |
|
|
| Maximum wait in seconds |
|
| Return image data inline as well as saved paths |
| empty | One path, a list, or comma/newline-separated local paths; maximum 10 |
genspark-video-mcp
Tool | Generates media? | Purpose |
| Yes, unless | Generate and save MP4 output |
| No | Check the local Genspark video session |
| No, but opens a browser | Read model-specific live options |
generate_video arguments:
Argument | Default | Meaning |
| required | Japanese or English scene/story instruction |
| empty | Ordered local paths for image-to-video; maximum 10 |
| page default | Exact or partial model name |
| model default |
|
| model default | For example |
| model default | Model-specific seconds |
| model default | Usually |
| unchanged | Enable or disable audio when supported |
| unchanged | Enable or disable fast mode when supported |
| model default |
|
| unchanged | Whether Genspark rewrites the prompt |
|
| Maximum wait in seconds |
|
| Apply/read back settings without submitting |
Install
Requirements:
macOS
Python 3.10 or newer
Claude Code, Codex CLI, or another local stdio MCP client
A Genspark account with access to the requested feature
Internet access for Python packages and Camoufox binaries
git clone https://github.com/stockvalue/genspark-mcp.git
cd genspark-mcp
bash ./install.shThe installer:
Copies the package to
~/Genspark-MCP.Creates
~/Genspark-MCP/.venv.Installs pinned Python dependencies.
Downloads the Camoufox browser binary.
Registers
genspark-image-mcpandgenspark-video-mcpfor Claude Code.Registers
/imageand/videoslash commands.Creates empty
profile_userandoutputsdirectories.
Existing Claude MCP entries or slash commands with different contents are not overwritten automatically. See the installer options with:
bash ./install.sh --helpLogin and verify before generating
Login must be performed by the account owner in the visible browser. Do not send a password, MFA code, cookie, or browser profile to an agent or another person.
cd ~/Genspark-MCP
.venv/bin/python login.py
.venv/bin/python verify_setup.py
.venv/bin/python verify_setup.py --check-loginverify_setup.py starts both MCP servers and checks all six expected tools. It
does not generate an image or video. --check-login additionally checks the
current local session; it returns a non-zero status when either session is not
logged in, which is intentional.
Restart Claude Code or Codex after adding the MCP so the client reloads its
configuration. Client-specific commands are in
docs/CLIENTS.md.
Examples
Claude Code
After installation, use the slash command:
/image 16:9の広告用ヒーロー画像。モデルはGPT Image 2、サイズは2K。Or ask Claude Code directly to call:
Use mcp__genspark-image-mcp__generate_image with model="GPT Image 2",
aspect_ratio="16:9", image_size="2K", and include_images=true.For video:
Use mcp__genspark-video-mcp__generate_video with model="Gemini Veo 3.1",
duration=8, resolution="1080p", audio=false, and dry_run=true first.Codex CLI
Register the local servers once, then ask Codex to call them:
codex mcp add genspark-image-mcp \
--env "GENSPARK_PROFILE=$HOME/Genspark-MCP/profile_user" \
--env "GENSPARK_OUTPUT_DIR=$HOME/Genspark-MCP/outputs" -- \
"$HOME/Genspark-MCP/.venv/bin/python" "$HOME/Genspark-MCP/gs_mcp_server.py"
codex mcp add genspark-video-mcp \
--env "GENSPARK_PROFILE=$HOME/Genspark-MCP/profile_user" \
--env "GENSPARK_OUTPUT_DIR=$HOME/Genspark-MCP/outputs" -- \
"$HOME/Genspark-MCP/.venv/bin/python" "$HOME/Genspark-MCP/gs_video_mcp_server.py"Then start a new Codex session and request GPT Image 2 by name. The MCP
client, not a hosted service, invokes the local browser.
Direct local CLI
The image and video files also expose a JSON-producing CLI for scripts that do not need MCP framing:
cd ~/Genspark-MCP
printf '%s' 'A clean product hero image with Japanese typography' \
| .venv/bin/python gs_mcp_server.py generate --prompt - --model 'GPT Image 2' \
--aspect-ratio 16:9 --image-size 2KThe direct CLI is optional; MCP clients should normally use the tool surface.
Output and local data
Login data stays under
~/Genspark-MCP/profile_user.Generated files stay under
~/Genspark-MCP/outputs.The public repository contains none of those directories or their contents.
genspark_state.json, cookies, MFA data, and generated private media must never be committed or attached to an issue.
Limitations and safety boundary
This package automates a web UI rather than an official Genspark API. A UI change, login challenge, rate limit, plan restriction, or account state can make a tool fail. Generated images and videos are external side effects: check the model, resolution, duration, tier, count, and output path before submitting.
Use only your own account or an account you are explicitly authorized to use. Do not share credentials, reuse another person's browser profile, resell access, bulk-extract service data, or operate a hosted third-party proxy with this package. Read the current Genspark usage guidance and terms before use.
Troubleshooting
Start with docs/TROUBLESHOOTING.md. Common safe
checks are:
cd ~/Genspark-MCP
.venv/bin/python verify_setup.py
.venv/bin/python verify_setup.py --check-login
.venv/bin/python -m pip show mcp camoufox playwrightIf the UI changed, report the redacted error kind, macOS version, Python
version, MCP client, requested model/settings, and whether verify_setup.py
passed. Never include credentials, cookies, or a browser profile archive.
Development and verification
python3 -m pip install -r requirements.txt
python3 scripts/check_public_tree.py
python3 -m compileall -q *.py scripts tests
python3 -m unittest discover -s tests -vCI runs the public-tree check, compilation, and no-generation tests. It does not log in or spend image/video credits. The current local verification status is that all six MCP tools and the isolated installer path have been checked without media generation; live generation still depends on the user's account and the current Genspark UI.
More documentation
docs/CLIENTS.md— Claude Code, Codex CLI, and generic MCP configurationdocs/FEATURES.md— complete tool parameters, behavior, and return datadocs/TROUBLESHOOTING.md— safe diagnosis and issue reportsdocs/LAUNCH_POSTS.md— launch copy, topics, release text, and metricsAI_SETUP_INSTRUCTIONS.md— rules for an agent helping with setupSECURITY.md— security reporting boundary
日本語まとめ
genspark-mcp は、利用者自身のGensparkアカウントをローカルブラウザで使い、Claude Code・Codex CLIなどのコーディングエージェントから画像・動画生成を呼び出す非公式MCPです。画像サーバーの既定モデルは GPT Image 2 で、モデル・比率・サイズ・参照画像を指定できます。動画サーバーはモデルごとの設定を実UIから読み、指定と異なる条件で送信しないfail-closed設計です。
GensparkのPlus/Pro側に画像Agentの無制限枠が表示される場合でも、セッション単位のレート制限と利用規約上のガードレールがあります。「無限に使える」と断定するのではなく、「自分の契約・アカウント・現在のUIの範囲で、CLIから繰り返し呼べる」と理解してください。
License
MIT. See LICENSE.
This server cannot be installed
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 Servers
Alicense-qualityFmaintenanceEnables video generation from text, images, and more through MCP-compatible apps like Claude and Cursor.Last updated50MIT- AlicenseAqualityBmaintenanceMCP server for AI-powered image, audio, and video generation, enabling media creation directly from Claude, Cursor, and other MCP clients.Last updated1151MIT
- AlicenseAqualityDmaintenanceEnables AI photo generation, editing, and video creation from MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.Last updated811MIT
- Alicense-qualityCmaintenanceMCP server that enables Claude Code to generate images using Google's Gemini image generation models.Last updatedMIT
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for Grok Imagine AI video generation
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/stockvalue/genspark-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server