商业管理API集成服务

Wint MCP Server是一个连接Claude等LLM客户端与Wint/Superkoll商业管理API的中间件,提供发票、费用、会计、薪资等89种工具。

  • by iggerask
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 iggerask/wint-mcp

使用说明

Wint MCP服务器

一个MCP服务器,允许Claude(和其他LLM客户端)直接访问 温特 /Superkoll API业务管理-发票、费用、会计、工资等。

Claude Desktop  <-->  wint-mcp (stdio)  <-->  Wint API

快速开始

1.获取Wint API证书

在温,去 设置>集成>自定义集成 并创建新的集成。这给了你一个 用户名 和 API密钥集成的权限控制MCP服务器可以访问的内容。

2.安装和构建

git clone <repo-url> wint-mcp
cd wint-mcp
npm install
npm run build

3.配置克劳德桌面

打开您的Claude Desktop配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 窗户: %APPDATA%\Claude\claude_desktop_config.json

添加服务器:

{
  "mcpServers": {
    "wint": {
      "command": "node",
      "args": ["/absolute/path/to/wint-mcp/dist/src/index.js"],
      "env": {
        "WINT_USERNAME": "your-username",
        "WINT_API_KEY": "your-api-key"
      }
    }
  }
}

重新启动克劳德桌面。您应该看到MCP工具图标下列出的“wint”。

模块

服务器暴露 89工具 跨12个模块,加上一个通用的回退工具,用于策划工具未涵盖的任何端点。

模块 关键 工具 它涵盖了什么
发票 invoicing 8 创建、发送和管理客户发票
收到的发票 incoming-invoices 10 供应商发票审批工作流、创建、路由、供应商目录
客户群 customers 5 客户CRUD和搜索
收据 receipts 9 费用报告、文件上传、类别、付款方式
报价单 quotations 5 报价/优惠
会计 accounting 11 账户、凭证、财务报告、维度、交易
工资待遇 salary 12 报告、工资单、批准、偏差、草案、规范
时间报告 time-reporting 4 时间日志和项目
公司简介 company 7 公司信息、员工、全球搜索
大家 todos 3 待办事项摘要、列表和打盹
文章 articles 3 产品/服务文章
自动化 automations 11 供应商自动审批规则、WintCard分类规则
后备方案 始终加载 1 通用 wint_api_call 对于任何API端点

限制活动模块

默认情况下,所有模块都已加载。要仅加载特定模块,请设置 WINT_MODULES 环境变量:

{
  "mcpServers": {
    "wint": {
      "command": "node",
      "args": ["/absolute/path/to/wint-mcp/dist/src/index.js"],
      "env": {
        "WINT_USERNAME": "your-username",
        "WINT_API_KEY": "your-api-key",
        "WINT_MODULES": "invoicing,customers,receipts"
      }
    }
  }
}

这减少了LLM看到的工具数量,这可以提高响应质量,并且在您仅具有某些区域的API权限时非常有用。

这 wint_api_call 无论此设置如何,回退工具始终可用。

回退工具

Wint API有数百个端点。策划的模块涵盖了最常见的工作流程,但 wint_api_call 让克劳德打电话 任何 通过指定HTTP方法、路径和可选的params/body,可以直接访问端点。它的描述包括一个完整的端点索引,这样LLM就知道有什么可用的。

发展

npm run dev       # Run with tsx (no build step)
npm run build     # Compile TypeScript
npm test          # Run tests
npm run test:watch # Run tests in watch mode

项目结构

src/
  index.ts              # Entrypoint (stdio transport)
  server.ts             # MCP server setup, tool registration
  auth/client.ts        # Wint API HTTP client (basic auth)
  security.ts           # Path validation, error sanitization
  tools/
    registry.ts         # Module map, WINT_MODULES filtering
    types.ts            # WintTool interface, shared schemas
    fallback.ts         # Generic wint_api_call tool
    invoicing.ts        # Invoice tools
    incoming-invoices.ts
    customers.ts
    receipts.ts
    quotations.ts
    accounting.ts
    salary.ts
    time-reporting.ts
    company.ts
    todos.ts
    articles.ts
    automations.ts      # Automation rule tools
  generated/
    endpoint-index.ts   # Auto-generated API endpoint list

添加新模块

  1. 创建 src/tools/your-module.ts 出口a WintTool[] 数组
  2. 导入并添加到 moduleMap 在 src/tools/registry.ts
  3. 更新 MODULE_NAMES 长度断言 registry.test.ts
  4. 跑 npm test && npm run build

许可证

麻省理工学院