TradeMCP
An MCP server that makes trade documents machine readable using Docling for local, deterministic document extraction and search, with no AI required.
README
<div align="center"> <img src="logo.svg" alt="TradeMCP Logo" width="200" />
TradeMCP
Make trade documents machine readable.
Open-source MCP server for document workflow simplification. </div>
--- Built on IBM's Docling for powerful document extraction.
🚀 Works Out of the Box
No AI needed for document processing. No API keys. No cloud dependencies. Works with any AI platform.
This MCP server runs 100% locally using Docling for document extraction - no AI required for the actual processing. Connect it to any MCP-compatible AI assistant:
- Claude Desktop by Anthropic
- Microsoft Copilot via Copilot Studio
- ChatGPT with MCP support
- Any MCP-compatible client (growing ecosystem)
🔌 Vendor & Model Agnostic
One engine, any AI platform.
The Model Context Protocol (MCP) is an open standard. This means:
- ✅ Not locked to Anthropic or Claude
- ✅ Works with Microsoft Copilot Studio
- ✅ Compatible with any MCP implementation
- ✅ Future-proof as more platforms adopt MCP
- ✅ Use with GPT, Gemini, Llama, or any model
Your document infrastructure shouldn't depend on a single AI vendor. TradeMCP ensures it doesn't.
🏗️ The Engine, Not the Brain
TradeMCP is the engine that enables document operations:
- Powered by Docling: IBM Research's document parser (no AI needed)
- Deterministic Processing: Same document = same output every time
- MCP Native: Works with any MCP-compatible client
- Zero Configuration: Install and run — no setup required
- 100% Local: Your documents never leave your machine
The brain (workflow intelligence, trade expertise, compliance logic) can come from any AI model or commercial solution - but the engine runs without any AI.
🏗️ Modular Architecture
All components are modular and replaceable. Docling can be replaced with domain-specific tools or services tailored to your exact document processing needs.
📦 Installation & Setup
Prerequisites
-
Install dependencies:
pip install -r requirements.txt -
Download the local AI model (first time only):
python download_models.pyThis downloads a small, efficient AI model that runs 100% locally on your machine.
🧠 About the Local AI Model
What is it?
- Model:
sentence-transformers/all-MiniLM-L6-v2 - Size: ~87MB (small and efficient)
- Type: Local embedding model - runs entirely on your CPU/GPU
- Privacy: 100% local - no data sent to external servers
- No API keys: No OpenAI, Anthropic, or cloud service needed
What does it do? This local model provides intelligent document understanding:
- Semantic Search: Find documents by meaning, not just keywords
- Document Similarity: Identify related trade documents automatically
- Smart Categorization: Automatically group similar documents
- Context Understanding: Understand relationships between different parts of documents
Why a local model?
- ✅ Complete Privacy: Your sensitive trade documents never leave your machine
- ✅ No API Costs: No usage fees or rate limits
- ✅ Offline Operation: Works without internet connection
- ✅ Fast Processing: No network latency, instant results
- ✅ Predictable Performance: Same results every time, no service degradation
Note on Model Storage
The model files are stored in model_cache/ (excluded from git to keep the repository lightweight). They persist between sessions - you only download once.
📚 For technical details about the model, see MODEL_INFO.md
Docling by IBM Research (Default Parser)
This project leverages Docling, IBM's advanced document conversion technology:
- Rule-based extraction - No AI/ML required
- Extracts text, tables, and structure from PDFs, DOCX, XLSX, PPTX, and more
- Maintains document layout and formatting intelligence
- Handles complex multi-column layouts and embedded tables
- Open-source (MIT licensed) and actively maintained
- Easily replaceable with custom parsers for specific document types
Model Context Protocol (MCP)
Open standard for AI-tool communication:
- Works with Claude Desktop (Anthropic)
- Compatible with Copilot Studio (Microsoft)
- Supports ChatGPT with MCP integration
- Supports any MCP client implementation
- Vendor-neutral protocol specification
🎯 What This Is (And Isn't)
This IS:
- ✅ A vendor-agnostic MCP server with 14 document tools
- ✅ Deterministic document extraction via Docling (no AI)
- ✅ Full-text and semantic search capabilities
- ✅ Production-ready document processing engine
- ✅ 100% local, offline-capable, no external dependencies
This IS NOT:
- ❌ An AI-powered document processor (it's deterministic)
- ❌ Tied to any specific AI vendor
- ❌ An AI model (it's infrastructure for any AI)
- ❌ A complete workflow automation solution
- ❌ The commercial Kansofy product
⚡ Quick Start
With Claude Desktop
# Add to ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"trademcp": {
"command": "python",
"args": ["/path/to/trademcp/mcp_server.py"]
}
}
}
With Microsoft Copilot Studio
# Configure in Copilot Studio as external tool
# Point to the MCP server endpoint
# Use the standard MCP protocol
With ChatGPT (MCP Support)
# Connect via MCP-compatible ChatGPT clients
# Point to the same MCP server endpoint
# Standard MCP protocol compatibility
With Any MCP Client
# Start the MCP server
python mcp_server.py
# Connect any MCP-compatible client
# Server speaks standard MCP protocol
🛠️ What You Get
Document Processing (No AI Required)
# Docling extracts everything deterministically
upload_document("complex_invoice.pdf")
# ✓ Text extracted (rule-based)
# ✓ Tables preserved (pattern matching)
# ✓ Structure maintained (document parsing)
# ✓ Same input = same output every time
Intelligent Search (Still No AI)
# Full-text search with SQLite FTS5
search_documents("payment terms net 30")
# Semantic similarity with pre-computed embeddings
vector_search("documents about shipping delays")
# Find duplicates using hashing
find_duplicates()
MCP Tools for Any AI Assistant
All 14 tools work instantly with any MCP client:
upload_document- Process any document format (no AI)search_documents- Lightning-fast full-text search (SQL)vector_search- Find similar documents (embeddings)get_document_tables- Extract tables from PDFs (Docling)- [... and 10 more tools]
🧠 The Brain Lives Elsewhere
This engine provides the infrastructure (no AI). The intelligence comes from:
Your AI Assistant (Claude, Copilot, etc.)
The AI provides the intelligence to:
- Understand your intent
- Orchestrate document operations
- Make decisions based on content
- Generate insights and summaries
Your Own Implementation
Build your own workflows on top:
- Custom document classification
- Business rule validation
- Workflow orchestration
- Integration patterns
Commercial Solutions
Production-ready intelligence:
- Kansofy Trade Cloud: Full SaaS with trade workflows
- Kansofy Enterprise: Self-hosted with compliance engine
- Professional Services: Custom workflow development
📊 How It Works Without AI
Document Processing Pipeline
PDF/DOCX → Docling (rule-based) → Structured Data → SQLite
↓
No AI needed
Deterministic
100% reproducible
Search Pipeline
Query → FTS5 (SQL) → Results
→ Embeddings (pre-computed) → Similarity
No AI inference at search time
🌐 Platform Compatibility
| Platform | Status | Configuration |
|---|---|---|
| Claude Desktop | ✅ Tested | Native support |
| Microsoft Copilot | ✅ Compatible | Via Copilot Studio |
| ChatGPT | ✅ Compatible | MCP integration |
| OpenAI GPTs | 🔄 Planned | MCP bridge needed |
| Google Gemini | 🔄 Planned | MCP adapter |
| Open Source LLMs | ✅ Ready | Any MCP client |
🤝 Why This Architecture Matters
No AI in the Engine Means:
- Deterministic results (same input = same output)
- No API costs for document processing
- Works offline completely
- No rate limits or quotas
- Full data privacy (nothing leaves your machine)
- Predictable performance
Any AI for the Brain Means:
- Choose your preferred AI assistant
- Switch providers without changing infrastructure
- Use multiple AIs for different tasks
- Future-proof as AI landscape evolves
📈 When You Need More
You'll know it's time for commercial solutions when:
- [ ] Processing >100 documents daily
- [ ] Need trade-specific workflows
- [ ] Require compliance validation
- [ ] Want pre-built intelligence
- [ ] ROI justifies enterprise features
🔗 Technical Foundation
- Document Processing: Docling by IBM Research (no AI)
- Protocol: Model Context Protocol (open standard)
- Search: SQLite with FTS5 extension (deterministic SQL)
- Embeddings: Sentence-transformers (pre-computed, no inference)
- Server: FastAPI + Python 3.9+ (standard web framework)
📚 Documentation
| Guide | Description |
|---|---|
| Installation | Complete setup guide |
| MCP Tools | All 14 tools documented |
| Architecture | System design & components |
| Usage Guide | Examples and workflows |
| Platform Compatibility | Multi-platform setup |
| Troubleshooting | Common issues and solutions |
| Contributing | How to contribute |
🙏 Acknowledgements
- IBM Research for Docling
- Anthropic for MCP protocol
- The open-source community
Built with ❤️ for the humans running global trade.
Making trade documents machine readable. The foundation for intelligent trade workflows.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。