PaperBanana

Turns paper text and data into academic methodology diagrams and statistical plots via image models

By LLMs Research Python Local · stdio DesignAI and MLData and analytics

78 popularity score ★ 2.5k ↓ 10k/mo

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs GOOGLE_API_KEY. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add paperbanana -e GOOGLE_API_KEY=<GOOGLE_API_KEY> -- uvx --from 'paperbanana[mcp]' paperbanana-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "paperbanana": {
      "command": "uvx",
      "args": [
        "--from",
        "paperbanana[mcp]",
        "paperbanana-mcp"
      ],
      "env": {
        "GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "paperbanana": {
      "command": "uvx",
      "args": [
        "--from",
        "paperbanana[mcp]",
        "paperbanana-mcp"
      ],
      "env": {
        "GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "paperbanana": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from",
        "paperbanana[mcp]",
        "paperbanana-mcp"
      ],
      "env": {
        "GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.paperbanana]
command = "uvx"
args = ["--from", "paperbanana[mcp]", "paperbanana-mcp"]

[mcp_servers.paperbanana.env]
GOOGLE_API_KEY = "<GOOGLE_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e GOOGLE_API_KEY=<GOOGLE_API_KEY> paperbanana uvx -- --from 'paperbanana[mcp]' paperbanana-mcp

Settings 12

GOOGLE_API_KEY Required: Gemini API key; used by the default providers.
OPENAI_API_KEY Optional: OpenAI key; use with VLM_PROVIDER=openai and IMAGE_PROVIDER=openai_imagen instead of Gemini.
VLM_PROVIDER Optional: Planning and critique provider: gemini (default), openai, openrouter, atlas, anthropic, bedrock, ollama, litellm and others.
IMAGE_PROVIDER Optional: Image provider: google_imagen (default), openai_imagen, openrouter_imagen, atlas_imagen, bedrock_imagen.
OPENAI_BASE_URL Optional: OpenAI endpoint, or an Azure OpenAI / Foundry URL.
OPENROUTER_API_KEY Optional: Key for the OpenRouter providers.
ATLASCLOUD_API_KEY Optional: Key for the Atlas Cloud providers.
GOOGLE_VLM_MODEL Optional: Overrides the Gemini planning model.
GOOGLE_IMAGE_MODEL Optional: Overrides the Gemini image model.
PAPERBANANA_MAX_IMAGE_BYTES Optional: Size above which returned images are recompressed to JPEG (default 3750000).
PAPERBANANA_CACHE_DIR Optional: Where the reference set is cached (default ~/.cache/paperbanana/).
SKIP_SSL_VERIFICATION Optional: Turns off TLS certificate checks for proxied networks (default false).

What it does

PaperBanana is an open-source Python project that produces figures for research papers. Its MCP server, the `paperbanana-mcp` program in the `paperbanana[mcp]` extra, gives an assistant eleven tools: draw a methodology diagram from a section of text and a caption, draw a statistical plot from JSON data and a stated intent, keep refining an earlier run with feedback, score a generated figure against a human-made reference on four dimensions, plan a whole paper's figure package, run batches from a manifest file, and download a reference set of example diagrams.

The work is done by a chain of agents (retriever, planner, stylist, visualizer, critic) that call a vision-language model and an image-generation model from a provider you choose: Gemini, OpenAI or Azure OpenAI, OpenRouter, Atlas Cloud, Anthropic, AWS Bedrock, Ollama or LiteLLM among them. Plots are drawn by matplotlib code the model writes. Results are saved under an `outputs` folder and the image is returned to the client.

In version 0.3.0 the server builds its settings from environment variables and a `.env` file only, and those default to Gemini (`gemini-2.5-flash` for planning and critique, `gemini-3-pro-image-preview` for images), not the OpenAI defaults the main README's provider table and the CLI config describe (core/config.py, providers/registry.py). Returned images larger than 3,750,000 bytes are recompressed to JPEG to stay under Claude's tool-result limit; `PAPERBANANA_MAX_IMAGE_BYTES` changes that cap (mcp_server/server.py).

The project is an unofficial reimplementation of the PaperBanana research paper and says it is not affiliated with the paper's authors, Google Research or Peking University.

What it needs

RuntimePython 3.10+

Python 3.10 or later and uv, since the documented command uses `uvx`. An API key for an image-capable model provider: a Google Gemini key by default, or an OpenAI, OpenRouter, Atlas Cloud or Bedrock account with the provider variables set. Model calls are billed by the provider; the README lists Gemini image generation at $0.134 per 1K image.

Limits

With only `OPENAI_API_KEY` set, as in the mcp_server README's Claude Code and Cursor examples, version 0.3.0 still picks the Gemini providers and stops with a missing `GOOGLE_API_KEY` error; set `VLM_PROVIDER=openai` and `IMAGE_PROVIDER=openai_imagen` as well. In `generate_diagram` and `generate_plot`, `optimize` and `auto_refine` default to off in the code although their descriptions say on; the fixed loop runs 3 refinement rounds by default and auto-refine stops at 30. The reference set fetched by `download_references` is about 254 MB. Output quality depends on the chosen models, and the project warns its results may differ from the original paper's system.

Who it suits

Suits researchers who want draft methodology figures and charts generated from their own paper text or results inside Claude Code, Cursor or another stdio client, and who accept paying a model provider per image. It runs on your machine and writes into a local folder, so it fits single-user desktop setups rather than shared hosting. People who need exact, hand-editable vector diagrams or a fixed chart library output with no model calls should use a plotting or diagramming tool directly, since every figure here comes from a generative model.

Tools 11

generate_diagram
Draws a methodology diagram from paper text and a caption, optionally guided by sketch images
generate_plot
Draws a statistical plot from JSON data and a description of what it should show
continue_run
Resumes an earlier run folder for more refinement rounds, with optional feedback
continue_diagram
Resumes a methodology diagram run and returns the file paths as JSON
continue_plot
Resumes a statistical plot run and returns the file paths as JSON
evaluate_diagram
Scores a generated diagram against a human reference image on four dimensions
evaluate_plot
Scores a generated plot against a human reference image on four dimensions
orchestrate_figures
Plans, and optionally generates, the full set of figures for a paper
batch_diagrams
Runs a batch of methodology diagrams listed in a manifest file
batch_plots
Runs a batch of statistical plots listed in a manifest file
download_references
Downloads and caches the PaperBananaBench example set used for retrieval

Similar servers