批量操作服务器

一个高效的模型上下文协议(MCP)服务器,用于执行批量操作,支持并行处理、智能分组和全面的错误处理。

  • by ahmedibrahim085
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 ahmedibrahim085/mcp-batch-server

使用说明

MCP批处理操作服务器

一种高效的模型上下文协议(MCP)服务器,用于执行具有并行处理、智能分组和全面错误处理的批处理操作。

特性

  • 并行处理:以可配置的限制同时执行多个操作
  • 智能分组:按类型自动对操作进行分组,以获得最佳性能
  • 差错恢复:根据配置继续处理错误或立即停止
  • 重试逻辑:用于失败操作的内置重试机制
  • 综合录井:用于调试和监控的详细操作日志
  • 多种操作类型:文件操作、代码分析和转换

安装

  1. 克隆此存储库:
git clone https://github.com/ahmedibrahim085/mcp-batch-server.git
cd mcp-batch-server
  1. 安装依赖项:
npm install
  1. 构建服务器:
npm run build

Claude桌面配置

添加到您的Claude Desktop配置(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "batch-operations": {
      "command": "node",
      "args": [
        "/path/to/mcp-batch-server/dist/index.js"
      ]
    }
  }
}

使用示例

基本文件操作

await batch_file_operations({
  operations: [
    { type: "create", path: "/tmp/file1.txt", content: "Hello" },
    { type: "create", path: "/tmp/file2.txt", content: "World" }
  ],
  options: { maxConcurrent: 10 }
});

批次代码分析

await batch_code_analysis({
  files: ["/src/app.js", "/src/utils.js"],
  analyses: ["complexity", "dependencies"]
});

发展

# Run in development mode
npm run dev

# Run tests
npm test

# Build for production
npm run build

许可证

麻省理工学院