docflow-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@docflow-mcpExtract fields, tables, and stamps from Q4_Report.pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Docflow MCP Server
MCP Server for Docflow — TextIn's document automation platform. Enables LLM agents to classify documents, extract fields/tables/stamps, and run rule-based compliance review through 41 MCP tools.
Features
Document classification — auto-classify PDFs, images, Word, and Excel files into user-defined categories
Field extraction — extract structured fields, table rows, handwriting, and stamps using LLM/VLM models
Compliance review — run AI-powered rule evaluation with risk levels and detailed reasoning
Two-layer tool design:
6 workflow tools — high-level composite operations for common pipelines (upload → extract → review)
35 resource tools — one tool per API endpoint for fine-grained configuration and edge cases
Related MCP server: MinerU Document Explorer
Installation
pip install git+https://github.com/intsig-textin/docflow-mcp.gitOr install in editable mode for development:
git clone https://github.com/intsig-textin/docflow-mcp.git
cd docflow-mcp
pip install -e .Configuration
Set environment variables before starting the server:
export DOCFLOW_APP_ID=your_app_id
export DOCFLOW_SECRET_CODE=your_secret_code
# Optional: override API host (default: https://docflow.textin.com)
export DOCFLOW_HOST=https://docflow.textin.comGet your APP_ID and SECRET_CODE from the Docflow console.
Running
Stdio (for MCP clients)
# Via installed command
docflow-mcp
# Or via Python module
python -m docflow_mcpClaude Code Integration
Add to your Claude Code MCP settings (~/.claude/settings.json or project .claude/settings.json):
{
"mcpServers": {
"docflow": {
"command": "docflow-mcp",
"env": {
"DOCFLOW_APP_ID": "your_app_id",
"DOCFLOW_SECRET_CODE": "your_secret_code"
}
}
}
}Or if using python -m:
{
"mcpServers": {
"docflow": {
"command": "python",
"args": ["-m", "docflow_mcp"],
"env": {
"DOCFLOW_APP_ID": "your_app_id",
"DOCFLOW_SECRET_CODE": "your_secret_code"
}
}
}
}Tool Reference
Workflow Tools (6)
High-level tools that hide polling, multi-step logic, and upload routing.
Tool | Description |
| Find workspace by name, or create if not found (idempotent) |
| List all enabled categories with field configurations |
| Create category with fields and sample file |
| Upload files (list or directory) and wait for extraction results |
| Create review rule repo with groups and rules (idempotent) |
| Submit review task and wait for rule-by-rule results |
docflow_upload_and_extract — Upload Routing
Automatically selects upload mode based on file count:
≤ 3 files → synchronous upload (results returned immediately)
> 3 files → asynchronous upload + polling until all files complete
Accepts either:
file_paths: explicit list of local file pathsdirectory: auto-scans for supported files (PDF, JPG, PNG, DOC, DOCX, XLS, XLSX, OFD, TXT)
docflow_setup_review_rules — Rule Structure
Rule Repository
└── Rule Group (e.g. "金额审核")
└── Rule (name, prompt, category_ids, risk_level)
risk_level: 10=high, 20=medium, 30=lowResource Tools (35)
Thin wrappers covering every CRUD endpoint, organized by resource.
Files
Tool | Endpoint | Description |
| GET /file/fetch | Query processed files, filter by status/category |
| POST /file/update | Update file metadata or verification status |
| POST /file/delete | Permanently delete files by task_id or batch_number |
| POST /file/extract_fields | Re-extract specific fields without re-uploading |
| POST /file/retry | Retry processing for failed files |
| POST /file/amend_category | Correct misclassified file and trigger re-extraction |
Workspaces
Tool | Endpoint | Description |
| GET /workspace/list | List all accessible workspaces |
| GET /workspace/get | Get workspace details and statistics |
| POST /workspace/update | Update name, description, auth scope, or callback URL |
| POST /workspace/delete | Delete workspace and all contents (permanent) |
Categories
Tool | Endpoint | Description |
| POST /category/update | Update category name, model, prompt, or enabled status |
| POST /category/delete | Delete category (existing file data is preserved) |
Category Tables
Tool | Endpoint | Description |
| GET /category/tables/list | List table configs (for extracting structured rows) |
| POST /category/tables/add | Add table field group (e.g. invoice line items) |
| POST /category/tables/update | Update table name or column definitions |
| POST /category/tables/delete | Delete table configs |
Category Fields
Tool | Endpoint | Description |
| GET /category/fields/list | List fields with field_ids (needed for rule references) |
| POST /category/fields/add | Add fields to existing category |
| POST /category/fields/update | Update field name, description, or extraction prompt |
| POST /category/fields/delete | Delete fields from category |
Category Samples
Tool | Endpoint | Description |
| POST /category/sample/upload | Add sample files to improve classification (3–5 recommended) |
| GET /category/sample/list | List all sample files for a category |
| POST /category/sample/delete | Remove low-quality samples |
Review Rule Repositories
Tool | Endpoint | Description |
| GET /review/rule_repo/list | List all rule repositories in workspace |
| GET /review/rule_repo/get | Get repo with all groups and rules |
| POST /review/rule_repo/update | Rename rule repository |
| POST /review/rule_repo/delete | Delete repo and all its rules (permanent) |
Review Rule Groups
Tool | Endpoint | Description |
| POST /review/rule_group/update | Rename rule group |
| POST /review/rule_group/delete | Delete group and all its rules |
Review Rules
Tool | Endpoint | Description |
| POST /review/rule/update | Update rule prompt, categories, or risk level |
| POST /review/rule/delete | Delete a single rule |
Review Tasks
Tool | Endpoint | Description |
| POST /review/task/result | Get current review status without waiting |
| POST /review/task/delete | Delete review tasks |
| POST /review/task/retry | Retry entire review task |
| POST /review/task/rule/retry | Retry a single rule without re-running others |
Typical Workflow
1. docflow_get_or_create_workspace → workspace_id
2. docflow_list_categories → check existing categories
3. docflow_create_category (×N) → category_id per document type
4. docflow_upload_and_extract → files[], task_ids[]
5. docflow_setup_review_rules → repo_id
6. docflow_run_review → status, groups[rule results]API Coverage
44 of 46 Docflow API endpoints are covered.
Intentionally omitted:
GET /auth/token— generates short-lived token for iframe embedding, not agent useGET /category/sample/download— returns binary file content, not useful for agents
Internally called (no separate tool needed):
POST /file/upload,/file/upload/sync→ used insidedocflow_upload_and_extractPOST /workspace/create→ used insidedocflow_get_or_create_workspacePOST /review/rule_repo/create,/rule_group/create,/rule/create→ used insidedocflow_setup_review_rulesPOST /review/task/submit→ used insidedocflow_run_review
Requirements
Python ≥ 3.10
Network access to
docflow.textin.comDocflow account with valid
APP_IDandSECRET_CODE
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/intsig-textin/docflow-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server