AILANG Parse in your AI assistant

Read, convert and edit Word, Excel, PowerPoint and PDF files from ChatGPT, Claude, Codex or any MCP agent.

AI agents: llms.txt and llms-full.txt give the endpoint, sign-in and tools in one file.

Connect from ChatGPT, Claude or Codex

AILANG Parse plugs into the AI assistant you already use. Add one URL, sign in with Google or GitHub, and the assistant can read a Word, Excel, PowerPoint or PDF file with its tables, comments and tracked changes, convert it to another format, or edit it. There is no API key to copy and no code to write.

The URL to add:

https://docparse.ailang.sunholo.com/mcp/connect/

Setup for each app, signing in, sending documents, download links, revoking access and troubleshooting: Connect from Claude, ChatGPT or Codex. The AILANG Parse plugin installs the connector and the skill together in Claude Code and Codex.

How it works: MCP

The connection uses the Model Context Protocol (MCP), an open standard that lets an AI assistant find and call outside tools. The assistant asks the server which tools it offers and how to call them, so nothing has to be built per assistant.

AILANG Parse is an MCP server. The hosted connector gives the assistant 9 tools: parse, convert, edit, upload card, upload links, formats, estimate, account and feedback. Claude, ChatGPT, Codex, Cursor, VS Code and any other MCP client can use them. Office and text files are read without AI, so the same file always gives the same result. PDFs are read with pdftotext, with AI only if you ask for it (for scans). Images use an AI model.

Two transports: HTTP (the hosted service, see two ways to sign in) and stdio (for running the server or a bridge on your own machine).

Two ways to sign in

The hosted server has two MCP endpoints. They run the same tools on the same account; they differ in how the client signs in.

EndpointSign-inUse it for
/mcp/connect/OAuth. The client opens our sign-in page; you sign in with Google or GitHub and click Allow. The client holds the token and renews it.Claude Code, Claude, ChatGPT, Codex: any client that can open a browser. This is what the plugin uses.
/mcp/API key. A dp_ key sent as an Authorization: Bearer or X-API-Key header (or the apiKey argument). Agents without a key can get one with the device flow tools mcpAuth / mcpAuthPoll.Headless agents, scripts and MCP clients that cannot run an OAuth sign-in.

