generate_diagramLABSCO SUMMARY
A figure that gets looked at and revised before you ever see it.
The loop that matters is visualizer-to-critic: the generated image is read back against the source text and the caption, and the description is rewritten from what is actually wrong with the picture.
What it is
An agentic pipeline for academic illustration. A planner drafts the diagram from your text, a stylist applies venue guidelines, a visualizer renders it, and a critic reads the rendered image back and rewrites the description — repeating for a set number of rounds or until the critic is satisfied.
What you get
- Eleven MCP tools:
generate_diagram,generate_plot,continue_run,continue_diagram,continue_plot,evaluate_diagram,evaluate_plot,orchestrate_figures,batch_diagrams,batch_plotsanddownload_references - Methodology diagrams from a text file or a PDF with per-page selection, optionally guided by a hand-drawn sketch or a prior figure
- Statistical plots rendered as VLM-generated matplotlib code — no image-generation provider or credentials needed for that path
- Whole-paper figure packages via
orchestrate_figures: the paper is parsed, figures are planned from its section structure, and the output folder carriesfigure_package.json,figures/,figures.texandcaptions.md - Batch runs from a YAML or JSON manifest, with an optional
compositesection that stitches the panels into one labelled figure - Comparative evaluation against a human reference on four dimensions — faithfulness and readability as primary, conciseness and aesthetics as secondary
- Venue style packs for
neurips,icml,aclandieee, with room for your own under~/.config/paperbanana/venues/
Requirements
Python 3.10+ and an API key: an OpenAI key, an Azure OpenAI / Foundry endpoint via OPENAI_BASE_URL, or a Google Gemini key. pip install paperbanana, or run the MCP server without a clone using uvx --from paperbanana[mcp] paperbanana-mcp with GOOGLE_API_KEY in the env. The local web UI needs pip install 'paperbanana[studio]' and PDF input needs paperbanana[pdf]. paperbanana polish requires an image provider that supports guided edits. Note this is a community implementation of a published paper, not affiliated with the original authors, so it may differ from the system described there.
Setup effort
Add the configuration to your client
USE CASES
Drawing the architecture figure for a paper
Point it at your methodology text and a caption. Add --optimize to have the text restructured into diagram-ready form first, and --auto to keep refining until the critic stops objecting.
Plotting results without writing matplotlib
Give it a CSV or JSON file and a sentence of intent. Plots go through generated matplotlib code, so this path needs no image-generation credentials at all.
Producing every figure a paper needs in one pass
Hand it the full paper and a data directory; it plans the methodology figures from the section structure, plans plots from the CSV/JSON it finds, and writes a package with the LaTeX include and the captions.
Checking a generated figure against a human one
Evaluate the generated image against a human reference with the source context and caption, and get scores on faithfulness, readability, conciseness and aesthetics.
Regenerating a whole figure set after a revision
Keep the items in a manifest and re-run the batch. A composite section stitches the panels into a single labelled figure with (a), (b), (c) sub-panels.
Picking up a run you stopped
Continue the latest run or a specific run id with feedback for the critic, rather than starting the pipeline over.
11 tools
Listed in project docs. Your client may show a different list.
generate_plotcontinue_runcontinue_diagramcontinue_plotevaluate_diagramevaluate_plotorchestrate_figuresbatch_diagramsbatch_plotsdownload_referencesBEFORE YOU INSTALL
What to know first
Tools you get
11 tools named in the project's documentation.
Requires
Python 3.10+
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
MCP Clients
Claude Code, Cursor
{
"mcpServers": {
"paperbanana": {
"command": "uvx",
"args": [
"--from",
"paperbanana[mcp]",
"paperbanana-mcp"
],
"env": {
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}Set the key for the provider you use: OPENAI_API_KEY, or GOOGLE_API_KEY for Gemini. One provider key is enough.