# NexTool for GLPI MCP server

> Connect AI clients to GLPI to manage tickets, ITIL processes, assets, and the knowledge base via REST and OAuth2 APIs.

- Repository: https://github.com/NexTools-Solutions/nextool-mcp-glpi
- Page: https://hostedmcp.org/servers/nextools-solutions/glpi
- Transport: stdio, remote
- Stars: 1
- License: MIT
- Latest version: 3.5.7

## Install

### Claude Code

```sh
claude mcp add --env 'GLPI_APP_TOKEN=<YOUR_GLPI_APP_TOKEN>' --env 'GLPI_USER_TOKEN=<YOUR_GLPI_USER_TOKEN>' --env 'GLPI_V2_CLIENT_SECRET=<YOUR_GLPI_V2_CLIENT_SECRET>' --env 'GLPI_V2_PASSWORD=<YOUR_GLPI_V2_PASSWORD>' glpi -- npx -y @nextoolsolutions/mcp-glpi
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "glpi": {
      "command": "npx",
      "args": [
        "-y",
        "@nextoolsolutions/mcp-glpi"
      ],
      "env": {
        "GLPI_APP_TOKEN": "<YOUR_GLPI_APP_TOKEN>",
        "GLPI_USER_TOKEN": "<YOUR_GLPI_USER_TOKEN>",
        "GLPI_V2_CLIENT_SECRET": "<YOUR_GLPI_V2_CLIENT_SECRET>",
        "GLPI_V2_PASSWORD": "<YOUR_GLPI_V2_PASSWORD>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "glpi": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@nextoolsolutions/mcp-glpi"
      ],
      "env": {
        "GLPI_APP_TOKEN": "<YOUR_GLPI_APP_TOKEN>",
        "GLPI_USER_TOKEN": "<YOUR_GLPI_USER_TOKEN>",
        "GLPI_V2_CLIENT_SECRET": "<YOUR_GLPI_V2_CLIENT_SECRET>",
        "GLPI_V2_PASSWORD": "<YOUR_GLPI_V2_PASSWORD>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"glpi","type":"stdio","command":"npx","args":["-y","@nextoolsolutions/mcp-glpi"],"env":{"GLPI_APP_TOKEN":"<YOUR_GLPI_APP_TOKEN>","GLPI_USER_TOKEN":"<YOUR_GLPI_USER_TOKEN>","GLPI_V2_CLIENT_SECRET":"<YOUR_GLPI_V2_CLIENT_SECRET>","GLPI_V2_PASSWORD":"<YOUR_GLPI_V2_PASSWORD>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "glpi": {
      "command": "npx",
      "args": [
        "-y",
        "@nextoolsolutions/mcp-glpi"
      ],
      "env": {
        "GLPI_APP_TOKEN": "<YOUR_GLPI_APP_TOKEN>",
        "GLPI_USER_TOKEN": "<YOUR_GLPI_USER_TOKEN>",
        "GLPI_V2_CLIENT_SECRET": "<YOUR_GLPI_V2_CLIENT_SECRET>",
        "GLPI_V2_PASSWORD": "<YOUR_GLPI_V2_PASSWORD>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add glpi --env 'GLPI_APP_TOKEN=<YOUR_GLPI_APP_TOKEN>' --env 'GLPI_USER_TOKEN=<YOUR_GLPI_USER_TOKEN>' --env 'GLPI_V2_CLIENT_SECRET=<YOUR_GLPI_V2_CLIENT_SECRET>' --env 'GLPI_V2_PASSWORD=<YOUR_GLPI_V2_PASSWORD>' -- npx -y @nextoolsolutions/mcp-glpi
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.glpi]
command = "npx"
args = ["-y", "@nextoolsolutions/mcp-glpi"]

[mcp_servers.glpi.env]
GLPI_APP_TOKEN = "<YOUR_GLPI_APP_TOKEN>"
GLPI_USER_TOKEN = "<YOUR_GLPI_USER_TOKEN>"
GLPI_V2_CLIENT_SECRET = "<YOUR_GLPI_V2_CLIENT_SECRET>"
GLPI_V2_PASSWORD = "<YOUR_GLPI_V2_PASSWORD>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'GLPI_APP_TOKEN=<YOUR_GLPI_APP_TOKEN>' -e 'GLPI_USER_TOKEN=<YOUR_GLPI_USER_TOKEN>' -e 'GLPI_V2_CLIENT_SECRET=<YOUR_GLPI_V2_CLIENT_SECRET>' -e 'GLPI_V2_PASSWORD=<YOUR_GLPI_V2_PASSWORD>' glpi npx -- -y @nextoolsolutions/mcp-glpi
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "glpi": {
      "command": "npx",
      "args": [
        "-y",
        "@nextoolsolutions/mcp-glpi"
      ],
      "env": {
        "GLPI_APP_TOKEN": "<YOUR_GLPI_APP_TOKEN>",
        "GLPI_USER_TOKEN": "<YOUR_GLPI_USER_TOKEN>",
        "GLPI_V2_CLIENT_SECRET": "<YOUR_GLPI_V2_CLIENT_SECRET>",
        "GLPI_V2_PASSWORD": "<YOUR_GLPI_V2_PASSWORD>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `GLPI_APP_TOKEN` | no | yes | GLPI API Application Token |
| `GLPI_USER_TOKEN` | no | yes | GLPI API User Token (API v1 tools) |
| `GLPI_V2_CLIENT_SECRET` | no | yes | OAuth2 client secret (API v2) |
| `GLPI_V2_PASSWORD` | no | yes | Password of that user (API v2) |
| `GLPI_ALLOW_DELETE` | no | no | Enable destructive tools (default false) |
| `GLPI_DEFAULT_PAGE_SIZE` | no | no | Items returned when no range is given (default 25) |
| `GLPI_IDEMPOTENCY_WINDOW` | no | no | Seconds an identical create is replayed instead of repeated (default 120, 0 disables) |
| `GLPI_MAX_PAGE_SIZE` | no | no | Hard ceiling of items per call (default 200) |
| `GLPI_MAX_RETRIES` | no | no | Max retry attempts on 429/5xx (default 3) |
| `GLPI_READ_ONLY` | no | no | Block every write and destructive tool (default false) |
| `GLPI_REQUIRE_DELETE_REASON` | no | no | Require a reason on destructive tools (default true) |
| `GLPI_RESOURCE_CACHE_TTL` | no | no | Resource cache TTL in ms (default 300000) |
| `GLPI_TIMEOUT` | no | no | Request timeout in ms (default 30000) |
| `GLPI_TOOLSETS` | no | no | Named tool presets, comma-separated: core, tickets, itil, assets, kb, documents, users, search, admin, v2 |
| `GLPI_TOOLS_EXCLUDE` | no | no | Comma-separated globs: drop matching tools |
| `GLPI_TOOLS_INCLUDE` | no | no | Comma-separated globs: register matching tools (adds to GLPI_TOOLSETS; with neither set, every tool registers) |
| `GLPI_URL` | no | no | GLPI instance URL for the API v1 tools (apirest.php or api.php/v1) |
| `GLPI_V2_API_VERSION` | no | no | API version path, e.g. v2.2 (default v2) |
| `GLPI_V2_CLIENT_ID` | no | no | OAuth2 client ID (API v2) |
| `GLPI_V2_SCOPE` | no | no | OAuth2 scope (default api) |
| `GLPI_V2_URL` | no | no | GLPI 11 URL for the API v2 tools (glpi_v2_*) |
| `GLPI_V2_USERNAME` | no | no | GLPI user for the OAuth2 password grant (API v2) |
| `MCP_INSTANCES_FILE` | no | no |  |

## Tools (111)

- `glpi_list_tickets`: List GLPI tickets of the whole instance (every ticket the connected user may see), most recently updated first by default. Filter by status (e.g. status: 'open' = not solved nor closed) and choose the sort column and direction. Each row carries status_name, type_name, priority_name (in the GLPI user's language), category_name, and requesters and assigned technicians as {id, name}. For the connected user's OWN tickets ("my tickets") use glpi_list_my_tickets instead. (read-only)
- `glpi_list_my_tickets`: "My tickets": tickets of the connected GLPI user (or of users_id) where they are requester, assigned technician or observer. Defaults: open tickets only (not solved nor closed), most recently updated first. Each row names the people: requesters, assigned and observers as {id, name}, plus status_name and my_roles. Use this for "meus chamados", "my open tickets", "tickets assigned to me". (read-only)
- `glpi_get_ticket`: Retrieve a single ticket by ID. IDs come with names beside them (recipient_name, category_name, entity_name; status_name, type_name, priority_name in the GLPI user's language). Requesters, technicians and observers are not ticket fields: list them with glpi_list_ticket_users (and groups with glpi_list_ticket_groups). (read-only)
- `glpi_create_ticket`: Create a new ticket. Common fields: name (title), content (description), entities_id, users_id_requester, itilcategories_id, type (1=Incident, 2=Request), urgency, impact, priority.
- `glpi_update_ticket`: Update an existing ticket by ID.
- `glpi_list_changes`: List change management items, most recently updated first by default, with status_name and priority_name (in the GLPI user's language) and category_name. (read-only)
- `glpi_get_change`: Retrieve a change by ID, with names beside the IDs and status/priority labels in the GLPI user's language. (read-only)
- `glpi_create_change`: Create a new change. Common fields: name, content, entities_id, users_id_requester.
- `glpi_update_change`: Update an existing change by ID.
- `glpi_list_change_followups`: List followups (comments) of a change, with the author's name (user_name). (read-only)
- `glpi_list_problems`: List problem management items, most recently updated first by default, with status_name and priority_name (in the GLPI user's language) and category_name. (read-only)
- `glpi_get_problem`: Retrieve a problem by ID, with names beside the IDs and status/priority labels in the GLPI user's language. (read-only)
- `glpi_create_problem`: Create a new problem. Common fields: name, content, entities_id, users_id_requester.
- `glpi_update_problem`: Update an existing problem by ID.
- `glpi_list_problem_followups`: List followups (comments) of a problem, with the author's name (user_name). (read-only)
- `glpi_search`: Search GLPI items with criteria. itemtype: Ticket, User, Change, Problem, Computer, etc. Each criterion is {field, searchtype, value, link}: field = search option ID, searchtype = contains | equals | notequals | lessthan | morethan | under, link = AND | OR (omit on the first). Rows come keyed by the search option names in the GLPI user's language ('Título', 'ID', 'Status'...); coded columns (status, priority, urgency, impact, type, approval) hold the GLPI label and the code sits beside it as '<name> (id)' (e.g. 'Status': 'Solucionado', 'Status (id)': 5). named_columns=false returns the raw search keyed by option ID ('1', '2'...). Use glpi_list_search_options to discover the option IDs for criteria, forcedisplay and sort. (read-only)
- `glpi_add_followup`: Add a comment/followup to a ticket.
- `glpi_list_followups`: List followups (comments) of a ticket, oldest first, with the author's name (user_name). (read-only)
- `glpi_add_solution`: Add a solution to a ticket (status changes to Solved).
- `glpi_list_ticket_validations`: List approval/validation requests for a ticket, with requester and approver names (user_name, validator_name) and status_name in the GLPI user's language (status: 1 = not subject to approval, 2 = waiting, 3 = granted, 4 = refused). (read-only)
- `glpi_create_ticket_validation`: Create an approval request assigning a validator (users_id_validate).
- `glpi_update_ticket_validation`: Approve/refuse a validation (status: accepted/refused) or change the approver.
- `glpi_delete_ticket_validation`: Remove a validation request by ID.
- `glpi_get_user`: Retrieve a user by ID. (read-only)
- `glpi_search_user_by_email`: Find users by exact email address (returns the user items: id, login, real name, first name...). (read-only)
- `glpi_list_users`: List all users with optional pagination and dropdown expansion. (read-only)
- `glpi_create_user`: Create a new GLPI user. Required: name (login). Common: realname, firstname, password, email (via _useremails array).
- `glpi_update_user`: Update an existing user by ID.
- `glpi_list_documents`: List documents with optional pagination. (read-only)
- `glpi_get_document`: Retrieve a document by ID. (read-only)
- `glpi_create_document`: Create a document (metadata). Fields: name, entities_id, comment, etc.
- `glpi_delete_document`: Permanently delete a document by ID.
- `glpi_list_document_items`: List links between documents and other items. (read-only)
- `glpi_get_document_item`: Retrieve a Document_Item link by ID. (read-only)
- `glpi_create_document_item`: Create a link between a document and an item (Ticket, KnowbaseItem, etc.).
- `glpi_delete_document_item`: Remove a Document_Item link by ID.
- `glpi_list_knowbase_items`: List knowledge base articles with optional pagination. (read-only)
- `glpi_get_knowbase_item`: Retrieve a knowledge base article by ID. (read-only)
- `glpi_create_knowbase_item`: Create a new knowledge base article. Fields: name, answer (HTML content), knowbaseitemcategories_id, etc.
- `glpi_update_knowbase_item`: Update a knowledge base article by ID.
- `glpi_delete_knowbase_item`: Permanently delete a knowledge base article.
- `glpi_list_knowbase_categories`: List knowledge base categories with optional pagination. (read-only)
- `glpi_get_knowbase_category`: Retrieve a knowledge base category by ID. (read-only)
- `glpi_create_knowbase_category`: Create a new knowledge base category.
- `glpi_update_knowbase_category`: Update a knowledge base category by ID.
- `glpi_delete_knowbase_category`: Permanently delete a knowledge base category.
- `glpi_list_entities`: List GLPI entities (organizational units) with optional pagination. (read-only)
- `glpi_get_entity`: Retrieve an entity by ID. (read-only)
- `glpi_create_entity`: Create a new entity. Fields: name (required), entities_id (parent, 0=Root), comment, address, etc.
- `glpi_update_entity`: Update an existing entity by ID.
- `glpi_delete_entity`: Permanently delete an entity by ID. WARNING: irreversible action.
- `glpi_get_rule_ticket`: Retrieve a ticket business rule (RuleTicket) by ID. (read-only)
- `glpi_list_rule_ticket_criteria`: List criteria (conditions) of a specific ticket rule (sub-items of RuleTicket). (read-only)
- `glpi_list_rule_ticket_actions`: List actions of a specific ticket rule (sub-items of RuleTicket). (read-only)
- `glpi_list_rule_criteria`: List rule criteria via GET /RuleCriteria. Optionally filter by rules_id (works for any rule type: RuleTicket, RuleChange, RuleMailCollector). (read-only)
- `glpi_list_rule_actions`: List rule actions via GET /RuleAction. Optionally filter by rules_id (works for any rule type: RuleTicket, RuleChange, RuleMailCollector). (read-only)
- `glpi_update_rule_action`: Update a rule action by ID. Fields: action_type, field, value.
- `glpi_list_rules`: List all ticket business rules (RuleTicket) with optional pagination. (read-only)
- `glpi_create_rule_ticket`: Create a new ticket business rule. Fields: name, match (AND/OR), is_active, sub_type, ranking, etc.
- `glpi_create_rule_criteria`: Create a new criteria for a rule. Fields: rules_id, criteria (field name), condition, pattern.
- `glpi_create_rule_action`: Create a new action for a rule. Fields: rules_id, action_type (assign/regex_result/append_regex_result), field, value.
- `glpi_list_itil_followup_templates`: List ITIL followup templates (predefined followup texts). (read-only)
- `glpi_get_itil_followup_template`: Retrieve a followup template by ID. (read-only)
- `glpi_create_itil_followup_template`: Create a new followup template. Fields: name, content, comment, itemtype (Ticket/Change/Problem).
- `glpi_update_itil_followup_template`: Update a followup template by ID.
- `glpi_list_search_options`: List available search fields for an itemtype. Critical for building search criteria with glpi_search. Returns field IDs, names, and types. (read-only)
- `glpi_change_active_entities`: Change the active entity for the current session. Essential for multi-entity GLPI instances. Use is_recursive=true to include sub-entities.
- `glpi_get_full_session`: Get the full session info including active entity, profile, and user details. Useful for debugging and verifying the current session context. (read-only)
- `glpi_list_ticket_users`: List all users linked to a ticket (requesters, observers, assigned), with each person's name (user_name) beside users_id and type_name (in the GLPI user's language). type: 1=Requester, 2=Assigned, 3=Observer. (read-only)
- `glpi_add_ticket_user`: Add a user to a ticket as requester, observer, or assigned. type: 1=Requester, 2=Assigned, 3=Observer.
- `glpi_delete_ticket_user`: Remove a user-ticket link by Ticket_User ID (get the ID from glpi_list_ticket_users).
- `glpi_list_ticket_groups`: List all groups linked to a ticket (requester, observer, assigned), with each group's name (group_name) beside groups_id and type_name (in the GLPI user's language). type: 1=Requester, 2=Assigned, 3=Observer. (read-only)
- `glpi_add_ticket_group`: Add a group to a ticket as requester, observer, or assigned. type: 1=Requester, 2=Assigned, 3=Observer.
- `glpi_delete_ticket_group`: Remove a group-ticket link by Group_Ticket ID (get the ID from glpi_list_ticket_groups).
- `glpi_list_ticket_tasks`: List tasks (to-do items) for a ticket, with author, technician and group names (user_name, tech_name, tech_group_name). (read-only)
- `glpi_add_ticket_task`: Add a task to a ticket. Fields: tickets_id, content (required). Optional: is_private (0/1), state (0=Info, 1=To do, 2=Done), actiontime (seconds), users_id_tech (assigned technician).
- `glpi_list_change_tasks`: List tasks for a change, with author, technician and group names. (read-only)
- `glpi_list_problem_tasks`: List tasks for a problem, with author, technician and group names. (read-only)
- `glpi_list_itil_categories`: List ITIL categories (ticket/change/problem classification). (read-only)
- `glpi_get_itil_category`: Retrieve an ITIL category by ID. (read-only)
- `glpi_list_groups`: List GLPI groups with optional pagination. (read-only)
- `glpi_get_group`: Retrieve a group by ID. (read-only)
- `glpi_add_change_followup`: Add a comment/followup to a change.
- `glpi_add_problem_followup`: Add a comment/followup to a problem.
- `glpi_add_change_solution`: Add a solution to a change (status changes to Solved).
- `glpi_add_problem_solution`: Add a solution to a problem (status changes to Solved).
- `glpi_get_my_entities`: Get the list of entities available to the current user. (read-only)
- `glpi_get_my_profiles`: Get the list of profiles available to the current user. (read-only)
- `glpi_list_locations`: List GLPI locations with optional pagination. (read-only)
- `glpi_get_location`: Retrieve a location by ID. (read-only)
- `glpi_list_assets`: List assets of a given type (Computer, Monitor, Printer, NetworkEquipment, Peripheral, Phone, Software, Rack, Enclosure), with location_name, state_name and user_name beside the IDs. Use glpi_search for filtered queries. (read-only)
- `glpi_get_asset`: Retrieve a single asset by type and ID. For hardware detail use glpi_get_asset_details. (read-only)
- `glpi_get_asset_details`: Use this read-only tool to inspect one known GLPI hardware asset by type and ID. It returns the base asset record plus the devices and disks sections by default; when GLPI has inventoried them, these sections include the operating system, processors, memory and storage. Request the softwares or networkports section only when the user asks for installed software or network interfaces because those lists can be large. Use glpi_get_asset when only the base asset record is needed. This tool does not modify the asset. (read-only)
- `glpi_create_asset`: Create an asset. Common fields: name, entities_id, serial, otherserial, locations_id, states_id, manufacturers_id, users_id, comment.
- `glpi_update_asset`: Update an existing asset by type and ID.
- `glpi_list_reservation_items`: List items flagged as reservable (the catalogue reservations point at). (read-only)
- `glpi_list_reservations`: List reservations (bookings) of reservable items. (read-only)
- `glpi_get_reservation`: Retrieve a reservation by ID. (read-only)
- `glpi_create_reservation`: Book a reservable item. begin/end use 'YYYY-MM-DD HH:MM:SS'. reservationitems_id comes from glpi_list_reservation_items (not the asset ID).
- `glpi_update_reservation`: Update an existing reservation by ID.
- `glpi_count_items`: Count matching items without transferring them — answers 'how many' in one cheap call. Use glpi_list_search_options to discover criteria field IDs. (read-only)
- `glpi_get_ticket_stats`: Ticket counts per built-in status (New, Processing assigned/planned, Pending, Solved, Closed), other_status_count for codes outside 1–6, and the total, without listing the tickets. Report other statuses separately and check counts_consistent before reporting an exact breakdown. For open tickets only, filter status (field 12) equals 'notold'; unfiltered counts include solved and closed tickets. Optional criteria narrow the scope, e.g. one entity: [{field: 80, searchtype: 'equals', value: <entity id>}] (Ticket search option IDs: 80 = entity, 4 = requester, 5 = technician, 7 = category; same criteria shape as glpi_search). (read-only)
- `glpi_list_timeline`: Followups, tasks, solutions and validations of a ticket, change or problem, merged into one chronological list (oldest first; order 'desc' for the latest first), with the people's names (user_name, tech_name, validator_name) and the solution type name. Replaces calling the four list tools separately and interleaving them by hand. (read-only)
- `glpi_list_webhooks`: List configured webhooks (event, itemtype, target URL, active flag). Requires GLPI 10.0.7 or newer. (read-only)
- `glpi_get_webhook`: Retrieve a webhook definition by ID, including its payload template. (read-only)
- `glpi_create_webhook`: Create a webhook. Common fields: name, url, itemtype (e.g. Ticket), event (new, update, delete), is_active, payload, http_method, use_cra_challenge.
- `glpi_update_webhook`: Update a webhook definition by ID.
- `glpi_set_webhook_active`: Turn a webhook on or off without touching the rest of its definition.
- `glpi_delete_webhook`: Delete a webhook. Set purge to remove it permanently instead of trashing it.
- `glpi_list_webhook_deliveries`: Delivery queue (QueuedWebhook): what was sent, when, and what is still pending, newest first. Filter by webhook name, or only_failed to see what has been retried. (read-only)
- `glpi_retry_webhook_delivery`: Queue a failed delivery for another attempt by resetting its send time and retry counter. The GLPI cron does the actual sending — there is no immediate-send endpoint.

## FAQ

### Which versions of GLPI are supported?

The server supports GLPI 9.5, 10, and 11.

### Can I run multiple GLPI instances with one server?

Yes, the HTTP entry point allows serving multiple NexTool environments from one place using an instances file.