Either way the result is an ordinary dp_ key on your account with the same quota. Keys created through OAuth are labelled oauth: <app> on your dashboard and expire after 24 hours (the client renews them). Outside MCP (the REST API, the SDKs, the skill's scripts) you use a dp_ key from the dashboard or the device flow.

Quick Start

For Claude Desktop, Cursor and VS Code. The client starts the server for you:

# No manual server start needed — the MCP client launches this:
ailang serve-api --mcp --routes-only --caps IO,FS,Env docparse/

Local — HTTP

For MCP clients that connect over HTTP:

# Start with MCP HTTP endpoint at /mcp/
ailang serve-api --mcp-http --routes-only --caps IO,FS,Env --port 8080 docparse/

# Test it
curl -X POST http://localhost:8080/mcp/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

Hosted

Nothing to install. Listing the tools works without a key. To call them, send your key as a header (or as the apiKey argument; see the device flow):

curl -X POST https://docparse.ailang.sunholo.com/mcp/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer dp_your_api_key" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}'

With AI parsing

To parse images or scanned PDFs locally, turn on AI:

# Add AI model for non-Office formats
ailang serve-api --mcp --routes-only \
  --caps IO,FS,Env,AI,Net --ai gemini-3.5-flash-lite docparse/

Available Tools

The hosted connector gives the assistant 9 tools, plus uploadViaHost, which only the upload card calls. The agent endpoint /mcp/ adds the two device-flow tools. Agents get the list automatically from tools/list. To give a tool a document, see Sending a document.

Core Tools (local + hosted)

ToolDescriptionParameters
mcpParse Parse any document into structured blocks, Markdown, HTML or A2UI, or a short summary (counts, first 50 headings, warnings). Office and text formats are deterministic; PDFs use pdftotext (pdfBackend: "ai" for scans); images use AI. Long results come in parts: follow page.nextCursor with cursor. One of fileRef (hosted), file (ChatGPT), filepath (https URL or sample_id) or content + filename (+ contentEncoding); outputFormat (blocks | markdown | html | a2ui | summary); cursor; maxChars (a number, default 80000); pdfBackend
mcpConvert Create or convert a document. To write a new one, send Markdown as content with filename: "notes.md". The hosted result includes download_url, a link to the generated file valid for one hour. One of fileRef (hosted), file (ChatGPT), input (https URL or sample_id) or content + filename (+ contentEncoding); outputFormat (docx, pptx, xlsx, odt, odp, ods, html, md, qmd)
mcpFormats List all 17 input and 9 output formats with features, the test samples, and how to send a document. Call this first to discover what AILANG Parse can do. No sign-in needed. None
mcpEstimate Estimate cost and latency before parsing. Returns whether AI is required, the estimated time and the quota it will use. Use it to tell the user before spending quota. filepath (a sample id or an https URL), outputFormat

Hosted-Only Tools

These tools are available when connecting to the hosted service at docparse.ailang.sunholo.com. They let agents upload the user’s files, edit documents, check the account, send feedback and, on the agent endpoint only, sign in with the device flow.

ToolDescriptionParameters
editDocument Apply a list of JSON edits (deltas) to a document and return the edited blocks (same shape as outputFormat=blocks). An empty list returns the document unchanged. Office formats only (DOCX, PPTX, XLSX, ODT, ODP, ODS). Your original file is never changed. One of fileRef, file (ChatGPT), content + filename (base64 file) or filepath (https URL or sample_id); deltas (JSON array of edit operations)
uploadDocument Show the AILANG Parse upload card (MCP Apps, ui://docparse/upload) so the user can pick a file. The card uploads it to AILANG Parse directly, never through the model, summarises it with mcpParse (outputFormat: "summary") and reports its fileRef. outputFormat (optional)
createUpload One-time upload links for files in the agent’s sandbox or workspace. Each link comes with a curl line; running it prints a receipt with a fileRef. One link per file, single use, valid 10 minutes. count (1..20), optional filename, mimeType
mcpAuth Agent endpoint /mcp/ only. Start RFC 8628 device authorization. Returns a verification URL and user code. Tell the human to open the URL and sign in, then call mcpAuthPoll. label (e.g. "claude-desktop")
mcpAuthPoll Agent endpoint /mcp/ only. Poll for device auth completion. Returns pending (keep polling every 5s), approved (with API key and tier info), or expired. deviceCode (from mcpAuth)
mcpAccount View the account: plan, usage and remaining allowance, keys, and whether request history is kept. action (status | keys | usage | history | history_on | history_off)
submit_feedback Report a bug, feature request or docs gap to the maintainers. A person reviews it. No sign-in needed. category, title, body, optional contact

Every tool has named, typed parameters (JSON Schema). Agents get the full schemas from tools/list, so nothing needs hardcoding.

Sending a document (hosted)

The tool descriptions tell the agent which route to use. In short:

  • File in the agent’s sandbox or workspace (Claude Code, Codex, a code sandbox with network access): createUpload, then run its line, curl -sS -F token=<token> -F file=@<path> https://docparse.ailang.sunholo.com/uploads, and pass the receipt’s fileRef. For several files, count returns one link per file.
  • The user wants to pick a file, or curl fails with a network error: uploadDocument (claude.ai, Claude Desktop and other MCP Apps hosts).
  • ChatGPT attachment: ChatGPT fills the file argument of mcpParse, mcpConvert and editDocument with the attachment’s download_url and file_id (and mime_type and file_name when it has them), and AILANG Parse fetches the file. The argument is declared in _meta["openai/fileParams"].
  • Public link: filepath (input for mcpConvert). Short text: content + filename. Trying it: a sample id from mcpFormats.
  • Never parse the file some other way and present it as the tool’s result; if the file cannot be sent, tell the user.

fileRef reuse. A fileRef (mcp-file://docparse/file_…) works only for the account that uploaded it. Unused, it is refused after 1 hour; after its first use the same account can use it again for 30 minutes (more parts, another format), never past that hour.

Large results. Call summary first when a document may be large. A result longer than maxChars returns its first part with page: {index, of, firstBlock, endBlock, totalBlocks, nextCursor}; call again with the same document and cursor: nextCursor until it is absent, and read every part before answering about the whole document. Scanned PDFs return PDF_TEXT_LAYER_SPARSE: retry with pdfBackend: "ai" and pass it on every cursor call (AI results are cached for 30 minutes per account).

Device flow on the agent endpoint

Clients that can open a browser should use the OAuth connector /mcp/connect/ (above), where none of this is needed. On the agent endpoint /mcp/, an agent without a key signs in like this:

  1. Agent calls mcpParse → receives AUTH_REQUIRED error with suggested_fix
  2. Agent calls mcpAuth(label: "claude-desktop") → receives verification URL + user code
  3. Agent tells the human: "Open this URL and sign in. Your code is WXYZ-5678."
  4. Agent calls mcpAuthPoll(deviceCode) every 5s → receives api_key + tier
  5. Agent sends the key as a header (preferred) or apiKey in subsequent calls

Prefer a header. Clients that can send a fixed header can skip the device flow. Generate a key on the API page and send it as Authorization: Bearer dp_… (or X-API-Key). The key then never enters the model's context, and apiKey can be left out of every call. An explicit apiKey argument still works and takes precedence.

Install from the MCP Registry

AILANG Parse is listed in the official MCP Registry as io.github.sunholo-data/parse. Clients that support the registry can find and install it, so you copy no JSON.

MCP Registry: io.github.sunholo-data/parse

How to install via the registry

  • Claude Code: claude mcp add io.github.sunholo-data/parse finds the entry, picks a transport it supports (PyPI / npm / hosted HTTP) and writes the config for you.
  • Cursor / VS Code with MCP extension: open the MCP server browser and search for parse or sunholo. Click install and the client fills in .cursor/mcp.json or .vscode/settings.json for you.
  • Any other client that supports the registry: point it at io.github.sunholo-data/parse. The listing offers packages (npm and PyPI stdio bridges) and two remotes: the OAuth connector docparse.ailang.sunholo.com/mcp/connect/ (for clients that can open a browser) and the API-key agent endpoint docparse.ailang.sunholo.com/mcp/. The client picks whichever it supports.

Inspect the live entry directly:

curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=parse" \
  | jq '[.servers[] | select(.server.name == "io.github.sunholo-data/parse")]'
If your client does not support the registry, use the manual configuration below. The result is the same.

Manual Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Pick the runtime you have installed. All three SDKs include the same stdio bridge.

Node.js ≥ 18:

{
  "mcpServers": {
    "ailang-parse": {
      "command": "npx",
      "args": ["-y", "@ailang/parse", "mcp"]
    }
  }
}

Python ≥ 3.8 (via uv):

{
  "mcpServers": {
    "ailang-parse": {
      "command": "uvx",
      "args": ["ailang-parse", "mcp"]
    }
  }
}

Go (install once, run from PATH):

go install github.com/sunholo-data/ailang-parse-go/cmd/ailang-parse@latest
{
  "mcpServers": {
    "ailang-parse": {
      "command": "ailang-parse",
      "args": ["mcp"]
    }
  }
}

All three connect your client to the hosted API over stdio. You need no API key up front: the agent runs the device flow the first time.

Claude Desktop (local)

To parse on your own machine without the hosted API, add to claude_desktop_config.json:

{
  "mcpServers": {
    "ailang-parse": {
      "command": "ailang",
      "args": ["serve-api", "--mcp", "--routes-only", "--caps", "IO,FS,Env", "docparse/"],
      "cwd": "/path/to/ailang-parse"
    }
  }
}

Claude Code

Install the plugin, which sets up the MCP connection for you. Run both inside Claude Code:

# Run both inside Claude Code
/plugin marketplace add sunholo-data/docparse-skill
/plugin install ailang-parse@ailang-parse-marketplace

Or add to .mcp.json (project or global):

{
  "mcpServers": {
    "ailang-parse": {
      "url": "https://docparse.ailang.sunholo.com/mcp/"
    }
  }
}

To run it locally, use the command form instead:

{
  "mcpServers": {
    "ailang-parse": {
      "command": "ailang",
      "args": ["serve-api", "--mcp", "--routes-only", "--caps", "IO,FS,Env", "docparse/"],
      "cwd": "/path/to/ailang-parse"
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "ailang-parse": {
      "command": "ailang",
      "args": ["serve-api", "--mcp", "--routes-only", "--caps", "IO,FS,Env", "docparse/"],
      "cwd": "/path/to/ailang-parse"
    }
  }
}

VS Code

Add to .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "ailang-parse": {
        "command": "ailang",
        "args": ["serve-api", "--mcp", "--routes-only", "--caps", "IO,FS,Env", "docparse/"],
        "cwd": "/path/to/ailang-parse"
      }
    }
  }
}

Tool Discovery

An agent can find out what AILANG Parse offers in three ways:

MCP tools/list

Once connected, MCP clients call tools/list and get every tool with its full JSON Schema. No other configuration is needed. On the connector /mcp/connect/ it returns 10 tools: mcpParse, mcpConvert, editDocument, uploadDocument, createUpload, mcpFormats, mcpEstimate, mcpAccount, submit_feedback and uploadViaHost, which only the upload card calls. The agent endpoint /mcp/ adds mcpAuth and mcpAuthPoll. On REST, large files go through getUploadUrl.

Agents should call mcpFormats first. It returns the 17 input formats, the 9 output formats, the test samples, and how to send a document. Plans and prices are on the pricing page and GET /api/v1/pricing.

REST /api/v1/tools

Clients that do not use MCP can fetch the tool definitions over REST:

curl -s https://docparse.ailang.sunholo.com/api/v1/tools | jq '.tools | length'
# 7

curl -s https://docparse.ailang.sunholo.com/api/v1/tools | jq '.tools[0].name'
# "mcpParse"

With Claude Code

Two ways to parse documents in Claude Code:

Add the config above to your settings. Claude finds the tools and uses them when you ask it to parse or convert a document.

Option 2: Claude Code Skill

Install the AILANG Parse skill to parse locally with no configuration and no separate server. See the Claude Code integration page.

Which to choose? Use the MCP server if several agents need document parsing or you want one shared service. Use the Claude Code skill if you only use Claude Code and want local parsing with no configuration.

With Other Agents

Any MCP Client

Any MCP client can connect over stdio or HTTP. The server lists its tools, resources and capabilities the standard MCP way.

REST API

Agents that do not use MCP can call the same tools through the REST API:

# Python — parse with the hosted API
import requests

response = requests.post(
    "https://docparse.ailang.sunholo.com/api/v1/parse",
    headers={"Authorization": "Bearer dp_YOUR_KEY"},
    files={"filepath": open("report.docx", "rb")},
    data={"outputFormat": "markdown"},
)
markdown = response.json()["result"]

# Or use the Python SDK
from ailang_parse import DocParse
client = DocParse(api_key="dp_YOUR_KEY")
result = client.parse_file("report.docx", output_format="markdown")

LangChain / LlamaIndex

Add AILANG Parse as a tool in your agent chain:

from langchain.tools import StructuredTool

ailang_parse = StructuredTool.from_function(
    func=lambda filepath, output_format="blocks": requests.post(
        "https://docparse.ailang.sunholo.com/api/v1/parse",
        headers={"X-API-Key": "dp_YOUR_KEY"},
        files={"filepath": open(filepath, "rb")},  # upload: the API never reads a path on your disk
        data={"outputFormat": output_format},
    ).json()["result"],
    name="ailang_parse",
    description="Parse a document into structured blocks, markdown, or HTML"
)

Frequently Asked Questions

What is the AILANG Parse MCP server?

AILANG Parse is an MCP server. The hosted connector at https://docparse.ailang.sunholo.com/mcp/connect/ gives the assistant 9 tools: mcpParse (parse any document, in parts when long), mcpConvert (create or convert documents, with a one-hour download link), editDocument (apply structured edits), uploadDocument (the upload card), createUpload (upload links for sandbox files), mcpFormats (formats, samples and how to send a document), mcpEstimate (predict cost before parsing), mcpAccount (plan, usage, keys, history setting) and submit_feedback, plus uploadViaHost, which only the upload card calls. The agent endpoint /mcp/ adds the device-flow tools mcpAuth and mcpAuthPoll; see two ways to sign in.

How do AI agents discover AILANG Parse as a tool?

Through MCP's tools/list method (automatic when connected), or through the REST endpoint GET /api/v1/tools. Agents should call mcpFormats first: it lists formats, samples and how to send a document.

Which AI agents work with the AILANG Parse MCP server?

Any MCP-compatible agent: Claude Code, Claude Desktop, Cursor, VS Code Copilot, Windsurf, and custom agents using MCP client libraries. Agents that do not use MCP can call the REST API.

Do I need an API key for local use?

No. Local MCP (stdio or localhost HTTP) needs no sign-in. On the hosted service, AI clients sign in with OAuth through the connector /mcp/connect/, with no key to copy. Headless agents and scripts use a dp_ key from the dashboard or the device flow. The free tier gives 1,000 requests/month.

How does agent authentication work?

Two ways, on two endpoints. On the connector /mcp/connect/ the client runs OAuth: a call without a token gets a 401, the client opens our sign-in page, you sign in with Google or GitHub and click Allow, and the client keeps (and renews) the token. On the agent endpoint /mcp/, an agent without a key calls mcpAuth, shows you a URL and code, and polls mcpAuthPoll until you approve; it then sends the dp_ key as a header. See two ways to sign in.

How can an agent advise on pricing and quotas?

With a signed-in client, mcpAccount(action: "status") shows the current plan, usage and remaining allowance. mcpEstimate tells you before parsing whether a file counts as an AI request (images, and PDFs only when pdfBackend="ai"). Plans and prices are on the pricing page. All errors include a suggested_fix field the agent can act on.

What about PDF and image parsing?

To turn on AI parsing locally, add --caps AI,Net --ai gemini-3.5-flash-lite. You need your own GOOGLE_API_KEY. The hosted service includes AI parsing on every tier (50/month free, 500 Pro, 2,000 Business). Use mcpEstimate to check if a file needs AI before parsing.

Why is structured document parsing better for AI agents than flat text extraction?

When an AI agent receives flat text, it loses the ability to reference specific table cells, identify which text was inserted versus deleted (track changes), or attribute comments to specific reviewers. AILANG Parse gives agents typed blocks, where each element says what it is (a heading, a table cell, a tracked change, a comment), so the agent can reason about the document's structure.