GM

gms64260/mcp-glpi

效率工作流

本页由 AI 翻译,技术细节请以原文为准。 查看原文

36 stars 30 forks 质量 83 趋势 20MIT

GLPI MCP 服务器 - IT 服务管理集成

概览

一个模型上下文协议(MCP)服务器,向像Claude这样的AI助手展示GLPI(IT服务管理)。 v3 是基于 v2 的基础和覆盖范围的全面改造。完整变更列表请参见 CHANGELOG.md;本 README 的其余部分记录了今天公开的内容。 - :统一的HTTP层,401自动重新认证,结构化错误,5xx重试。- :多条件,包含AND/OR / 和 NOT / 或NOT,强制显示,分页,fetch_all,专用计数探针。- :/listSearchOptions/{itemtype}被缓存,field_id ↔名称转换在GLPI版本间保持有效。- glpi_search_tickets接受友好参数,glpi_tickets_stats_by按状态/类别/技术员/实体/月份分类计数。- :时间线(跟进+任务+解决方案+验证),验证请求/批准,工单链接,文档附件,满意度,逾期(SLA)工单。- :详细信息视图返回users_id_tech:42和已解决的名称,这样LLM无需猜测。

概述(AI 翻译)

一个模型上下文协议服务器 GLPI,开源IT服务管理 套件。它提供一个AI助手(Claude Desktop、Claude Code、Cursor、Open) WebUI,任何MCP客户端)46个基于GLPI REST API的工具:工单及其 时间线、问题、变更、验证、资产以及其他所有常见内容 项目类型、用户和组、知识库、多条件搜索和 报告。输出是为模型上下文窗口构建的紧凑JSON,写成 工具带有注释,且可用一个变量关闭,50 V3 的工具名依然作为隐藏的别名工作。

版本为4.0.0。详见 CHANGELOG.md 中的发布说明和 从下面3.x升级过来。

安装和配置

要求:Node.js 20 或更高版本,支持 GLPI 10 或 11 实例,支持 REST API enabled (设置 > 通用> API)、一个 API 客户端(应用令牌,可选)以及一个 用户API令牌(我的设置>远程访问密钥)或登录和密码。

stdio:Claude 桌面,Claude 代码,光标

stdio是默认的传输方式:客户端启动服务器并与之通信 通过stdin/stdout。Claude桌面(claude_desktop_config.json)和光标 (~/.cursor/mcp.json 或 '.cursor/mcp.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

mcp-glpi

A Model Context Protocol server for GLPI, the open-source IT service management suite. It gives an AI assistant (Claude Desktop, Claude Code, Cursor, Open WebUI, any MCP client) 46 tools over the GLPI REST API: tickets and their timeline, problems, changes, validations, assets and every other common itemtype, users and groups, the knowledge base, multi-criteria search and reporting. Outputs are compact JSON built for a model’s context window, write tools are annotated and can be switched off with one variable, and the 50 tool names of v3 keep working as hidden aliases.

Version 4.1.0. See CHANGELOG.md for the release notes and Upgrading from 3.x below.

Install and configure

Requirements: Node.js 20 or later, a GLPI 10 or 11 instance with the REST API enabled (Setup > General > API), an API client (app token, optional) and a user API token (My settings > Remote access keys) or a login and password.

stdio: Claude Desktop, Claude Code, Cursor

stdio is the default transport: the client starts the server and talks to it over stdin/stdout. Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json or .cursor/mcp.json in a project) use the same shape:

{
  "mcpServers": {
    "glpi": {
      "command": "npx",
      "args": ["-y", "mcp-glpi"],
      "env": {
        "GLPI_URL": "https://glpi.example.com",
        "GLPI_APP_TOKEN": "your-app-token",
        "GLPI_USER_TOKEN": "your-user-token",
        "GLPI_READ_ONLY": "1"
      }
    }
  }
}

Drop GLPI_READ_ONLY to allow writes. Claude Code:

claude mcp add glpi \
  -e GLPI_URL=https://glpi.example.com \
  -e GLPI_APP_TOKEN=your-app-token \
  -e GLPI_USER_TOKEN=your-user-token \
  -- npx -y mcp-glpi

The server opens a GLPI session at startup (or on the first call if GLPI is unreachable then) and closes it when the client disconnects.

Streamable HTTP: Open WebUI and other web clients

MCP_TRANSPORT=http GLPI_URL=https://glpi.example.com GLPI_USER_TOKEN=... npx -y mcp-glpi
# same with flags
npx -y mcp-glpi --http --host 127.0.0.1 --port 3000 --path /mcp
MCP GLPI Server v4.0.0 listening on http://127.0.0.1:3000/mcp
  transport: streamable HTTP (stateless, JSON responses)
  auth: none — bind to loopback or set MCP_HTTP_AUTH_TOKEN before exposing this port
Flag Description
--http Shorthand for --transport http
--transport stdio (default) or http
--host Bind address (default 127.0.0.1)
--port Port; 0 picks a free port (default 3000)
--path Endpoint path (default /mcp)
-h, --help Print usage

CLI flags win over the MCP_* variables. Endpoints: POST /mcp (JSON-RPC, one JSON response per request) and GET /health (liveness, no auth, no GLPI

在 GitHub 查看完整 README

安装

npx -y mcp-glpi
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "glpi": { "command": "npx", "args": ["-y", "mcp-glpi"], "env": { "GLPI_URL": "https://glpi.example.com", "GLPI_APP_TOKEN": "your-app-token", "GLPI_USER_TOKEN": "your-user-token", "GLPI_READ_ONLY": "1" } } } }