K

KPI-MCP-Server

stonecoming/KPI-MCP-Server
0 Stars 27 次浏览 更新于 2026-08-23

KPI-MCP-Server # 概述 KPI-MCP-Server 是一个用于管理和处理关键性能指标(KPI)的服务器应用程序。它提供了一系列API接口,允许用户创建、更新、删除和查询KPI数据。 # 安装 要安装 KPI-MCP-Server,请按照以下步骤操作: 1. 克隆仓库: bash git clone https://github.com/your-repo/kpi-mcp-server.git 2. 进入项目目录: bash cd kpi-mcp-server 3. 安装依赖项: bash pip install -r requirements.txt 4. 配置环境变量: 请根据您的环境设置以下环境变量: - `DATABASE_URL`: 数据库连接字符串 - `SECRET_KEY`: 应用程序密钥 - `DEBUG`: 是否启用调试模式(`True` 或 `False`) 5. 初始化数据库: bash python manage.py migrate 6. 启动服务器: bash python manage.py runserver # API 文档 以下是 KPI-MCP-Server 提供的主要 API 接口: ## 创建 KPI - **URL**: `/api/kpis/` - **Method**: `POST` - **Request Body**: json { "name": "KPI Name", "description": "KPI Description", "target_value": 100, "current_value": 80 } - **Response**: json { "id": 1, "name": "KPI Name", "description": "KPI Description", "target_value": 100, "current_value": 80, "created_at": "2023-10-01T12:00:00Z" } ## 更新 KPI - **URL**: `/api/kpis/{id}/` - **Method**: `PUT` - **Request Body**: json { "name": "Updated KPI Name", "description": "Updated KPI Description", "target_value": 120, "current_value": 90 } - **Response**: json { "id": 1, "name": "Updated KPI Name", "description": "Updated KPI Description", "target_value": 120, "current_value": 90, "created_at": "2023-10-01T12:00:00Z" } ## 删除 KPI - **URL**: `/api/kpis/{id}/` - **Method**: `DELETE` - **Response**: json { "message": "KPI deleted successfully" } ## 查询 KPI - **URL**: `/api/kpis/` - **Method**: `GET` - **Query Parameters**: - `name` (可选): KPI 名称 - `page` (可选): 分页页码,默认为 1 - `page_size` (可选): 每页条目数,默认为 10 - **Response**: json { "count": 1, "next": null, "previous": null, "results": [ { "id": 1, "name": "KPI Name", "description": "KPI Description", "target_value": 100, "current_value": 80, "created_at": "2023-10-01T12:00:00Z" } ] } # 联系我们 如果您有任何问题或建议,请通过 [issues](https://github.com/your-repo/kpi-mcp-server/issues) 或 [email](mailto:support@yourdomain.com) 与我们联系。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "OpenHarmony-Community-Key-KPI-MCP-Server": {
      "args": [
        "run",
        "server.py"
      ],
      "command": "uv"
    }
  }
}

服务介绍

json
{
"mcpServers": {
"OpenHarmony-Community-Key-KPI-MCP-Server": {
"args": [
"run",
"server.py"
],
"command": "uv"
}
}
}

相关 MCP 服务