xuzhougeng GitHub avatar

ScientificFigureLibrary

xuzhougeng

Scientific Figure Library is a standard MCP server and app for finding, importing, and materializing scientific figure references, with two template sources (FigureYa and User Library) and a strict safety contract that never executes plotting code.

Stars

12

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It provides a structured, agent-driven workflow for scientific figure retrieval and materialization, works with any stdio MCP host (not just Wisp), and includes a built-in visual audit step to ensure template relevance before committing.

Who it is for

  • Researchers who need to quickly find and reuse scientific figure templates
  • Developers building MCP hosts that integrate figure retrieval capabilities
  • Data scientists looking for reproducible plotting code and layouts

Use cases

  • Searching and importing a volcano plot template from the FigureYa library
  • Adding a user’s existing figure and code into a local library for later reuse
  • Materializing a selected template into a project directory for adaptation

Strengths

  • Works with any stdio MCP host, not locked to Wisp
  • Safety contract: never executes plotting code or dependency installers, verifies file integrity with SHA-256
  • Agent-driven workflow: analyzes input, searches, previews, visually audits, then materializes only accepted templates
  • Separate FigureYa Source Pack allows offline distribution of large archive (~3 GiB) without bloating the core plugin

Considerations

  • Materialization errors are terminal – the agent must report failure and wait, with no fallback or substitution allowed
  • Requires Node.js 22 or newer to build and run
  • FigureYa content is CC BY-NC-SA 4.0, which may restrict commercial use of those templates

README quick start

Scientific Figure Library

Scientific Figure Library is a standard MCP server and MCP App for finding, importing, and materializing scientific figure references. It is not tied to Wisp: any stdio MCP host can use it. The included Wisp manifest and Skill are a thin optional adapter.

The first release has two template sources:

  • FigureYa — 319 searchable modules with local thumbnails and commit-pinned archives.
  • User Library — figures and plotting code copied from paths supplied by the MCP host.

The host Agent analyzes an uploaded image, a natural-language request, or a data file. It builds a compact retrieval intent, searches both sources, inspects the top preview, and decides whether that candidate actually matches before materializing anything. The catalog score orders retrieval candidates; it is not a recommendation or visual-similarity score.

For image input, the Agent must first inspect the user's image with the host's view_image, then inspect the top candidate with figure_library_preview. The final recommendation includes an Agent-produced visual pass/reject score covering chart family, layout, axes/geometry, encodings, and annotations/style, plus a separate data-compatibility verdict.

Safety contract

The server copies and extracts reference files but never executes plotting code or dependency installers. It verifies imported user files with SHA-256 and verifies FigureYa archives against the pinned catalog.

Materialization errors are terminal. figure_library_materialize returns a STOP: error that instructs the Agent to report the exact failure and wait for the user. The Agent must not switch extraction modes, use another downloader, fetch the complete repository, recreate the template, or generate a substitute/demo plot. This behavior is covered by the MCP smoke test.

Build

Requirements: Node.js 22 or newer.

npm install
npm run check

Use with any stdio MCP client

{
  "mcpServers": {
    "figure-library": {
      "command": "node",
      "args": ["/absolute/path/to/ScientificFigureLibrary/dist/index.js"],
      "env": {
        "FIGURE_LIBRARY_DIR": "/absolute/path/to/my-figure-library",
        "FIGUREYA_SOURCE_PACK_DIR": "/optional/path/to/FigureYaSourcePack"
      }
    }
  }
}

FIGURE_LIBRARY_DIR defaults to ~/.figure-library. The server exposes:

  • figure_library_open — op

Description

Standard MCP server and MCP App for scientific figure templates from FigureYa and user-supplied references

Related repositories

Similar projects matched by category, topics, and programming language.

mereyabdenbekuly-ctrl
Featured
mereyabdenbekuly-ctrl GitHub avatar

clodex-ide

Clodex is an open-source, local-first agentic IDE that combines persistent AI tasks, code, terminal, browser, Git, models, memory, and governed execution in one Electron workspace, currently in technical preview.

AI & Machine LearningAI Agents
859
0xwilliamortiz
Featured
0xwilliamortiz GitHub avatar

openclaude-improved

OpenClaude is an open-source CLI coding agent that runs on any platform and supports a wide range of LLM providers, offering the same tools and workflows as Claude Code.

AI & Machine LearningLarge Language Models
577
Jakubantalik
Featured
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI & Machine LearningAI Agents
1,191