文档处理服务器

Aparavi MCP服务器是一个集成了Aparavi文档处理能力的模型上下文协议服务器,允许语言模型通过API处理文档并获取清理后的文本输出。

  • by HendrikKrack
  • 本地部署
  • 更新于
在 GitHub 查看 hendrikkrack/dtc-mcp-server

使用说明

Aparavi MCP服务器

与Aparavi的文档处理功能集成的MCP(模型上下文协议)服务器。该服务器允许语言模型通过Aparavi的API处理文档,并接收干净的文本输出。

特性

  • 📄 通过Aparavi API进行文件处理
  • 🧹 无元数据的干净文本提取
  • 🔌 MCP兼容接口
  • ⚙️ 基于环境的配置
  • 🚀 异步处理支持
  • 📦 通过NPX轻松安装
  • 🔍 系统图的OCR功能
  • 🐍 基于Python的Node.js包装器

目录

先决条件

  • Python 3.8或更高版本
  • Node.js 14或更高版本
  • Git(用于开发设置)

快速启动安装

对于用户

最快的入门方法是使用 npx:

首先从我们的开发门户获取您的API-Key 这里 (你可以看这个 视频 用于定向)。

  1. 运行服务器

    # For Unix/Linux/macOS - Set API keys in terminal
    export APARAVI_API_KEY=your_api_key_here
    
    # For Windows - Set API keys in Command Prompt
    set APARAVI_API_KEY=your_api_key_here
    
    # OR for Windows PowerShell
    $env:APARAVI_API_KEY="your_api_key_here"
    
    # Run the server (same command for all platforms)
    npx aparavi-mcp@latest
    
  2. 将服务器添加到客户端 更新您的 MCP_config.json 客户端中的文件(帆板运动, 克劳德, 光标)与此:

     {
       "mcpServers": {
         "aparavi": {
           "url": "http://localhost:8000/mcp"
         }
       }
     }
    
    

对于开发者

对于本地开发和测试:

  1. 克隆存储库

    git clone https://github.com/AparaviSoftware/mcp-server
    cd mcp-server
    
  2. 设置Python环境

     npx aparavi-mcp@latest
    
  3. 运行测试 首先,确保您的服务器正在运行(从步骤1开始)。然后,您可以运行和配置测试:

    # Run the test tool
    python tests/test_tool.py
    

    要测试不同的工具或文件,请打开 tests/test_tool.py 并修改 main() 功能:

    def main():
        # Change the file path to test different documents
        file_path = "tests/testdata/test_document.txt"
        # Or try other test files:
        # file_path = "tests/testdata/SDD_RoadTrip.pdf"
        # file_path = "tests/testdata/system_diagram.jpeg"
    
        # Change the tool name to test different tools
        tool_name = "document_processor"
        # Available tools:
        # - "Aparavi_Document_Processor" (for text documents)
        # - "Advanced_OCR_Parser" (for diagrams/images)
    
        run_tool_test(file_path, tool_name)
    

配置

所需的环境变量

  • APARAVI_API_KEY:您的Aparavi API密钥(必需)

项目结构

aparavi-mcp/
├── bin/                    # Executable scripts
│   ├── index.js           # Node.js entry point
│   └── setup.sh           # Python environment setup
|__ prompts/               #Preconfigured prompts
├── tools/                 # MCP tool implementations
├── resources/             # Configuration and resources
├── tests/                 # Test files
├── mcp-server.py         # Main Python server
├── requirements.txt      # Python dependencies
└── package.json         # Node.js package config

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。