使用说明
Aparavi MCP服务器
与Aparavi的文档处理功能集成的MCP(模型上下文协议)服务器。该服务器允许语言模型通过Aparavi的API处理文档,并接收干净的文本输出。
特性
- 📄 通过Aparavi API进行文件处理
- 🧹 无元数据的干净文本提取
- 🔌 MCP兼容接口
- ⚙️ 基于环境的配置
- 🚀 异步处理支持
- 📦 通过NPX轻松安装
- 🔍 系统图的OCR功能
- 🐍 基于Python的Node.js包装器
目录
先决条件
- Python 3.8或更高版本
- Node.js 14或更高版本
- Git(用于开发设置)
快速启动安装
对于用户
最快的入门方法是使用 npx:
首先从我们的开发门户获取您的API-Key 这里 (你可以看这个 视频 用于定向)。
-
运行服务器
# 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 -
将服务器添加到客户端 更新您的
MCP_config.json客户端中的文件(帆板运动, 克劳德, 光标)与此:{ "mcpServers": { "aparavi": { "url": "http://localhost:8000/mcp" } } }
对于开发者
对于本地开发和测试:
-
克隆存储库
git clone https://github.com/AparaviSoftware/mcp-server cd mcp-server -
设置Python环境
npx aparavi-mcp@latest -
运行测试 首先,确保您的服务器正在运行(从步骤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许可证获得许可-请参阅 许可证 文件以获取详细信息。
