glpi-mcp
Enables AI assistants to manage GLPI inventory, tickets, and CIA security fields via its REST API.
README
GLPI MCP Server
A Model Context Protocol (MCP) server for interacting with GLPI (Gestionnaire Libre de Parc Informatique) via its REST API.
This server empowers AI assistants (like Claude) to manage your GLPI inventory, tickets, and specifically CIA (Confidentiality, Integrity, Availability) security fields directly.
Features
- Core GLPI Operations:
- List, Get, Create, Update, Delete items (Computers, Tickets, Users, etc.).
- Native GLPI Search API support.
- Advanced CIA Management:
- Dedicated tools to view and update Security/CIA fields (
data_sensitivity,critical_asset,max_downtime). - Batch Updates: Update thousands of assets in a single request.
- Future-Proof: Supports custom/future plugin fields via dynamic parameters without code changes.
- Dedicated tools to view and update Security/CIA fields (
- Robust Authentication:
- Supports modern header-based auth and legacy body-based auth (
/apirest.php). - Built-in handling for OAuth plugin quirks.
- Supports modern header-based auth and legacy body-based auth (
Installation
npx -y glpi-mcp
Configuration
You need to provide the following environment variables to authenticate with your GLPI instance:
| Variable | Description | Required | Example |
|---|---|---|---|
GLPI_API_URL |
The full URL to your GLPI API endpoint. | Yes | http://your-glpi/apirest.php |
GLPI_APP_TOKEN |
The unique App Token generated in GLPI (Setup > General > API). | Yes | j0RHdOk... |
GLPI_USER_TOKEN |
The User Token from your personal settings. | Yes* | FOOKqs... |
GLPI_OAUTH_TOKEN |
OAuth Access Token (if using OAuth). | No** |
* Either GLPI_USER_TOKEN or GLPI_OAUTH_TOKEN is required.
** GLPI_OAUTH_TOKEN takes precedence if both are provided.
Claude Desktop Configuration
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"glpi": {
"command": "npx",
"args": ["-y", "glpi-mcp"],
"env": {
"GLPI_API_URL": "https://glpi.example.com/apirest.php",
"GLPI_APP_TOKEN": "your_app_token_here",
"GLPI_USER_TOKEN": "your_user_token_here"
}
}
}
}
Available Tools
1. Standard Item Management
glpi_list_items: List generic items (Computer, Ticket, User, etc.).glpi_get_item: Get details of a specific item.glpi_create_item: Create a new item (e.g., Ticket).glpi_update_item: Update standard fields of an item.glpi_delete_item: Delete or purge an item.glpi_search: Advanced search queries.
2. CIA / Security Fields Management 🛡️
Designed for working with the Generic Object or Fields plugins that add CIA ratings to assets.
glpi_get_cia_fields
View the current security ratings of an asset.
- Args:
itemType(e.g., "Computer"),id.
glpi_update_cia_fields
Update security ratings for a single asset.
- Args:
itemType,iddata_sensitivity(e.g., "Confidential")critical_asset(1 or 0)max_downtime(integer)other_fields(JSON string): Important! Use this to update any new fields you add to GLPI later without updating this server.- Example:
'{"new_custom_field": "some_value"}'
- Example:
glpi_update_cia_fields_batch
Update security ratings for multiple assets at once. Ideally used by scripts or for bulk policy application.
- Args:
itemTypeids(Comma-separated string:"42, 43, 44")data_sensitivity,critical_asset,max_downtimeother_fields
Examples
Batch Update Computers
Assign "Confidential" sensitivity to Computers with IDs 100, 101, and 102.
{
"name": "glpi_update_cia_fields_batch",
"arguments": {
"itemType": "Computer",
"ids": "100, 101, 102",
"data_sensitivity": "Confidential",
"critical_asset": 1
}
}
Future-Proofing with other_fields
If you add a new field called compliance_level to GLPI tomorrow, you can update it immediately:
{
"name": "glpi_update_cia_fields",
"arguments": {
"itemType": "Computer",
"id": 50,
"other_fields": "{\"compliance_level\": \"high\"}"
}
}
Troubleshooting
- 2FA/OTP Error on Publish: If you are trying to publish this package yourself and see OTP errors, use the provided helper script:
./publish_with_otp.sh. - 403 Forbidden: Verify your
GLPI_APP_TOKENandGLPI_USER_TOKEN. Ensure the user has write access to the specific assets. - Authorization Header Missing: Typical with the GLPI OAuth plugin. Ensure you are using the
/apirest.phpendpoint in your URL, or configure the plugin to acceptuser_token.
License
ISC
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。