MCP Image Scientific
Provides image generation and editing via Gemini models, including prompt optimization, scientific figure styles (diagrams, charts, maps), strict edit mode, and optional QA validation.
Click on "Deploy 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., "@MCP Image Scientific Create a scientific chart of CO2 vs global temperature, 1900-2020, with axis labels and legend"
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.
MCP Image Scientific
MCP server for publication-quality scientific figures — diagrams, charts, and maps with structured prompts and strict editing. Works with Claude Code, GitHub Copilot, Cursor, and Codex. Powered by Gemini.
Forked from shinpr/mcp-image, extended with scientific figure styles (
scientific_diagram,scientific_chart,scientific_map), strict edit mode, and structured prompt pipelines for academic publishing.
What Makes This Different
Feature | Generic MCP Image | MCP Image Scientific |
Figure styles | None |
|
Edit mode | Creative only |
|
Prompt pipeline | Basic enhancement | Structured prompts with domain-specific rules (axes, legends, scale bars) |
Target audience | General | Researchers, students, academic publishing |
Related MCP server: academic-figures-mcp
Examples
All figures below were generated by this MCP server in a single prompt each.
Scientific Diagram — Snow-Albedo Feedback Loop
figureStyle: "scientific_diagram"
prompt: "Diagram of the snow-albedo feedback loop: solar radiation,
high albedo reflection, warming, snowmelt, darker surface,
lower albedo, more absorption. Circular feedback with labeled arrows."Scientific Chart — Spectral Albedo Curves
figureStyle: "scientific_chart"
prompt: "Line chart: spectral albedo (y: 0-1) vs wavelength (x: 400-2500 nm)
for fresh snow (~0.9), dirty snow (~0.6), glacier ice (~0.3).
Curves decline in NIR. Axis labels, units, legend, grid."Scientific Map — Mediterranean Bathymetry
figureStyle: "scientific_map"
prompt: "Bathymetric and topographic map of the Mediterranean Sea.
Ocean depth in shades of blue, land elevation green to brown to white.
Label seas, straits, major islands. Lat/lon grid, scale bar, legend."Quick Start
1. Get a Gemini API Key
Get your free API key from Google AI Studio.
2. Add the MCP Server
Claude Code (recommended):
claude mcp add mcp-image \
--env GEMINI_API_KEY=your-api-key \
--env IMAGE_OUTPUT_DIR=/absolute/path/to/images \
-- npx -y mcp-image-scientificCursor — add to ~/.cursor/mcp.json:
{
"mcpServers": {
"mcp-image": {
"command": "npx",
"args": ["-y", "mcp-image-scientific"],
"env": {
"GEMINI_API_KEY": "your-api-key",
"IMAGE_OUTPUT_DIR": "/absolute/path/to/images"
}
}
}
}GitHub Copilot (VS Code) — add to .vscode/mcp.json in your project:
{
"servers": {
"mcp-image": {
"command": "npx",
"args": ["-y", "mcp-image-scientific"],
"env": {
"GEMINI_API_KEY": "your-api-key",
"IMAGE_OUTPUT_DIR": "/absolute/path/to/images"
}
}
}
}After saving, click the Start button that appears to initialize the server.
Codex — add to ~/.codex/config.toml:
[mcp_servers.mcp-image]
command = "npx"
args = ["-y", "mcp-image-scientific"]
[mcp_servers.mcp-image.env]
GEMINI_API_KEY = "your-api-key"
IMAGE_OUTPUT_DIR = "/absolute/path/to/images"3. Generate a Figure
Ask your AI assistant:
Generate a scientific diagram showing the carbon cycle
with labeled arrows between atmosphere, ocean, and land.
Use figureStyle: "scientific_diagram".API Reference
generate_image
Single tool for all image operations. Two-stage process: prompt optimization (Gemini 2.0 Flash) then image generation (Gemini 2.0 Flash Image).
Parameter | Type | Required | Description |
| string | Yes | Text description or editing instruction |
| string | — |
|
| string | — |
|
| string | — | Absolute path to source image for editing |
| string | — |
|
| string | — |
|
| string | — | Custom output filename |
| boolean | — | Multi-image blending for composite scenes |
| boolean | — | Keep character appearance across generations |
| boolean | — | Real-world knowledge for landmarks, historical figures |
| boolean | — | Google Search grounding for time-sensitive facts |
| boolean | — | Run QA validation on this figure (requires |
figureStyle Details
Style | Auto-includes | Best for |
| Clean layout, labeled arrows, neutral background | Process flows, concept maps, feedback loops |
| Axis labels with units, legend, grid lines | Line/bar charts, data visualizations |
| Scale bar, north arrow, legend, coordinates | Geographic/spatial figures |
Strict Edit Mode
Use editMode: "strict" with inputImagePath to modify an existing figure while preserving all other elements:
prompt: "Change the 'fresh snow' line from blue to dark green"
editMode: "strict"
figureStyle: "scientific_chart"
inputImagePath: "/path/to/existing-chart.png"Environment Variables
Variable | Required | Description |
| Yes | Google Gemini API key (get one here) |
| No | Absolute path for output images (default: |
| No | Set |
| No | Set |
| No | Model for QA evaluation (default: |
| No | Max retries on hard QA failures (default: |
QA Validation
Post-generation quality assurance powered by Gemini 3.1 Pro. Evaluates scientific figures against style-specific criteria before delivery.
Two ways to enable:
Per-request — just ask: "Generate a chart and validate it" → the assistant passes
validateQa: trueGlobally — set
SCIENTIFIC_QA_ENABLED=trueto validate every scientific figure automatically
Hard checks (must pass — triggers automatic retry on failure):
Spelling accuracy, text readability, clean background, sufficient contrast
Charts: axis labels with units, legend, grid lines
Maps: scale bar, north arrow, legend
Diagrams: labeled arrows, logical flow
Soft checks (advisory — reported but does not block):
Colorblind-friendly palette, balanced layout, title presence
On hard failure, the prompt is automatically patched and the figure regenerated (up to SCIENTIFIC_QA_MAX_RETRIES times).
Attribution
This project is a fork of shinpr/mcp-image by Shinsuke Kagawa. The original server provides general-purpose image generation via Gemini. This fork adds scientific figure styles, strict edit mode, and structured prompt pipelines for academic use.
License
MIT — see LICENSE for full terms.
Available Tools
1 toolgenerate_imageC
Generate image with specified prompt and optional parameters
Inputs: prompt (required), editMode, fileName, imageSize, +8 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of selection confusion between tools. Its purpose (image generation) is unambiguous.
The single tool uses a clear verb_noun snake_case name, generate_image, which is self-explanatory. No inconsistency is possible with one tool.
A single tool is too thin for a server billing itself as 'Image Scientific'; there is no supporting surface such as listing models, checking status, or retrieving/exporting results. One tool leaves the server essentially a one-shot wrapper.
The surface offers only generation with a prompt and vague 'optional parameters'—no way to discover valid parameters, retrieve or save generated images, or refine/upscale outputs. For a scientific image domain this leaves significant lifecycle gaps an agent cannot work around.
Maintenance
Related MCP Connectors
Create and edit scientific figures, generate data charts, and export editable SVG and PowerPoint.
Compose multi-panel scientific figures for 16 journals - aligned axes, print-ready exports.
Clean messy tabular data and render publication-ready PNG charts from your AI assistant.
Create scientific illustrations, data charts and flowcharts with your SciFig account.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides machine learning researchers with tools for creating publication-quality scientific visualizations, statistical plots, and 2D data representations. It streamlines the research workflow by enabling AI assistants to generate complex figures from CSV, JSON, or direct data inputs.9MIT
- AlicenseBqualityDmaintenanceA multi-step academic figure agent harness that enables AI agents to plan, generate, evaluate, and iterate publication-grade figures from sources like PMIDs, preprints, or freeform briefs.143Apache 2.0
- AlicenseBqualityDmaintenanceEnables AI agents to create publication-quality scientific diagrams, flowcharts, and architecture diagrams in OmniGraffle via natural language commands.3710MIT
- FlicenseNot gradedqualityDmaintenanceEnables agents to verify educational, scientific, and engineering visuals by extracting structured evidence and running domain-specific checks against specs and theory.-