API reference
MCP server
Use SciFig from Claude, ChatGPT, Claude Code, Codex and Cursor through the remote MCP server.
MCP server#
Server URL: https://mcp.scifig.ai/mcp (Streamable HTTP). Clients that support OAuth connect by signing in to SciFig and approving access; clients that send headers can use an API key as Authorization: Bearer sk_live_….
| Tool | What it does |
|---|---|
| generate_figure | Create a scientific illustration from a prompt |
| edit_figure | Edit an image: instruction (optionally a masked region), white background, aspect ratio, recolor or text replacement |
| detect_text | Find the text in an image before replacing it |
| upscale_figure | Upscale to 2K, 4K or 8K |
| convert_figure | Convert to SVG, PNG, PDF, TIFF or PPTX |
| generate_chart | Plot a chart from CSV or TSV text or JSON rows (up to 1 MB) |
| edit_chart | Change the latest version of a chart |
| generate_flowchart | Draw a flowchart as SVG, optionally from up to 8 attachments |
| edit_flowchart | Change the latest version of a flowchart |
| get_job | Status, credits and download links of a job |
| list_figures | Recent jobs |
| get_credit_balance | Credit balance, plan and limits |
Creation tools wait up to 25 seconds. If a job is still running, call get_job later; calling the creation tool again creates and charges a new job. Results list each download link and, for charts and flowcharts, the link that opens the result in the SciFig editor.
Connect your client#
Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector, enter the server URL, then sign in to SciFig and allow access.
ChatGPT: Settings → Apps → Advanced → Developer mode, create an app with the server URL and OAuth authentication.
Claude Code:
claude mcp add --transport http scifig https://mcp.scifig.ai/mcpCodex (~/.codex/config.toml):
[mcp_servers.scifig]
url = "https://mcp.scifig.ai/mcp"Cursor (~/.cursor/mcp.json), with an API key from Settings → Developer:
{
"mcpServers": {
"scifig": {
"url": "https://mcp.scifig.ai/mcp",
"headers": { "Authorization": "Bearer sk_live_…" }
}
}
}Clients without OAuth can add the header Authorization: Bearer sk_live_… with an API key from Settings → Developer.
Tool parameters#
| Tool | Parameter | Required | Rules |
|---|---|---|---|
| generate_figure | prompt | yes | 3–20,000 characters |
| aspect_ratio | no | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | |
| quality | no | standard, advanced or premium | |
| style | no | One of flat, 2-5d, line-art, hand-drawn, scientific, line, 3d, editorial, sketch, watercolor, auto | |
| palette | no | A palette name of 1–64 characters, or 1–4 #RRGGBB colours | |
| reference_images | no | Up to 3 images: file_id, https URL or data URL; PNG, JPEG or WebP up to 20 MB (data URL about 3 MB, see below) | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| edit_figure | image | yes | file_id, https URL or data URL; PNG, JPEG or WebP up to 20 MB (data URL about 3 MB, see below) |
| operation | no | instruct (default), white_background, aspect_ratio, recolor or replace_text | |
| instruction | for instruct | 1–2,000 characters | |
| mask | no | Only for instruct: a PNG up to 8 MB, white where the image may change | |
| aspect_ratio | for aspect_ratio | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | |
| palette | no | Only for recolor: 1–8 #RRGGBB colours | |
| text_detection | for replace_text | The id returned by detect_text | |
| replacements | for replace_text | 1–256 items [{"index", "text"}]: index 0–255 from detect_text, each index at most once; text 1–500 characters | |
| quality | no | Ignored by replace_text | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| detect_text | image | yes | file_id, https URL or data URL; PNG, JPEG or WebP up to 20 MB (data URL about 3 MB, see below) |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| upscale_figure | image | yes | file_id, https URL or data URL; PNG, JPEG or WebP up to 20 MB (data URL about 3 MB, see below) |
| scale | yes | 2k, 4k or 8k | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| convert_figure | image | yes | file_id, https URL or data URL; PNG, JPEG or WebP up to 20 MB (data URL about 3 MB, see below); or a flowchart’s SVG output by file_id |
| format | yes | svg, png, pdf, tiff or pptx | |
| vector_mode | no | Only with format svg: editable_text or full_vector | |
| dpi | no | Not for svg: 300, 600 or 1000 | |
| width | no | Not for svg; only for flowchart SVG sources: 256–4096 pixels | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| generate_chart | data | data or rows | CSV or TSV text with a header row, up to 1 MB (1,000,000 characters) |
| rows | data or rows | Instead of data: 1–100,000 objects, column name to value; sent as CSV, up to 1 MB | |
| data_format | no | csv or tsv; detected from the first line when omitted | |
| request | yes | What to plot, 1–16,000 characters | |
| chart_types | no | Up to 46 chart types, no duplicates (see charts) | |
| journal_style | no | default, nature, science, cell, plos or acs | |
| figure_width | no | single, onehalf or double | |
| color_palette | no | A palette name (see charts) | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| edit_chart | job_id | yes | The latest chart job |
| instruction | yes | 1–16,000 characters | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| generate_flowchart | prompt | yes | 1–8,000 characters |
| aspect_ratio | no | auto, 16:9, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 21:9 | |
| attachments | no | Up to 8: file_id, https URL or data URL; PDF, DOC, DOCX, Markdown, text, SVG, PNG, JPEG or WebP, up to 32 MB each | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| edit_flowchart | job_id | yes | The latest flowchart job |
| instruction | yes | 1–8,000 characters | |
| idempotency_key | no | Optional; reuse only to retry the same request after a timeout or network error | |
| get_job | job_id | yes | A job id |
| list_figures | limit | no | 1–20 |
| cursor | no | next_cursor of the previous page | |
| get_credit_balance | — | — | No parameters |
generate_chart takes text data only, up to 1 MB. For Excel workbooks (and their sheet_name) or larger files, use POST /charts/generations.
How the tools behave#
- The server is
https://mcp.scifig.ai/mcp(Streamable HTTP). It calls this API on your behalf, so prices, credits, limits and errors are the same. - Image and attachment arguments accept a
file_id, an https URL or a data URL; URLs and data URLs are uploaded first withPOST /files, so they count against the upload limits. SciFig’s own URLs are refused (pass thefile_id), and redirects are followed only to other https addresses. - A request to the MCP server is limited to 4 MB. Base64 makes a file a third larger, so a data URL can carry about 3 MB; pass larger files as an https URL.
- The server checks your credential only on
initializeandtools/call. An expired or revoked token returns401so the client can refresh or sign in again; a banned account, or one being deleted, returns403. - Finished image results are shown inline when they are at most 1 MB; every result includes download links, and chart and flowchart results add the link that opens them in the SciFig editor.
- Every creation uses a new Idempotency-Key unless the assistant passes
idempotency_key, so asking again creates and charges a new job. Useget_jobto follow up. - An error result echoes
idempotency_keyand, when a job exists,job_id. After a timeout or a server error, retry with the same key or callget_job; a refusal such as402 INSUFFICIENT_CREDITSstays stored under its key, so send it again with a new key.