Skip to main content
Glama
suparse

Suparse MCP Server

Official
by suparse

Suparse MCP Server

MCP stdio server for the Suparse Document Processing API. Use it from local MCP clients such as Claude Code and Codex to extract structured data from documents into JSON, CSV, XLSX, or Google Sheets; process single files or folders; let Suparse auto-detect extraction schemas or apply your team templates; split mixed multi-page documents; and download or clean up results by document ID.

Security Boundary

This is a local stdio MCP server. Connected MCP clients can ask it to read local document paths and write export files wherever the server process has permission. Only connect it to MCP clients and workspaces you trust.

Related MCP server: Mineru MCP Server

Requirements

  • A Suparse API key

  • Node.js 20+

Authentication

The MCP server reads credentials from:

  1. SUPARSE_API_KEY

  2. ~/.config/suparse/config.json

You can optionally override the API base URL with SUPARSE_API_URL, or pass api_url to individual MCP tools.

Claude Code

claude mcp add suparse -e SUPARSE_API_KEY=your_api_key -- npx -y @suparse/mcp

Claude Desktop

Open your config file at ~/Library/Application Support/Claude/claude_desktop_config.json on Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows. Add Suparse to the mcpServers section:

{
  "mcpServers": {
    "suparse": {
      "command": "npx",
      "args": ["-y", "@suparse/mcp"],
      "env": {
        "SUPARSE_API_KEY": "your_api_key"
      }
    }
  }
}

Codex

Add this to ~/.codex/config.toml or a project-scoped .codex/config.toml:

[mcp_servers.suparse]
command = "npx"
args = ["-y", "@suparse/mcp"]

[mcp_servers.suparse.env]
SUPARSE_API_KEY = "your_api_key"

Tools

  • extract_file: Process one local document. Defaults to result_mode: "defer", returning compact task_id/document_ids metadata for later download_results. Use result_mode: "return_json" only when the full JSON extraction is needed in the MCP response.

  • extract_folder: Process supported files in one local folder. Defaults to result_mode: "defer", returning compact task_id/document_ids metadata for later download_results. Use result_mode: "return_json" only when full JSON extractions are needed in the MCP response.

  • list_templates: List summary metadata for templates, grouped into directly usable team_templates and discovery-only system_templates.

  • fetch_json_results: Fetch JSON extraction results by document ID directly in the MCP response. Use only when full JSON is needed in context.

  • download_results: Fetch an export by document ID and write it directly to local disk. Use this for json, csv, xlsx, and google_sheets.

  • delete_documents: Delete documents by ID.

Export Formats

fetch_json_results accepts:

Input

Values

Default

export_type

original, unified

unified

JSON exports are returned as structured results.

download_results accepts json, csv, xlsx, and google_sheets, plus an optional output_path local file path or existing directory. It writes the export directly to disk and returns the saved output_path. MCP clients should use download_results for CSV, XLSX, Google Sheets, and saved JSON files; they should not fetch base64 data and decode it with shell or Python.

result_mode controls whether extraction results in JSON format are returned directly. Use return_json only when you need the full JSON extraction in the MCP response. In all other cases you can retrieve the results in the format of your choice using download_results.

Important: cleanup on extract_file and extract_folder is only valid with result_mode: "return_json". It fetches JSON and then deletes the processed Suparse documents, so later exports cannot be fetched from those document IDs. For CSV/XLSX/Google Sheets or saved JSON files, run extract_file or extract_folder with result_mode: "defer", call download_results, then call delete_documents.

Template Selection for MCP Agents

MCP agents should use only team_templates when passing template_id to extract_file or extract_folder.

When a user asks to process a document type such as a receipt:

  1. Check team_templates first and use the matching team template if present.

  2. If no matching team template exists, call list_templates with include_system: true and check system_templates.

  3. If a matching system template exists, ask the user to add that system template to their templates in the Suparse UI before processing. Do not pass the system template ID directly to extraction.

  4. If no matching team or system template exists, ask the user to create a custom extraction schema for that document type in the Suparse UI.

Development

Build the package:

pnpm build

Test with MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.mjs

The MCP server uses stdout for JSON-RPC protocol messages. Do not add console.log output to the server path; use stderr or MCP tool responses.

Available Tools

6 tools
delete_documentsDelete DocumentsB

Delete one or more documents from Suparse by document ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
api_urlNoOptional API base URL. Defaults to SUPARSE_API_URL or Suparse production API.
document_idsYesSuparse document IDs to delete.

Output Schema

ParametersJSON Schema
NameRequiredDescription
deletedYes
document_idsYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description only says 'delete' which implies a destructive action but lacks details on whether it is hard/soft delete, impact on related resources, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, direct sentence with no redundancy or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a delete tool with two parameters, the description is minimal but functional. It does not mention the optional api_url parameter or the irreversible nature of deletion, but given the output schema exists, it is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are already documented. The description adds only the phrase 'by document ID', which adds minimal meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete' and the resource 'one or more documents from Suparse', specifying the method 'by document ID'. This distinguishes the tool from siblings like extract_file or list_templates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no note about irreversibility of deletion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

