Ship-ready MCP server for Gemini + Imagen diagram/plot generation. Runs on Claude, ChatGPT, VSCode Copilot, Cursor.
Project description
figurify-mcp
MCP server for Google Gemini + Imagen image generation. Works with Claude Desktop, Claude Code, Cursor, VSCode Copilot, and any MCP-compatible host.
- 5 generation tools — diagrams, infographics, paper figures, matplotlib plots, VLM judging
- Smart model routing across Gemini 2.5 / 3 / 3.1 + Imagen 4 / Nano Banana
- 1K by default to stay under Claude's 1 MB inline tool-result cap
- Stdio + streamable HTTP transports
Install
pip install figurify-mcp # or: uv pip install figurify-mcp
Get a free Gemini API key: aistudio.google.com/apikey
Configure your host
Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"figurify": {
"command": "uvx",
"args": ["figurify-mcp"],
"env": { "GOOGLE_API_KEY": "your-key" }
}
}
}
Claude Code / Cursor
claude mcp add figurify -s user \
-e GOOGLE_API_KEY=$GOOGLE_API_KEY \
-- uvx figurify-mcp
VSCode Copilot — .vscode/mcp.json
{
"servers": {
"figurify": {
"command": "uvx",
"args": ["figurify-mcp"],
"env": { "GOOGLE_API_KEY": "your-key" }
}
}
}
Restart the host. The tools appear automatically.
Tools
| Tool | What it does | Typical cost |
|---|---|---|
create_simple_diagram |
Quick prompt → image | ~$0.04 |
create_infographic |
Topic → styled poster (VLM layout + Imagen render) | ~$0.12 |
create_methodology_diagram |
Paper figure with N critique rounds | ~$0.25 |
create_statistical_plot |
Data → matplotlib chart via VLM codegen | ~$0.002 |
evaluate_diagram |
VLM-as-judge comparison of two diagrams | ~$0.015 |
Meta (save host context): search_tools, describe_tool, recommend_model, estimate_cost, list_available_models.
Prompts: draft_methodology_figure, plan_visual_output.
Resources: figurify://styles/methodology_guidelines, figurify://styles/infographic_guidelines, figurify://catalog/models.
Images return as MCP ImageContent blocks with audience: ["user"] — they render inline in every compliant host.
Configuration
All env vars are optional.
| Variable | Default | Purpose |
|---|---|---|
GOOGLE_API_KEY |
(required) | Gemini + Imagen API key |
FIGURIFY_OUTPUT_DIR |
~/.figurify/outputs |
Where generated PNGs are saved |
FIGURIFY_VLM_MODEL |
(auto-routed) | Pin a specific VLM model |
FIGURIFY_IMAGE_MODEL |
(auto-routed) | Pin a specific image model |
FIGURIFY_MAX_METHODOLOGY_ITERATIONS |
4 |
Upper bound for critique loops |
Transports
figurify-mcp # stdio (default)
figurify-mcp --transport http --host 0.0.0.0 --port 8765
Security
This server runs VLM-generated matplotlib code in a subprocess. Shipped mitigations:
- AST + pattern allowlist rejects any code importing
os,subprocess,socket,urllib,requests,pickle, etc. python -Iisolated mode, minimal env, POSIXsetrlimit(512 MB RAM / 120 s CPU / 100 MB fsize)load_imagerestricts filesystem reads to{output_dir, /tmp, CWD}— no path traversal- API-key patterns and home paths stripped from every error message
Report vulnerabilities privately: genaimanoj@gmail.com. Full threat model in SECURITY.md.
Development
git clone https://github.com/genaimanoj/figurify-mcp
cd figurify-mcp
uv venv && source .venv/bin/activate
uv pip install -e '.[dev]'
cp .env.example .env # set GOOGLE_API_KEY
pytest -q # 64 tests, ~6 s
Contributions welcome — see CONTRIBUTING.md.
License
MIT © 2026 Manoj Bhandari. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file figurify_mcp-0.2.1.tar.gz.
File metadata
- Download URL: figurify_mcp-0.2.1.tar.gz
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6cc94821e4fc5daafc83abe5c0f29b0f65e4aa17cb8238aac228be6de3f7404
|
|
| MD5 |
f91e38be1620b4f43a72ae800aba3264
|
|
| BLAKE2b-256 |
1d342cfea7bcf04f4ff0a278bfb8b7f06e1a31c624b1a279a2688daeaaa04513
|
Provenance
The following attestation bundles were made for figurify_mcp-0.2.1.tar.gz:
Publisher:
ci.yml on genaimanoj/figurify-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
figurify_mcp-0.2.1.tar.gz -
Subject digest:
d6cc94821e4fc5daafc83abe5c0f29b0f65e4aa17cb8238aac228be6de3f7404 - Sigstore transparency entry: 1322628347
- Sigstore integration time:
-
Permalink:
genaimanoj/figurify-mcp@0f08b56def3ce72e0c2c08ed4845b3f1627b1ce9 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/genaimanoj
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0f08b56def3ce72e0c2c08ed4845b3f1627b1ce9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file figurify_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: figurify_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e140f2b9657c36b9e14bcc8c84d781fda8fb1722d2c5edbad14b70fac99d00
|
|
| MD5 |
6ee5263908bb2d64e594d8fb6d9b255d
|
|
| BLAKE2b-256 |
144f275e09c38507710152b041ba5475736c01d033638248bc8312f4e6524883
|
Provenance
The following attestation bundles were made for figurify_mcp-0.2.1-py3-none-any.whl:
Publisher:
ci.yml on genaimanoj/figurify-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
figurify_mcp-0.2.1-py3-none-any.whl -
Subject digest:
b2e140f2b9657c36b9e14bcc8c84d781fda8fb1722d2c5edbad14b70fac99d00 - Sigstore transparency entry: 1322628420
- Sigstore integration time:
-
Permalink:
genaimanoj/figurify-mcp@0f08b56def3ce72e0c2c08ed4845b3f1627b1ce9 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/genaimanoj
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0f08b56def3ce72e0c2c08ed4845b3f1627b1ce9 -
Trigger Event:
push
-
Statement type: