Glpi MCP Server
First MCP Server for GLPI ITSM β Connect Claude, ChatGPT and Copilot to your IT operations via natural language
Ask AI about Glpi MCP Server
Powered by Claude Β· Grounded in docs
I know everything about Glpi MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
GLPI MCP Server
Connect AI assistants (Claude, ChatGPT, Copilot) to your GLPI IT Service Management instance via the Model Context Protocol (MCP).
First MCP Server for GLPI β Manage tickets, search assets, and automate IT operations through natural language.
Features
- List Tickets β View open, assigned, waiting, or all tickets
- Get Ticket Details β Full ticket info with description and followup timeline
- Create Tickets β Open incidents or service requests via AI
- Update Tickets β π Change status, priority, or attribution
- Add Followups & Solutions β π Reply to or solve tickets directly
- Manage Tasks β π Create and view technical tasks for tickets
- ITIL Processes β π Create Changes and Problems
- Search Everything β Find computers, users, software, printers, and more
Supported Versions
| GLPI Version | API | Status |
|---|---|---|
| 10.0.x | Legacy REST API (/apirest.php) | β Supported |
| 11.0.x | HLAPI (/api.php) | β Supported |
Quick Start
1. Prerequisites
- Node.js 18+
- A GLPI instance with the REST API enabled
- An API User Token or username/password
2. Setup GLPI API Access
In your GLPI instance:
- Go to Setup > General > API
- Enable REST API (set to YES)
- Enable authentication method (Credentials and/or External Token)
- Note the API URL shown at the top
- Get your User Token from your user profile > Remote Access Keys > Regenerate
3. Install & Build
git clone https://github.com/your-user/glpi-mcp-server.git
cd glpi-mcp-server
npm install
npm run build
4. Configure Claude Desktop
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"glpi": {
"command": "node",
"args": ["/absolute/path/to/glpi-mcp-server/dist/index.js"],
"env": {
"GLPI_URL": "https://your-glpi-instance.com",
"GLPI_USER_TOKEN": "your_user_token_here",
"GLPI_APP_TOKEN": "your_app_token_here"
}
}
}
}
5. Restart Claude Desktop
After saving the config, restart Claude Desktop. You should see the GLPI tools available in the tools menu.
Environment Variables
| Variable | Required | Description |
|---|---|---|
GLPI_URL | Yes | Base URL of your GLPI instance. Do not include /api.php or /apirest.php unless you intentionally want to override auto-detection. |
GLPI_API_VERSION | No | API version. Defaults to 10; set 11 to enable HLAPI routing and OAuth2 authentication. |
GLPI_USER_TOKEN | v10 only* | User API token from the user profile. Preferred for GLPI 10 legacy REST auth. |
GLPI_USERNAME | v11 required** | GLPI username. Also valid for GLPI 10 when used with GLPI_PASSWORD. |
GLPI_PASSWORD | v11 required** | GLPI password. Also valid for GLPI 10 when used with GLPI_USERNAME. |
GLPI_APP_TOKEN | No | App token from API client config. |
GLPI_OAUTH_CLIENT_ID | v11 required** | OAuth2 Client ID for GLPI 11 HLAPI. |
GLPI_OAUTH_CLIENT_SECRET | v11 required** | OAuth2 Client Secret for GLPI 11 HLAPI. |
* For GLPI 10, either GLPI_USER_TOKEN or both GLPI_USERNAME + GLPI_PASSWORD are required.
** For GLPI 11, GLPI_USERNAME, GLPI_PASSWORD, GLPI_OAUTH_CLIENT_ID, and GLPI_OAUTH_CLIENT_SECRET are required.
Tools Reference
glpi_list_tickets
List tickets with optional status filter.
"Show me all open tickets"
"List waiting tickets, max 10"
"What tickets are assigned right now?"
glpi_get_ticket
Get complete details of a specific ticket.
"Show me ticket #42"
"What's the status of ticket 150?"
"Get the timeline for ticket 99"
glpi_create_ticket
Create a new incident or service request.
"Open a ticket: WiFi not working in meeting room 3"
"Create a request for a new monitor for JoΓ£o Silva"
glpi_add_followup
Add a followup message to an existing ticket.
"Reply to ticket 42: the router has been restarted"
"Add a private note to ticket 100 saying we're waiting for parts"
glpi_search
Search across any GLPI item type. Now supports advanced multi-criteria searches with AND/OR logic!
"Find all computers where location is Finance and OS is Windows"
"Search for user named Maria"
"List HP printers"
"Find software named Chrome"
Supported item types: Ticket, Computer, User, Software, NetworkEquipment, Monitor, Printer
glpi_list_search_options
Discover all possible search fields and their numeric IDs for any GLPI item type. Essential for advanced searches where fields aren't mapped by default (like Antivirus, installed software, etc.).
glpi_update_ticket π
Update an existing ticket's name, content, status, priority, etc.
glpi_add_solution π
Add a solution to a ticket and mark it as solved.
glpi_add_task π
Add a technical task to a ticket with state, planning, and duration.
glpi_get_ticket_tasks π
List all tasks associated with a ticket.
glpi_create_change π
Create an ITIL Change Request.
glpi_create_problem π
Create an ITIL Problem report.
glpi_request_validation π
Request validation for a ticket from a supervisor or manager.
glpi_get_ticket_validations π
List all validation requests associated with a ticket.
glpi_answer_validation π
Approve or Refuse an existing ticket validation request.
glpi_list_forms π
Discover available native GLPI 11 forms in the service catalog.
glpi_get_form_details π
Retrieve a native form's questions and sections.
glpi_submit_form π
Submit structured answers to a native GLPI 11 form.
Claude Code Configuration
For use with Claude Code, create a .mcp.json in your project root.
Example for GLPI 11 (OAuth2):
{
"mcpServers": {
"glpi": {
"command": "node",
"args": ["/absolute/path/to/glpi-mcp-server/dist/index.js"],
"env": {
"GLPI_URL": "https://your-glpi-instance.com",
"GLPI_API_VERSION": "11",
"GLPI_USERNAME": "your_username",
"GLPI_PASSWORD": "your_password",
"GLPI_OAUTH_CLIENT_ID": "your_client_id",
"GLPI_OAUTH_CLIENT_SECRET": "your_client_secret"
}
}
}
}
Example for GLPI 10 (Legacy REST):
{
"mcpServers": {
"glpi": {
"command": "node",
"args": ["/absolute/path/to/glpi-mcp-server/dist/index.js"],
"env": {
"GLPI_URL": "https://your-glpi-instance.com",
"GLPI_USER_TOKEN": "your_user_token_here"
}
}
}
}
Development
# Watch mode (recompile on changes)
npm run dev
# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js
Project Structure
glpi-mcp-server/
βββ src/
β βββ index.ts # Entry point, server setup
β βββ types.ts # TypeScript types and constants
β βββ services/
β β βββ glpi-client.ts # GLPI REST API client
β β βββ formatting.ts # Response formatting utilities
β βββ tools/
β βββ add-followup.ts # glpi_add_followup
β βββ add-solution.ts # glpi_add_solution
β βββ add-task.ts # glpi_add_task
β βββ answer-validation.ts # glpi_answer_validation
β βββ create-change.ts # glpi_create_change
β βββ create-problem.ts # glpi_create_problem
β βββ create-ticket.ts # glpi_create_ticket
β βββ get-form-details.ts # glpi_get_form_details
β βββ get-ticket.ts # glpi_get_ticket
β βββ get-ticket-tasks.ts # glpi_get_ticket_tasks
β βββ get-ticket-validations.ts # glpi_get_ticket_validations
β βββ list-forms.ts # glpi_list_forms
β βββ list-search-options.ts # glpi_list_search_options
β βββ list-tickets.ts # glpi_list_tickets
β βββ request-validation.ts # glpi_request_validation
β βββ search.ts # glpi_search (v2 Multi-Criteria)
β βββ submit-form.ts # glpi_submit_form
β βββ update-ticket.ts # glpi_update_ticket
βββ jest.config.js
βββ .env.example
βββ package.json
βββ tsconfig.json
βββ README.md
Knowledge Base & Guidelines
This section serves as the continuous knowledge base for project progress, maintainability, and testing.
Personas
- IT Administrator / Analyst (End-User): Uses AI assistants (like Claude) connected via this MCP server to manage tickets, search for assets, and automate daily IT operations without opening the GLPI interface.
- MCP Server Developer / Contributor: TypeScript developer responsible for maintaining the GLPI integration, adding new endpoints, ensuring API backward/forward compatibility (e.g., GLPI 10 REST to GLPI 11 HLAPI), and optimizing performance.
- AI Agent (System Persona): The LLM client connecting via MCP that acts as the intelligent middleman. It needs structured, clear, and comprehensive descriptions of tools and schemas to effectively parse user intent into GLPI actions.
Rules
- Code & Architecture: Maintain the clear separation of concerns. Keep
src/services/for API communication and data formatting, andsrc/tools/for the MCP tool definitions. All new code must be written in TypeScript. - API Interactions: Always respect GLPI API limits and handle authentication gracefully. Validate
GLPI_USER_TOKENand application tokens securely. - Type Safety: Strictly use TypeScript interfaces and Zod schemas (from
@modelcontextprotocol/sdk) to validate all inputs from the AI model before passing them to the GLPI client. - Error Handling: Format errors in a way that the AI Agent can read and relay back to the user clearly (e.g., "Missing permissions" instead of raw 403 stack traces).
- Stability: Ensure the server is stateless and can quickly recover or handle multiple concurrent agent requests.
- Documentation Sync: Every sensitive or architectural code change, new entity mapping, or workflow alteration MUST be immediately reflected inside this
README.mdfile to keep it as the reliable single source of truth for the project. - Roadmap Validation: The AI Assistant MUST proactively check the
Roadmapsection at the start of every session and update it whenever a feature moves from "In Progress" to "Completed". All new features discussed must be added to the roadmap before implementation begins. - Automated Testing: New or changed backend components, formatting utilities, and tool abstractions must be covered by automated tests (Jest). See TESTS.md for full testing rules, routines, and workflows.
Workflows
1. Developing a New Tool
- Define the Schema: Identify the GLPI endpoints needed. Create Zod schemas for the inputs.
- Implement the Service: Add the corresponding API call method to
src/services/glpi-client.ts. - Create the Tool Module: Create a new file in
src/tools/defining the tool's name, description, and execution logic. - Register: Import and register the new tool in
src/index.ts. - Compile: Run
npm run buildto update thedist/directory.
2. Local Testing Workflow
- Watch Mode: Run
npm run devto automatically recompile TypeScript on save. - MCP Inspector: Use the inspector to test the server in isolation (without Claude Desktop):
npx @modelcontextprotocol/inspector node dist/index.js - Configuration: Supply required environment variables within the inspector's UI to run tests against a staging or test GLPI environment. For GLPI 10, use
GLPI_URLplusGLPI_USER_TOKENorGLPI_USERNAME+GLPI_PASSWORD. For GLPI 11, useGLPI_URL,GLPI_API_VERSION=11,GLPI_USERNAME,GLPI_PASSWORD,GLPI_OAUTH_CLIENT_ID, andGLPI_OAUTH_CLIENT_SECRET. - Validation: Validate successful creation, retrieval, edge cases (e.g., invalid ticket IDs), and proper error returns.
Production Notes & Tips
- WAF / Firewall Bypass: Strict corporate firewalls often strip custom HTTP headers like
App-TokenorSession-Token, causing400 ERROR_WRONG_APP_TOKEN_PARAMETERerrors. To ensure maximum compatibility, this MCP server automatically injects tokens into the URL query string (?app_token=...) instead of HTTP headers for GLPI 10 legacy authentication. - Group Search: GLPI uses hierarchical group names (e.g.,
TECH_DEPT > INFRA > NETWORKS). When searching tickets by group, always use thecontainssearch type with the last part of the name (the "leaf") for best results. - Assignment Required: In some
glpi11environments, you must assign a technician to a ticket before the API allows registering a solution. If you get a 400 error when solving, check if the ticket has an assigned technician. - Escalade Plugin: If your instance uses the Escalade plugin, you can search for escalated tickets using field ID
1881("Grupo afetado pela escalada"). - API Versions:
GLPI_API_VERSION="11"enables HLAPI routing through/api.phpwith path patterns like/Assistance/Ticket. Without this variable, the server defaults to GLPI 10 legacy REST routing through/apirest.php.
3. Automated Testing Routine (Jest)
For all instructions related to writing tests, running tests, and test execution rules, please refer directly to the TESTS.md document.
Skills & Competencies Required
- TypeScript / Node.js: Advanced proficiency for robust server-side development.
- GLPI Architecture: Deep understanding of GLPI's Itemtypes (
Ticket,Computer,User,Software), ITIL concepts, and legacy REST API payload structures. - Model Context Protocol (MCP): Knowledge of building and debugging MCP servers using the official
@modelcontextprotocol/sdk. - System Integration: Ability to design safe, predictable integrations between unpredictable LLMs and strict database-backed systems.
Roadmap
Core v0.2.0 (Completed β )
- Cross-Version Support: Dynamic routing for
glpi10andglpi11. - Full ITSM Cycle: Ticket Solution, Tasks, Changes, and Problems.
- Advanced Search: Multi-criteria AND/OR search with field ID mapping.
- Escalade Plugin Support: Field 1881 mapping for
glpi11.
Enterprise ITSM (v0.3.0) β
- Approval Workflow (Validations):
glpi_request_validation: Send approval requests to Managers.glpi_answer_validation: Approve or Reject via Chat.glpi_get_ticket_validations: Monitor status of approvals.
- Native Forms (GLPI 11):
glpi_list_forms: Discovery of available service catalogs.glpi_get_form_details: Retrieve questions and form configuration.glpi_submit_form: Submit structured requests (Tickets/Changes).
Enterprise ITSM (Development ποΈ)
- Phase 3: SLA/OLA Management:
glpi_check_prazos: Real-time monitoring of TTO and TTR countdowns.
π Enterprise Blueprint: Approval Workflow
To achieve the Full ITSM Cycle, we will focus first on the Validation Engine. This allows the AI to act as a governance layer between the user and the technical execution.
| Asset | GLPI Itemtype | Action | Fields / Logic |
|---|---|---|---|
| Request | TicketValidation | POST | tickets_id, users_id_validate, comment_submission |
| Response | TicketValidation | PUT | status (2-Approve, 3-Refuse), comment_validation |
| Check | TicketValidation | GET | Filter by tickets_id to prevent duplicate requests. |
Implementation Strategy:
- Tool Logic: The AI must check for existing validations before requesting a new one.
- Status Sync: If a validation is refused, the AI should optionally move the Ticket to a
WaitingorClosedstatus automatically. - Escalation: Integration with the
Escaladeplugin to ensure validations follow the correct hierarchical chain.
π Enterprise Blueprint: Native Forms (GLPI 11)
Technical specification for the Service Catalog core integration.
| Asset | GLPI Itemtype | Action | Logic |
|---|---|---|---|
| Catalog | Glpi\Form\Form | GET | Discovery of active forms in entity. |
| Schema | Glpi\Form\Question | GET | List inputs (text, dropdown) for a form. |
| Sections | Glpi\Form\Section | GET | Structural grouping of questions. |
Workflow:
- Discovery: AI lists available catalogs using
glpi_list_forms. - Setup: AI fetches questions using
glpi_get_form_detailsto build the user interaction. - Submit: AI sends structured answers using
glpi_submit_form.
Infrastructure
- Active Notifications: Webhook receiver for push alerts (New critical tickets).
- MySQL Direct Read: Optional engine for high-performance reporting.
- Dockerization: Ready-to-go deployment image.
License
MIT