download_resultsDownload ResultsA

Fetch an export for one or more Suparse document IDs and write it directly to local disk. Use this for CSV, XLSX, Google Sheets, and saved JSON files. Do not call fetch_json_results unless you intentionally need full JSON in the MCP response. If output_path is a directory, the API-provided filename is used inside that directory. If cleanup is needed, call delete_documents after this tool succeeds.

ParametersJSON Schema
NameRequiredDescriptionDefault
formatYesExport format to write to local disk. Use this tool for csv and xlsx.
api_urlNoOptional API base URL. Defaults to SUPARSE_API_URL or Suparse production API.
export_typeNoExport mode for csv, xlsx, and google_sheets. Defaults to unified.
output_pathNoOptional local output file path or existing directory. When omitted, writes to the current working directory using the API-provided or generated filename.
document_idsYesSuparse document IDs to export.

Output Schema

ParametersJSON Schema
NameRequiredDescription
formatYes
export_typeYes
output_pathYes
document_idsYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses disk writing, directory behavior for output_path, and cleanup. Lacks details on overwrite behavior, permissions, or error handling, but adequate for typical export tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, then usage and behavioral notes. No redundancy, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given schema coverage and presence of output schema, the description covers main purpose, usage guidance, and key behavioral aspects. Slight gap in optional parameters like api_url and export_type, but schema handles them.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so each parameter is documented. The description adds value by explaining output_path directory behavior and format use cases, but does not provide deep additional semantics beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches an export and writes to local disk, specifies formats (CSV, XLSX, Google Sheets, saved JSON), and distinguishes from sibling fetch_json_results.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises when to use this tool versus fetch_json_results, mentions cleanup with delete_documents, and provides guidance on output_path behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_fileExtract FileA

Process one local document through Suparse. Defaults to result_mode defer, which uploads and polls only, then returns compact task_id/document_ids for later download_results. Use result_mode return_json only when you need the full JSON extraction in the MCP response. cleanup is only valid with return_json.

ParametersJSON Schema
NameRequiredDescriptionDefault
splitNoEnable auto-splitting of multi-page documents with mixed document types.
api_urlNoOptional API base URL. Defaults to SUPARSE_API_URL or Suparse production API.
cleanupNoOnly valid with result_mode return_json. Deletes processed Suparse documents after JSON results are returned, so later exports cannot be fetched from those document IDs.
file_pathYesLocal path to a supported document file.
result_modeNoControls whether extraction results in json format are returned directly. Use return_json only when you need the full JSON extraction in the MCP response. In all other cases you can retrieve the results in format of choice using download_resultsdefer
template_idNoOptional extraction template ID. Use only a non-system team template ID from list_templates. Do not pass system template IDs directly; ask the user to add the matching system template to their templates first. Omit to let Suparse auto-detect.

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalYes
failedYes
succeededYes
result_modeYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses default mode (defer), behavior (uploads, polls, returns task_id/document_ids), and cleanup side effect (deletes documents). It does not mention rate limits, error handling, or idempotency, but covers the main behavioral traits adequately.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted words. Front-loaded with the primary purpose, then conditional details. Efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters and an output schema, the description covers the key behaviors and parameter interactions. It could mention the output schema briefly, but the context is sufficient for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds value by explaining defaults, mode conditions, cleanup validity, and template_id usage guidance (avoiding system template IDs). This goes beyond the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it processes one local document through Suparse, with default behavior and mode options. Distinguishes from siblings like extract_folder and list_templates by specifying 'one local document' and mentioning related tools for retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly describes when to use defer vs return_json, and that cleanup is only valid with return_json. Also references download_results for other formats. However, it does not explicitly exclude use cases or mention when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_folderExtract FolderA

Process all supported files in an immediate local folder through Suparse. Defaults to result_mode defer, which uploads and polls only, then returns compact task_id/document_ids for later download_results. Use result_mode return_json only when you need full JSON extractions in the MCP response. cleanup is only valid with return_json.

ParametersJSON Schema
NameRequiredDescriptionDefault
splitNoEnable auto-splitting of multi-page documents with mixed document types.
api_urlNoOptional API base URL. Defaults to SUPARSE_API_URL or Suparse production API.
cleanupNoOnly valid with result_mode return_json. Deletes processed Suparse documents after JSON results are returned, so later exports cannot be fetched from those document IDs.
folder_pathYesLocal folder containing supported document files.
result_modeNoControls whether extraction results in json format are returned directly. Use return_json only when you need the full JSON extraction in the MCP response. In all other cases you can retrieve the results in format of choice using download_resultsdefer
template_idNoOptional extraction template ID. Use only a non-system team template ID from list_templates. Do not pass system template IDs directly; ask the user to add the matching system template to their templates first. Omit to let Suparse auto-detect.

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalYes
failedYes
succeededYes
result_modeYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses default result_mode and cleanup constraints, but lacks details on side effects like file deletion or non-idempotency. No annotations provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with main action, no redundant words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema present; description covers return values (task_id/document_ids vs JSON) and main complexity, though some parameters (split) lack behavioral context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all parameters 100%; description adds value for result_mode (defer vs return_json) and template_id (system template warning).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it processes all supported files in a folder via Suparse, distinct from extract_file and other siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains when to use defer vs return_json and cleanup validity, but doesn't explicitly exclude alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_json_resultsFetch JSON ResultsA

