Skip to main content
Glama
README.md
# ToolkitFun (`toolkit.fun`) — Document-to-Markdown MCP Server & Document Solutions

[![Website](https://img.shields.io/badge/Website-toolkit.fun-0f172a)](https://toolkit.fun/document-to-markdown)
[![CN Mirror](https://img.shields.io/badge/China_Mirror-cn.toolkit.fun-1e40af)](https://cn.toolkit.fun/document-to-markdown)
[![MCP Server Card](https://img.shields.io/badge/MCP-Server_Card-10b981)](https://toolkit.fun/.well-known/mcp/server-card.json)

Convert **PDF, Office documents (DOCX, DOC, PPTX, PPT, XLSX, CSV, EPUB, RTF, ODT, ODS, ODP)** and **public web URLs** into clean, token-efficient Markdown — available as a **no-login web app**, **REST API**, and **hosted Streamable HTTP MCP server** for Cursor, Claude Desktop, and custom AI agents.

> Looking to estimate LLM & OCR/MCP token costs across 30+ providers? See our sister project **[aiplans.dev](https://aiplans.dev)** ([github.com/x2v-co/aiplans](https://github.com/x2v-co/aiplans)).

---

## Live Endpoints

| Surface | Global | China Direct |
| :--- | :--- | :--- |
| **Document to Markdown (Web)** | https://toolkit.fun/document-to-markdown | https://cn.toolkit.fun/document-to-markdown |
| **Solutions Hub** | https://toolkit.fun/solutions | https://cn.toolkit.fun/solutions |
| **Fillable PDF Form Builder** | https://toolkit.fun/solutions/documents/fillable-pdf | https://cn.toolkit.fun/solutions/documents/fillable-pdf |
| **MCP Endpoint (Streamable HTTP)** | `https://toolkit.fun/mcp?mode=both` | `https://cn.toolkit.fun/mcp?mode=both` |
| **MCP Server Card (Discovery JSON)** | https://toolkit.fun/.well-known/mcp/server-card.json | https://cn.toolkit.fun/.well-known/mcp/server-card.json |
| **Agent Skill & llms.txt** | https://toolkit.fun/SKILL.md · https://toolkit.fun/llms.txt | https://cn.toolkit.fun/SKILL.md |

---

## Quick Start: Connect via MCP (Cursor / Claude Desktop / Windsurf)

1. Generate an API token at **[toolkit.fun/app#api](https://toolkit.fun/app#api)** (or `cn.toolkit.fun/app#api`).
2. Add the hosted Streamable HTTP MCP server to your client config:

```json
{
  "mcpServers": {
    "toolkitfun": {
      "type": "http",
      "url": "https://toolkit.fun/mcp?mode=both",
      "headers": {
        "Authorization": "Bearer <YOUR_API_TOKEN>"
      }
    }
  }
}
```

### Exposed MCP Tools

- **`document_to_markdown`**
  - Inputs: exactly one of `contentBase64`, `contentText`, or `url`, plus optional `filename`, `format`, `quality` (`"standard"` default or `"high"` for Pro+ PDF table reconstruction, two-column reading order, header/footer stripping & scanned PDF OCR), `waitForResult` (default `true`), and `timeoutMs` (up to `25000` ms).
  - Returns clean Markdown inline if conversion completes within the bounded wait window, or `{ status: "processing", jobId }` for async polling without cancelling the job.
- **`document_to_markdown_status`**
  - Polls an async conversion job by `jobId` (strictly scoped to the authenticated owner) and returns Markdown + conversion metadata once finished.

---

## Key Capabilities

- **Pro+ High-Accuracy PDF Mode (`quality: "high"`)**: Reconstructs GitHub-Flavored Markdown (GFM) tables, preserves two-column reading order (including CJK layouts), strips running headers/footers, and automatically runs OCR on scanned PDF pages (up to **20 / 40 / 60 pages/doc** on Pro / Plus / Team).
- **SSRF-Hardened URL-to-Markdown**: Enforces public HTTP/HTTPS only, DNS-pinned unicast IP validation, manual hop-by-hop redirect checks, streaming size caps, and noise removal (`<script>`, `<style>`, `<nav>`, `<footer>`) before converting to clean Markdown.
- **Isolated Worker Execution**: Document parsing runs in isolated worker threads with zero credential exposure.
- **No-Login Web Trial**: Try 3 instant presets (0 quota) or convert up to 3 files/URLs per day (≤ 2 MiB) directly at [toolkit.fun/document-to-markdown](https://toolkit.fun/document-to-markdown).
- **Fillable PDF Form Builder**: Visual AcroForm editor (`Text`, `Checkbox`, `Radio`, `Dropdown`) with 3 no-login interactive templates (`onboarding`, `expense`, `nda`) at [toolkit.fun/solutions/documents/fillable-pdf](https://toolkit.fun/solutions/documents/fillable-pdf).

---

## REST API Example

```bash
# Convert a public web URL to clean Markdown
curl -X POST "https://toolkit.fun/api/v1/worker-jobs/anydoc/convert" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://aiplans.dev/en/guides/mcp-agent-api-cost-guide",
    "quality": "standard"
  }'
```

---

## Plans & Limits

| Plan | Monthly Price (Global / CN) | Conversions / mo | Max File Size | High-Accuracy PDF & OCR | Retention |
| :--- | :--- | :--- | :--- | :--- | :--- |
| **Guest** | Free (no login) | 3 / day | 2 MiB | Standard only | 1 hour |
| **Free** | $0 / ¥0 | 10 / mo | 4 MiB | Standard only | 7 days |
| **Pro** | $19 / ¥39 | 300 / mo | 8 MiB | Up to **20 pages/doc** | 30 days |
| **Plus** | $29 / ¥99 | 1,000 / mo | 8 MiB | Up to **40 pages/doc** | 60 days |
| **Team (5 seats)** | $79 / ¥399 | 5,000 / mo | 8 MiB | Up to **60 pages/doc** | 90 days |

---

## License

See [LICENSE](./LICENSE). Public showcase & MCP documentation repository for [Toolkit.fun](https://toolkit.fun).