
GLPI MCP
io.github.mhajder由 GitHub 帳號 mhajder 發布v0.1.1更新於 Nov 7, 2026
MCP server for GLPI IT service management (tickets, assets, users, knowledge base)
概覽
將助理連接到 GLPI IT 服務管理執行個體,可查詢與管理工單、資產、使用者、知識庫文章與文件。
- 可以做什麼
- 搜尋、讀取、建立、更新與刪除工單、變更與問題,包含時間軸、跟進、任務、解決方案、簽核與團隊成員
- 搜尋與管理各類資產(含自訂資產)及財務資訊
- 尋找使用者、群組、實體與設定檔,並檢視實體樹
- 搜尋、讀取與撰寫知識庫文章與分類
- 尋找並下載文件
- 瀏覽任意 GLPI 端點與 schema,通用地列出或寫入項目,並執行唯讀 GraphQL 查詢
- 適用情境
- 適合讓助理在 GLPI 服務台中工作:分派與更新工單、查詢資產與使用者、草擬知識庫文章,或依據 GLPI 資料回答問題。唯讀模式與試跑模式便於謹慎地初次試用。
- 執行需求
- 以 Python 套件(Python 3.11 至 3.15)透過 uvx 或 pip 在本機執行,或以 Docker 映像透過 HTTP 執行。需要已啟用 API 的 GLPI 11.0.6 以上或 12 執行個體及一個 OAuth 用戶端;需設定 GLPI_URL、GLPI_CLIENT_ID、GLPI_CLIENT_SECRET、GLPI_USERNAME 與 GLPI_PASSWORD。實體、設定檔、傳輸方式、OIDC 與速率限制為選用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 GLPI MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
GLPI MCP Server
Let AI agents work with GLPI tickets, assets and the knowledge base through the Model Context Protocol
GLPI MCP Server is a Python-based Model Context Protocol (MCP) server for the GLPI IT service management platform. It talks to GLPI's High-Level API (/api.php, OAuth2) and gives AI assistants and automation tools access to tickets, changes and problems (with their timeline and team), assets, users, groups, entities, the knowledge base and documents, plus generic tools that reach every endpoint GLPI exposes. It supports read and write operations, with read-only and dry-run modes, per-user GLPI access and OAuth login for remote MCP clients.
✨ Features
Core Features
- Search tickets, changes and problems by status, type, priority, category, entity, dates, text or any RSQL filter
- Read the full timeline of an item: followups, tasks, solutions, approvals and documents
- Search and read assets of every type (including custom assets), with financial information
- Find users, groups, entities and profiles
- Search and read knowledge base articles; download documents
- Discover every endpoint and schema from GLPI's own OpenAPI document, so nothing is hard-coded to one GLPI version
Management Operations
- Create, update and delete tickets, changes and problems (if enabled)
- Add followups, tasks, solutions and approval requests
- Assign technicians and groups, add requesters and observers
- Create, update and delete assets and knowledge base articles
- Create, update and delete items at any endpoint with the generic tools
Advanced Capabilities
- Supports GLPI 11.0.6+ (API 2.3) and GLPI 12 (API 3.0, or 2.3 if pinned); the version is detected and pinned in every request
- OAuth password grant with token caching and renewal
- Per-user access: token passthrough, or sign-in with GLPI accounts (OAuth login) for remote MCP clients
- OIDC login through an external identity provider, or a static bearer token
- Read-only mode, dry-run mode and tag-based tool filtering
- HTML rich text converted to plain text to save tokens
- Rate limiting, response size limit and optional tool-search transform
- Multiple transport options (STDIO, SSE, HTTP) and optional Sentry integration
🚀 Installation
Prerequisites
- Python 3.11 to 3.15
- GLPI 11.0.6 or newer (including 12.x). GLPI 10 and GLPI 11.0.0-11.0.5 are not supported: they lack High-Level API 2.3
- The API enabled in Setup > General > API ("Enable API")
- An OAuth client (see GLPI setup)
Quick Install from PyPI
The easiest way to get started is to install from PyPI:
Remember to configure the environment variables for your GLPI instance before running the server:
Install from Source
- Clone the repository:
- Install dependencies:
- Configure environment variables:
- Run the server:
Using Docker
A Docker image is available on GitHub Packages for easy deployment. It runs the
HTTP Streamable transport on port 8000 (/mcp).
When GLPI login or OIDC is enabled, mount a
volume on /data so OAuth client registrations survive container recreation.
Open WebUI
Open WebUI 0.6.31 and later connect to the image directly. In Open WebUI, go to
Admin Settings > Integrations > External Tool Servers, add a connection of
type MCP (Streamable HTTP) with the URL http://<host>:8000/mcp, and set
Bearer authentication to your MCP_HTTP_BEARER_TOKEN.
With GLPI login or OIDC enabled, use the
public URL + /mcp and choose OAuth 2.1 authentication instead; Open WebUI
registers itself as a client, so if you restrict redirect URIs, include your
Open WebUI URL.
Development Setup
For development with additional tools:
🔧 Configuration
GLPI setup
- Enable the API: Setup > General > API > "Enable API".
- Create an OAuth client: Setup > OAuth clients > Add.
- Grants: Password (for
GLPI_USERNAME/GLPI_PASSWORD). Add Authorization Code for GLPI login. - Scopes: api and user. Add graphql for
glpi_graphql_query. - For GLPI login, set the redirect URI to
GLPI_OAUTH_BASE_URL+GLPI_OAUTH_REDIRECT_PATH. - Copy the generated client ID and secret.
- Grants: Password (for
- Create a GLPI user for the server (for example
glpi-mcp) with a profile that has just the rights the tools need. Every tool call acts as this user, unless per-user access is enabled.
Environment Variables
See .env.example for every setting with comments.
API versions
GLPI lists the High-Level API versions it offers at GET /api.php/. On first use
the server reads that list and pins one version in every request path
(/api.php/v2.3/... or /api.php/v3.0/...), because GLPI silently routes an
unknown version to its newest one.
Set GLPI_API_VERSION=2.3 to keep GLPI 12 on the 2.3 schemas (for example while
migrating other integrations). The tools that depend on a schema difference
handle both: knowledge base articles are filed under categories on 2.3 and
under parent articles (parents) on 3.0.
Entity and profile
GLPI scopes every API session to an active profile and entities. By default
these are the user's defaults. GLPI_ENTITY, GLPI_ENTITY_RECURSIVE and
GLPI_PROFILE send the GLPI-Entity, GLPI-Entity-Recursive and GLPI-Profile
headers with every request to change them. glpi_whoami shows the active ones
and glpi_get_entity_tree lists the entities available.
🧰 Available Tools
Server & Session
glpi_server_info: API versions GLPI offers, the pinned version, auth mode and safety modesglpi_whoami: The GLPI user the tools act as, with the active profile and entitiesglpi_get_entity_tree: Entities the current user can work in
Tickets, Changes & Problems
All take itil_type: Ticket (default), Change or Problem.
glpi_search_itil: Search by status, type, priority, category, entity, dates, text or filterglpi_get_itil: One item with its description and teamglpi_get_itil_timeline: Followups, tasks, solutions, approvals and documentsglpi_create_itil/glpi_update_itil/glpi_delete_itil: Create, update, deleteglpi_add_itil_followup: Add a followup (public or private)glpi_add_itil_task: Add a task with state, time spent, technician and planningglpi_add_itil_solution: Add a solutionglpi_request_itil_validation: Ask a user or group to approve a ticket or changeglpi_list_itil_team: Requesters, assignees and observersglpi_add_itil_team_member/glpi_remove_itil_team_member: Assign or remove users, groups and suppliers
Assets
glpi_list_asset_types: Asset types of this GLPI, including custom assetsglpi_search_assets: Search one asset type, or all at once, by name, serial, inventory number or filterglpi_get_asset: One asset, optionally with financial informationglpi_create_asset/glpi_update_asset/glpi_delete_asset: Create, update, delete
Users, Groups, Entities & Profiles
glpi_search_users/glpi_get_user: Find users; get one by ID or loginglpi_search_groups/glpi_get_group: Find groups; get one by IDglpi_search_entities/glpi_get_entity: Find entities; get one by IDglpi_list_profiles: Profiles (sets of rights)
Knowledge Base
glpi_search_kb_articles/glpi_get_kb_article: Search and read articlesglpi_create_kb_article/glpi_update_kb_article: Create and update articlesglpi_list_kb_categories: Categories (API 2.3), or top-level articles (API 3.0)
Documents
glpi_search_documents/glpi_get_document: Find documents and read their metadataglpi_download_document: Download a file (text, or base64 for binary files)
The High-Level API has no file upload, so documents are uploaded through GLPI itself.
Generic
glpi_list_endpoints: Every endpoint path with its methods, from GLPI's OpenAPI documentglpi_describe_schema: Properties, types and enums of a schema, for filters and writesglpi_list_items: List any collection with filters, sorting, paging and field selectionglpi_get_item: Get any item or resourceglpi_create_item/glpi_update_item/glpi_delete_item: Write to any endpointglpi_graphql_query: Read-only GraphQL query (needs thegraphqlscope)
Filtering
List tools accept filters, a dict turned into GLPI's RSQL, and filter, raw RSQL.
Both are AND-ed:
Suffixes: __ne, __in, __out, __lt, __le, __gt, __ge, __like,
__ilike (* is the wildcard), __isnull, __isnotnull, __empty,
__notempty. A list means "any of"; None means "is null". Nested properties
use dot paths (status.id, entity.id). glpi_describe_schema lists the
properties of each schema. Computed properties, such as the team of a ticket,
cannot be filtered on; GLPI answers HTTP 500.
🔐 Authentication for MCP Clients
How MCP clients authenticate to this server (HTTP transports), and as whom the tools then act in GLPI. Pick one:
The per-user modes (GLPI login and token passthrough) cannot be combined with each
other, with OIDC or with MCP_HTTP_BEARER_TOKEN; the server refuses to start.
GLPI login: users sign in with GLPI
Many MCP clients (Claude, Open WebUI, remote connectors) can only authenticate
over OAuth with Dynamic Client Registration. With GLPI_OAUTH_LOGIN=true the
server offers that OAuth interface and brokers it to GLPI's own OAuth server
(/api.php/authorize, /api.php/token) using FastMCP's OAuthProxy. Users
approve the MCP client on this server's consent page, sign in on the GLPI login
page and click Accept on GLPI's "wants to access your GLPI account" page.
Every tool call then runs with that user's own GLPI token, rights and entities.
GLPI's refresh tokens are used when the access token expires.
- On the OAuth client in GLPI, allow the Authorization Code grant, the
apianduserscopes, and set the redirect URI toGLPI_OAUTH_BASE_URL+GLPI_OAUTH_REDIRECT_PATH, for examplehttps://glpi-mcp.example.com/auth/callback. - Configure the server:
GLPI_USERNAME and GLPI_PASSWORD are not needed. GLPI_OAUTH_ALLOWED_REDIRECT_URIS
restricts which MCP clients may complete the flow; leaving it unset accepts any
redirect URI a client registers.
Token passthrough
With GLPI_TOKEN_PASSTHROUGH=true, each MCP client sends its own GLPI OAuth
access token as Authorization: Bearer <token>. The server checks it against
GLPI (GET /session, cached for a minute) and forwards it on every call, so each
client acts as its own GLPI user. The server's own credentials are never used.
The client is responsible for obtaining and refreshing its token.
OIDC / OAuth Authentication (Optional)
For OAuth-only MCP clients when the tools should act as one service account, the
server can act as an OAuth interface in front of an existing OIDC identity
provider (Authentik, Keycloak, PocketID, Auth0, Entra ID, ...) using FastMCP's
OIDCProxy. No GLPI credential ever reaches the client.
Create a confidential client on your identity provider with the redirect URI
set to OIDC_BASE_URL + OIDC_REDIRECT_PATH, for example
https://glpi-mcp.example.com/auth/callback.
A partially configured OIDC setup is ignored with a warning. When OIDC is
configured it takes precedence over MCP_HTTP_BEARER_TOKEN.
OIDC_VERIFY_ID_TOKEN=trueverifies theid_tokeninstead of the access token, for identity providers that issue opaque access tokens.OIDC_FORWARD_RESOURCEis off by default because identity providers without RFC 8707 support reject the authorization request withinvalid_request.
Persisting OAuth state
With GLPI login or OIDC, client registrations and encrypted tokens are stored on
disk under FastMCP's data directory. If it is not persistent, every restart forces
all clients to register and sign in again. The Docker image sets
FASTMCP_HOME=/data, so mount a volume there:
Running behind a reverse proxy
GLPI_OAUTH_BASE_URL / OIDC_BASE_URL must be the externally reachable HTTPS URL,
and the proxy must forward the Host header unchanged, otherwise the OAuth
metadata this server advertises will point at the wrong host.
🔒 Security & Safety Features
Read-Only Mode
The server supports a read-only mode that hides every write tool:
Dry-Run Mode
Write tools stay available but only return the request they would send (method, endpoint and body); nothing is changed in GLPI:
Tag-Based Tool Filtering
You can disable specific categories of tools by setting disabled tags:
Tags: session, generic, graphql, itil, tickets, assets,
administration, users, groups, entities, profiles, knowledgebase,
documents, write, read-only.
Safe writes
- A write whose request was sent but whose answer never arrived (timeout, dropped connection) is reported as possibly applied, never retried blindly.
5xxanswers to a create are not retried, as GLPI may have created the item.- A redirect that would turn a write into a GET is reported as not applied.
- Deletes move items to the trash unless
force=trueis given. A delete retried after a server error that then finds the item gone is reported as deleted. GLPI_TIMEOUTis the total for one request: version lookup, token, the request and its retries share it.- Generic tools reject endpoint paths that leave the API or name the OAuth endpoints.
Response Size Limit
Caps every tool response, so a large listing cannot flood the model's context.
Tool Search for Large Toolsets
FastMCP tool search can reduce prompt size for servers with many tools.
When enabled, list_tools returns two synthetic tools:
search_tools: Finds matching tools and returns their full schemascall_tool: Executes any discovered tool by name
Tool search respects existing visibility controls (read-only mode and disabled tags).
Rate Limiting
Requests are limited per client using a sliding window. With per-user access, each GLPI user gets their own window.
Sentry Error Tracking & Monitoring (Optional)
The server optionally supports Sentry for error tracking and performance monitoring. Install the optional dependency:
If SENTRY_DSN is not set, no monitoring data is collected.
SSL/TLS Configuration
Transport Configuration
STDIO Transport (Default)
HTTP SSE Transport (Server-Sent Events)
HTTP Streamable Transport
Health Endpoint
Both HTTP transports (sse and http) serve GET /health, which answers 200 ok
when the server is handling requests. It needs no bearer token or OAuth login and
does not contact GLPI, so a GLPI outage does not mark the MCP server unhealthy.
The Docker image's HEALTHCHECK uses it:
For more information on FastMCP transports, see the FastMCP documentation.
🤝 Contributing
Contributions are welcome. See CONTRIBUTING.md for the dev setup, checks and commit message format, and use the issue templates for bugs and feature requests.
Found a security problem? Please report it privately as described in SECURITY.md.
📜 License
MIT License - see LICENSE for details.
來源:README.md,提交 0a4be03
工具
0版本歷史
2- v0.1.1最新Nov 7, 2026
- v0.1.0Oct 26, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分