Fetch JSON extraction results for one or more Suparse document IDs directly in the MCP response. This can be large; use only when you need the full JSON in context. For CSV, XLSX, Google Sheets, or saved JSON files, use download_results. If you need cleanup after fetching, call delete_documents after this tool succeeds.

ParametersJSON Schema
NameRequiredDescriptionDefault
api_urlNoOptional API base URL. Defaults to SUPARSE_API_URL or Suparse production API.
export_typeNoExport mode for JSON results. Defaults to unified.
document_idsYesSuparse document IDs to export.

Output Schema

ParametersJSON Schema
NameRequiredDescription
formatYes
resultsYes
export_typeYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses potential large response and that it returns results directly in MCP response. Lacks specifics on error handling or authentication, but adequately covers key behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with verb, no wasted words. Each sentence adds distinct value: purpose, usage caveat, alternatives, and post-step.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given complexity (3 params, output schema), description fully covers what the tool does, when to use it, alternatives, and follow-up actions. No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all parameters. Description adds no additional meaning beyond schema. Baseline score of 3 is appropriate as schema already documents parameter purposes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it fetches JSON results for Suparse document IDs directly in MCP response. It specifies the resource (Suparse documents), action (fetch JSON), and distinguishes from siblings like download_results for other formats and delete_documents for cleanup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises when to use ('only when you need the full JSON in context'), provides alternatives ('use download_results for CSV, XLSX, etc.'), and suggests post-step ('call delete_documents after this tool succeeds'). Complete usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_templatesList TemplatesA

List extraction templates for choosing an extraction template. Agents must use team_templates for processing. System templates are discovery-only in MCP: if a matching system template exists but no matching team template exists, ask the user to add that system template to their templates in the Suparse UI before processing. If no matching team or system template exists, ask the user to create a custom extraction schema for that document type in the Suparse UI.

ParametersJSON Schema
NameRequiredDescriptionDefault
api_urlNoOptional API base URL. Defaults to SUPARSE_API_URL or Suparse production API.
include_systemNoInclude discovery-only system templates in addition to team templates. System templates returned here are not directly usable for extraction through MCP until the user adds them to their templates in the Suparse UI.

Output Schema

ParametersJSON Schema
NameRequiredDescription
templatesYes
agent_guidanceYes
team_templatesYes
system_templatesYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It thoroughly explains the behavioral distinction between team templates (usable) and system templates (discovery-only), and what to do when no template matches. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: first states purpose, second gives primary usage rule, third covers edge cases. Concise and front-loaded without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has two optional parameters and an output schema (not shown but present), the description covers all relevant scenarios: listing templates, using team vs system, and handling missing templates. No gaps for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. The description adds value for 'include_system' by clarifying that system templates are not directly usable, which the schema's description ('Include discovery-only system templates...') also hints at, but the tool description provides richer context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List extraction templates for choosing an extraction template,' specifying the verb 'list' and resource 'extraction templates.' It distinguishes from sibling tools like 'extract_file' and 'extract_folder,' which are extraction operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs agents to use 'team_templates' for processing and explains when to use system templates (discovery-only). It also provides clear guidance for cases with no matching template: ask the user to add a system template or create a custom schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv1.3.0
    • First observeddelete_documents
    • First observeddownload_results
    • First observedextract_file
    • First observedextract_folder
    • First observedfetch_json_results
    • First observedlist_templates

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct operation: single-file extraction, folder extraction, template listing, JSON results fetching, disk download, and deletion. No overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., extract_file, list_templates, delete_documents).

Tool Count5/5

6 tools cover the core document extraction workflow without bloat. The count is well-scoped for the server's purpose.

Completeness4/5

The tool set covers extraction, results retrieval, download, and deletion. A minor gap is the lack of a tool to create or manage templates, but the core workflow is functional.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables extraction of text, tables, and structured data from PDFs, images, and office documents using LandingAI's Agentic Document Extraction API. Supports both direct parsing and background job processing for large files with privacy-focused processing.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Enables document parsing and extraction from PDFs and other formats using the MinerU API. Supports batch processing, page range selection, OCR in 109 languages, and VLM/pipeline models for high-accuracy content extraction.
    4
    166
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to extract structured JSON from invoices and receipts in PDF and image formats using Claude Vision. Supports full document parsing, line item extraction, validation, and batch CSV export with API key or cryptocurrency payment options.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/suparse/suparse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server