Skip to main content
Glama
GLPI MCP Server v2

GLPI MCP Server v2

by Luizcc87

GLPI MCP Server v2

🌐 English version · Português (Brasil)

MCP (Model Context Protocol) server in TypeScript/Node for GLPI integration. Uses the GLPI API v2.3 (via OAuth2) to provide ITIL coverage and built-in tools (tickets, problems, changes, knowledgebase, stats, assets, administration) directly to AI agents.

This project consolidates multiple tools, avoids repeated requests, and delivers data in formats optimized for LLM consumption.

🌟 Credits and Acknowledgments

This project reuses structure and tool coverage from:

Adapted for the new GLPI API v2.3 (OAuth2). Thanks to the original authors (GMS64260 and DevSkillsIT) for the architectural inspiration and ITIL mapping business logic.

Related MCP server: mcp-itop

🚀 Features (Tools)

Tools focused on productivity are provided, including:

  • Assistance: Creation, update, search (with RSQL filters), and full read (including timeline in 1 request) of Tickets, Problems, and Changes. Statistics and follow-up addition.

  • Knowledgebase: Article search and read.

  • Assets: Computer listing and read (with flag for detailed specs inclusion).

  • Administration: User search, user context read, and group listing.

🛠 Installation

  1. Clone the repository or download the files.

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

⚙️ Configuration (.env)

Create a .env file in the project root, based on the .env.example file:

GLPI_BASE_URL=http://localhost:8080
GLPI_CLIENT_ID=seu_client_id_oauth2
GLPI_CLIENT_SECRET=seu_client_secret_oauth2
GLPI_USERNAME=usuario_glpi
GLPI_PASSWORD=senha_glpi

How to create the OAuth2 API Client in GLPI

  1. Access GLPI (version 11 / v2.3 enabled).

  2. Go to Configuration → OAuth Clients (/front/oauthclient.php).

  3. Add a new client.

  4. Under Grants, add Password (password grant — recommended for scripts/agents).

  5. Under Scopes, select at least api (and user if using user context tools).

  6. Save and copy the Client ID (identifier) and Client Secret shown on the saved item.

🔌 Registration in MCP Client

The server runs via stdio (node dist/index.js + environment variables), so any compatible MCP client can register it. Below are examples per client.

Claude Desktop / Claude Code

File claude_desktop_config.json (Desktop) or .mcp.json (Claude Code, in the project root):

{
  "mcpServers": {
    "glpi-v2": {
      "command": "node",
      "args": [
        "caminho/absoluto/para/glpi-mcp-v2/dist/index.js"
      ],
      "env": {
        "GLPI_BASE_URL": "http://localhost:8080",
        "GLPI_CLIENT_ID": "seu_client_id_oauth2",
        "GLPI_CLIENT_SECRET": "seu_client_secret_oauth2",
        "GLPI_USERNAME": "usuario_glpi",
        "GLPI_PASSWORD": "senha_glpi"
      }
    }
  }
}

Antigravity (IDE and CLI)

File ~/.gemini/config/mcp_config.json (global) or .agents/mcp_config.json (per workspace):

{
  "mcpServers": {
    "glpi-v2": {
      "command": "node",
      "args": [
        "caminho/absoluto/para/glpi-mcp-v2/dist/index.js"
      ],
      "env": {
        "GLPI_BASE_URL": "http://localhost:8080",
        "GLPI_CLIENT_ID": "seu_client_id_oauth2",
        "GLPI_CLIENT_SECRET": "seu_client_secret_oauth2",
        "GLPI_USERNAME": "usuario_glpi",
        "GLPI_PASSWORD": "senha_glpi"
      }
    }
  }
}

Codex CLI (OpenAI)

File ~/.codex/config.toml (global) or .codex/config.toml (per project, in a trusted environment):

[mcp_servers.glpi-v2]
command = "node"
args = ["caminho/absoluto/para/glpi-mcp-v2/dist/index.js"]

