Get the FREE Ultimate OpenClaw Setup Guide →

paperbanana

Open source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio llmsresearch-paperbanana python -m paperbanana \
  --env OPENAI_API_KEY="Your OpenAI API key" \
  --env OPENAI_BASE_URL="Your Azure/OpenAI base URL (if using Azure) or leave blank" \
  --env GOOGLE_GEMINI_API_KEY="Your Gemini API key (if using Gemini)" \
  --env PAPERBANANA_LOG_LEVEL="INFO"

How to use

PaperBanana is exposed as an MCP server that wraps the PaperBanana CLI/Python API, enabling programmatic diagram generation and plotting capabilities within an MCP-compatible workflow. The server exposes a generate workflow accessible via the paperbanana CLI, supporting input text descriptions, optional captioning, and iterative refinement. Typical usage involves running the MCP server locally and then issuing MCP requests to trigger the paperbanana generate command, which orchestrates a multi-agent pipeline to produce publication-quality diagrams and figures from textual input. The server supports multiple providers (OpenAI, Google Gemini) and includes options for input optimization and auto-refinement to improve diagram quality. You can also use the CLI directly via Python import if you need to script or automate diagram generation in your own tooling.

How to install

Prerequisites:

  • Python 3.10 or newer
  • Git (for cloning sources)
  • Network access to install Python packages from PyPI

Option A: Install from PyPI (recommended for most users)

  1. Create and activate a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # Linux/macOS
venv\Scripts\activate.bat # Windows
  1. Install PaperBanana from PyPI:
pip install paperbanana

Option B: Install from source (development mode)

  1. Clone the repository and install development dependencies:
git clone https://github.com/llmsresearch/paperbanana.git
cd paperbanana
pip install -e ".[dev,openai,google]"

Option C: Run as MCP server (Python module)

  1. Ensure dependencies are installed, then start via MCP workflow (see mcp_config):
# As an MCP server entry, the run is typically handled by your MCP orchestrator.
# Example direct invocation (for testing):
python -m paperbanana --help

Additional notes

Environment variables and configuration:

  • OPENAI_API_KEY: required if using OpenAI providers.
  • OPENAI_BASE_URL: set for Azure OpenAI / Foundry endpoints.
  • GEMINI_API_KEY or GOOGLE_GEMINI_API_KEY: required for Google Gemini access.
  • PAPERBANANA_LOG_LEVEL: useful for troubleshooting (default is INFO).

Common issues:

  • Ensure Python 3.10+ is active in your environment.
  • If running behind a proxy, configure HTTP(S)_PROXY accordingly.
  • When using --dev or openai/google integrations, ensure API keys have proper permissions and quota.
  • For MCP integration, confirm the server name in your MCP config matches the actual module entry (paperbanana).

Related MCP Servers

Sponsor this space

Reach thousands of developers