Token导航 LogoToken导航TokenDH.com
LandingAI ADE MCP Server logo
文档知识stdio官方级别未说明来源级核验

LandingAI ADE MCP Server

MCP Server

LandingAI ADE MCP Server 是一个模型上下文协议服务器,提供与LandingAI的Agentic Document Extraction (ADE) API的直接集成,用于从PDF、图像和办公文档中提取文本、表格和结构化数据。

工具数

7

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude结构化数据Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

avaxia8

提供方

avaxia8

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python3 -m venv venv

详细介绍

LandingAI ADE MCP服务器

一种模型上下文协议(MCP)服务器,提供与LandingAI的代理文档提取(ADE)API的直接集成。从PDF、图像和office文档中提取文本、表格和结构化数据。

特性

  • 📄 文档分析 -解析整个文档并返回markdown输出
  • 🔍 数据提取 -使用JSON模式提取结构化数据
  • 解析作业 -通过后台处理处理大型文档
  • 🛡️ 零数据保留 -以隐私为重点的处理支持

安装

先决条件

  • Python 3.9或更高版本
  • LandingAI API密钥来自 登陆AI

选项1:使用紫外线(推荐-最简单)

紫外线 是一个快速的Python包管理器,可以自动处理虚拟环境。

安装uv(如果尚未安装)

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Or with Homebrew
brew install uv

立项

# Clone the repository
git clone https://github.com/avaxia8/landingai-ade-mcp.git
cd landingai-ade-mcp

# Install dependencies with uv
uv sync

# Or if starting fresh:
uv init
uv add fastmcp httpx pydantic python-multipart aiofiles

选项2:在虚拟环境中使用pip

# Clone the repository
git clone https://github.com/avaxia8/landingai-ade-mcp.git
cd landingai-ade-mcp

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

配置

设置API密钥

export LANDINGAI_API_KEY="your-api-key-here"

Claude桌面配置

配置文件位置

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json
  • 视窗: %APPDATA%\Claude\claude_desktop_config.json

配置示例

使用紫外线(推荐)

{
  "mcpServers": {
    "landingai-ade-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/landingai-ade-mcp",
        "run",
        "python",
        "-m",
        "server"
      ],
      "env": {
        "LANDINGAI_API_KEY": "your-api-key-here"
      }
    }
  }
}

使用虚拟环境

{
  "mcpServers": {
    "landingai-ade-mcp": {
      "command": "/path/to/landingai-ade-mcp/venv/bin/python",
      "args": [
        "/path/to/landingai-ade-mcp/server.py"
      ],
      "env": {
        "LANDINGAI_API_KEY": "your-api-key-here"
      }
    }
  }
}

配置后

  1. 保存配置文件
  2. 完全重新启动克劳德桌面 (退出并重新打开)
  3. 服务器在mcp服务器中应显示为“landingai ade mcp”

可用工具

parse_document

解析整个文档并返回markdown输出。

# Parse a local file
result = await parse_document(
    document_path="/path/to/document.pdf",
    model="dpt-2-latest",  # optional
    split="page"  # optional, for page-level splits
)

# Parse from URL
result = await parse_document(
    document_url="https://example.com/document.pdf"
)

extract_data

使用JSON模式从markdown中提取结构化数据。

schema = {
    "type": "object",
    "properties": {
        "invoice_number": {"type": "string"},
        "total": {"type": "number"}
    }
}

# Extract from markdown content string
result = await extract_data(
    schema=schema,
    markdown="# Invoice\nInvoice #123\nTotal: $100.00"
)

# Or extract from a markdown file
result = await extract_data(
    schema=schema,
    markdown="/path/to/document.md"  # Will detect if it's a file path
)

# Or extract from URL
result = await extract_data(
    schema=schema,
    markdown_url="https://example.com/document.md"
)

create_parse_job

为大型文档创建解析作业(建议>50MB)。

job = await create_parse_job(
    document_path="/path/to/large_document.pdf",
    split="page"  # optional
)
job_id = job["job_id"]

get_parse_job_status

检查解析作业的状态并检索结果。

status = await get_parse_job_status(job_id)

# Check status
if status["status"] == "completed":
    # For small files, data is included directly
    # For large files (>1MB), data is auto-fetched from output_url
    results = status["data"]