[mcp_servers.glpi-v2.env]
GLPI_BASE_URL = "http://localhost:8080"
GLPI_CLIENT_ID = "seu_client_id_oauth2"
GLPI_CLIENT_SECRET = "seu_client_secret_oauth2"
GLPI_USERNAME = "usuario_glpi"
GLPI_PASSWORD = "senha_glpi"

Or via codex mcp add glpi-v2 --command node --args absolute/path/to/glpi-mcp-v2/dist/index.js (interactive, for the env vars).

Hermes Agent

hermes mcp add glpi-v2 --command "node caminho/absoluto/para/glpi-mcp-v2/dist/index.js"

The environment variables (GLPI_BASE_URL, GLPI_CLIENT_ID, etc.) must be available in the environment where Hermes runs, or configured via .env in the project directory (the server loads them via dotenv, if applicable — check src/config.ts).

OpenClaw

File ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "glpi-v2": {
        "command": "node",
        "args": [
          "caminho/absoluto/para/glpi-mcp-v2/dist/index.js"
        ],
        "transport": "stdio",
        "env": {
          "GLPI_BASE_URL": "http://localhost:8080",
          "GLPI_CLIENT_ID": "seu_client_id_oauth2",
          "GLPI_CLIENT_SECRET": "seu_client_secret_oauth2",
          "GLPI_USERNAME": "usuario_glpi",
          "GLPI_PASSWORD": "senha_glpi"
        }
      }
    }
  }
}

Note: the Hermes Agent and OpenClaw examples above follow each project's public documentation at the time of writing, but have not been tested directly against this server. Validate the connection locally (list the exposed tools) before relying on it in production.

Alternative: HTTP transport

If the client does not support stdio, the server also exposes StreamableHTTPServerTransport (see src/httpServer.ts). Set MCP_TRANSPORT=http and, optionally, MCP_HTTP_PORT (default 3000) in the process environment variables. The endpoint is at http://localhost:<port>/mcp (POST) — point the client to that URL instead of a local command.

📄 OpenAPI Spec (development reference)

The swagger-v2.3.json file (complete OpenAPI spec of the v2.3 API, dynamically generated by GLPI) is not versioned (git-ignored — 4.6MB, generated). To regenerate from a running GLPI instance:

curl -s "http://SEU_GLPI/api.php/doc.json" -o swagger-v2.3.json

🌐 HTTP Mode (Express)

The server optionally supports HTTP communication, using the recommended stateless endpoint (POST /mcp). To enable this mode, set the environment variables:

  • MCP_TRANSPORT=http (default is stdio)

  • MCP_HTTP_PORT=3000 (Optional, sets the Express server port)

Example request to list the tools using curl:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'

License

MIT

Available Tools

30 tools
glpi_add_change_followupA

Adiciona um followup (acompanhamento) à timeline de um change.

Inputs: id (required), content (required), is_private.

glpi_add_problem_followupB

Adiciona um followup (acompanhamento) à timeline de um problem.

Inputs: id (required), content (required), is_private.

glpi_add_ticket_followupC

Adiciona um followup (acompanhamento) à timeline de um ticket.

Inputs: id (required), content (required), is_private.

glpi_create_changeC

Cria um novo change.

Inputs: input (required).

glpi_create_problemC

Cria um novo problem.

Inputs: input (required).

glpi_create_ticketB

Cria um novo ticket.

Inputs: input (required).

glpi_get_asset_statsC

Retorna estatísticas de ativos (assets) associados a chamados, mudanças ou problemas.

Inputs: itemtype (required), date_end, date_start.

glpi_get_changeA

Retorna o contexto completo de UM change, incluindo timeline, sem precisar de múltiplas chamadas.

Inputs: id (required).

glpi_get_change_statsC

Retorna as estatísticas de um change.

Inputs: id (required).

glpi_get_change_timelineB

Retorna a timeline de UM change (followups, tasks, etc).

Inputs: id (required).

glpi_get_computerC

Retorna o contexto completo de UM computador, incluindo especificações de hardware (CPU, memória, disco, rede) e software instalado.

Inputs: id (required).

glpi_get_knowbase_itemA

Retorna o conteúdo completo de um artigo da base de conhecimento.

Inputs: id (required), language.

glpi_get_problemC

Retorna o contexto completo de UM problem, incluindo timeline, sem precisar de múltiplas chamadas.

Inputs: id (required).

glpi_get_problem_statsC

Retorna as estatísticas de um problem.

Inputs: id (required).

glpi_get_problem_timelineA

Retorna a timeline de UM problem (followups, tasks, etc).

Inputs: id (required).

glpi_get_ticketA

Retorna o contexto completo de UM ticket, incluindo timeline, sem precisar de múltiplas chamadas.

Inputs: id (required).

glpi_get_ticket_statsC

Retorna as estatísticas de um ticket.

Inputs: id (required).

glpi_get_ticket_timelineA

Retorna a timeline de UM ticket (followups, tasks, etc).

Inputs: id (required).

glpi_get_user_contextC

Retorna o contexto de UM usuário, incluindo itens usados e gerenciados.

Inputs: id (required).

glpi_list_computersC

Busca e lista computadores (Assets). Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter, include_specs.

glpi_list_groupsA

Busca e lista grupos (Groups). Permite paginação e filtros.

Inputs: limit, start, filter.

glpi_search_changesC

Busca e lista changes. Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter.

glpi_search_faqA

Busca artigos marcados como FAQ na base de conhecimento (is_faq=true). Use para dúvidas rápidas de uso do GLPI antes de abrir ticket.

Inputs: limit, query, start, language.

glpi_search_knowbaseA

Busca artigos na base de conhecimento (Knowledgebase). Permite paginação (start, limit) e filtros (filter).

Inputs: limit, start, filter, language.

glpi_search_problemsA

Busca e lista problems. Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter.

glpi_search_ticketsB

Busca e lista tickets. Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter.

glpi_search_userA

Busca e lista usuários (Users). Permite paginação e filtros.

Inputs: limit, start, filter.

glpi_update_changeA

Atualiza campos de um change existente.

Inputs: id (required), input (required).

glpi_update_problemC

Atualiza campos de um problem existente.

Inputs: id (required), input (required).

glpi_update_ticketC

Atualiza campos de um ticket existente.

Inputs: id (required), input (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 30 tools

    Disambiguation4/5

    Tools mostly target distinct resources and actions: tickets, problems, changes, knowledgebase, computers, users, and groups are clearly named. Some overlap exists between full-context getters and standalone timeline getters, and between knowledgebase search and FAQ search, but the descriptions help disambiguate them.

    Naming Consistency4/5

    Nearly all tools follow glpi_verb_entity snake_case with consistent create/update/search/get/add patterns for the main ITSM entities. Minor deviations include list_computers/list_groups versus search_* for the other collections, and get_knowbase_item versus get_computer/get_ticket.

    Tool Count2/5

    At 30 tools, this is above the 25-tool heavy threshold and the set includes redundant timeline endpoints that duplicate the full-context getters. A leaner set around 20-22 tools could cover the same GLPI modules without extra selection burden.

    Completeness3/5

    The core ticket/problem/change lifecycle is well covered with search, get, create, update, and followup, and there is read access to knowledgebase, computers, users, and groups. However, there are no create/update/delete operations for computers, users, or groups, no knowledgebase write tools, and no task/solution-specific endpoints for tickets, problems, or changes.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      MCP server allowing an AI assistant to interact directly with your GLPI instance via its REST API, enabling ticket management, knowledge base operations, and statistics.
      40
      4
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for iTop ITSM that provides 19 tools for analytics, ticket management, comments, knowledge base, and CI impact analysis, enabling AI assistants to interact with iTop.
      1
      -
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for the Snipe-IT asset management REST API, enabling read and write operations on assets, licenses, accessories, and more.
      13
      Apache 2.0