Skip to main content
Glama
Luizcc87

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: GLPI MCP

πŸš€ 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

Install Server
A
license - permissive license
C
quality
A
maintenance

Maintenance

–Maintainers
–Response time
0dRelease cycle
6Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for interacting with GitLab API, supporting both self-hosted instances and gitlab.com. Provides tools for managing issues, merge requests, code review, pipelines, milestones, releases, search, and file access.
    514
    MIT
  • 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
    The Unlicense
  • F
    license
    Not graded
    quality
    C
    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

View all related MCP servers

Related MCP Connectors

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

  • MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Luizcc87/glpi-mcp-v2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server