elif status["status"] == "processing":
    print(f"Progress: {status['progress'] * 100:.1f}%")

list_parse_jobs

列出所有具有过滤和分页功能的解析作业。

jobs = await list_parse_jobs(
    page=0,  # optional, default 0
    pageSize=10,  # optional, 1-100, default 10
    status="completed"  # optional filter
)

process_folder

处理文件夹中所有支持的文件-解析文档或提取结构化数据。

支持的格式:

  • 图像:APNG、BMP、DCX、DDS、DIB、GD、GIF、ICNS、JP2、JPEG、JPG、PCX、PNG、PPM、PSD、TGA、TIFF、WEBP
  • 文档:PDF、DOC、DOCX、PPT、PPTX、ODP、ODT
# Parse all PDFs in a folder
result = await process_folder(
    folder_path="/path/to/documents",
    operation="parse",  # or "extract" for structured data
    file_types="pdf",   # optional filter
    model="dpt-2-latest"
)

# Extract structured data from all documents
schema = {
    "type": "object",
    "properties": {
        "invoice_number": {"type": "string"},
        "total": {"type": "number"},
        "date": {"type": "string"}
    }
}

result = await process_folder(
    folder_path="/path/to/invoices",
    operation="extract",
    schema=schema,
    file_types="pdf,jpg"  # Process PDFs and images
)

# Process everything with defaults
result = await process_folder(
    folder_path="/path/to/mixed_documents"
)

特征:

  • 自动文件大小检测(对\50MB**:始终使用 create_parse_job

错误处理

result = await parse_document(document_path="/path/to/file.pdf")

if result.get("status") == "error":
    print(f"Error: {result['error']}")
    print(f"Status Code: {result.get('status_code')}")
else:
    # Process successful result
    markdown = result["markdown"]

常见错误代码

  • 401:API密钥无效
  • 413:文件太大(使用解析作业)
  • 422:验证错误
  • 429:超出费率限制

故障排除

常见问题及解决方法

“无法连接到MCP服务器”

  1. 未找到Python:确保配置中的Python路径正确
   # Find your Python path
   which python3
  1. 未找到模块错误:Python环境中未安装依赖项

- 如果使用uv:运行 uv sync 在项目目录中 - 如果使用venv:激活它并运行 pip install -r requirements.txt - 检查配置中的Python路径是否与您的环境匹配

  1. 生成python ENOONT:系统找不到Python

- 使用Python的完整路径(例如。, /usr/bin/python3 而不仅仅是 python) - 对于虚拟环境,请使用venv Python的完整路径

“服务器已断开连接”

  1. 检查服务器是否可以手动运行:
   cd /path/to/landingai-ade-mcp
   python server.py
   # Should see: "Starting LandingAI ADE MCP Server"
  1. 检查是否设置了API密钥:
   echo $LANDINGAI_API_KEY
  1. 检查是否安装了依赖项:
   python -c "import fastmcp, httpx, pydantic"
   # Should complete without errors

“ModuleNotFoundError:没有名为'fastmcp'的模块”

这意味着fastmcp没有安装在正在使用的Python环境中:

  • 如果使用虚拟环境:配置指向错误的Python
  • 解决方案:使用uv或确保Python路径与您的环境匹配

平台特定问题

macOS:如果你在Homebrew中安装了Python,路径可能是 /opt/homebrew/bin/python3 (苹果硅)或 /usr/local/bin/python3 (英特尔)

视窗:在路径中使用正斜杠或转义反斜杠: C:/path/to/python.exeC:\\path\\to\\python.exe

Linux:某些系统使用 python3 而不是 python。始终使用 python3 为了清楚起见。

调试步骤

  1. 独立测试服务器:
   python server.py
  1. 检查MCP通信:
   echo '{"jsonrpc": "2.0", "method": "initialize", "id": 1}' | python server.py
  1. 验证配置:

- 打开Claude Desktop开发人员设置 - 检查日志中的特定错误消息 - 确保所有路径都是绝对的,而不是相对的

  1. 验证API密钥:
   python -c "import os; print('API Key set:', bool(os.environ.get('LANDINGAI_API_KEY')))"

API文档

目录标签

目录标签

PythonClaude结构化数据文档解析本地部署数据提取PDF处理办公文档

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Python

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

7

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-keyremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP