Skip to main content

GLPI MCP

Servidor MCP que expone tools para consultar y crear tickets en la API REST de GLPI (App Token + User Token).

Suscripción requerida

Este MCP requiere una suscripción activa. Obtén tu token de suscripción en https://globalsoft.lat/pages/glpi y configúralo en la variable SUBSCRIPTION_TOKEN. Sin un token válido las tools no se ejecutan.

Tools

Tool Descripción
list_tickets Lista tickets abiertos (opcionalmente filtrados por solicitante).
list_closed_tickets Lista tickets cerrados.
get_ticket Obtiene un ticket por id (valida opcionalmente por solicitante).
create_ticket Crea un ticket (Incidente o Solicitud).
list_followups Lista seguimientos públicos de un ticket.
add_followup Agrega un seguimiento (o nota privada) a un ticket.
list_assets Lista activos vía el search AllAssets.
list_problems Lista problemas abiertos.
list_closed_problems Lista problemas cerrados.
list_changes Lista cambios abiertos.
list_closed_changes Lista cambios cerrados.

Requisitos

  • uv (incluye uvx).
  • Credenciales de la API de GLPI: GLPI_BASE_URL, GLPI_APP_TOKEN y GLPI_USER_TOKEN.
  • Token de suscripción: SUBSCRIPTION_TOKEN (ver arriba).

Instalación rápida

No requiere instalación previa; uvx descarga y ejecuta el paquete:

uvx glpi-mcp==0.1.2

El transporte por defecto es stdio, que es lo que usan los clientes MCP. El servidor lee las credenciales desde variables de entorno.

Variables de entorno

Variable Obligatoria Descripción
GLPI_BASE_URL Sí URL base de GLPI sin /apirest.php. Ej: https://glpi.ejemplo.com
GLPI_APP_TOKEN Sí App Token generado en GLPI (Setup > General > API).
GLPI_USER_TOKEN Sí User Token del usuario de API.
SUBSCRIPTION_TOKEN Sí Token de suscripción de la plataforma (https://globalsoft.lat/pages/glpi).

Configuración por cliente

Reemplaza <url_glpi>, <glpi_app_token>, <glpi_user_token> y <subscription_token> por tus valores.

Claude Code

claude mcp add glpi \
  -e GLPI_BASE_URL=<url_glpi> \
  -e GLPI_APP_TOKEN=<glpi_app_token> \
  -e GLPI_USER_TOKEN=<glpi_user_token> \
  -e SUBSCRIPTION_TOKEN=<subscription_token> \
  -- uvx glpi-mcp==0.1.2

Codex

CLI:

codex mcp add glpi \
  --env GLPI_BASE_URL=<url_glpi> \
  --env GLPI_APP_TOKEN=<glpi_app_token> \
  --env GLPI_USER_TOKEN=<glpi_user_token> \
  --env SUBSCRIPTION_TOKEN=<subscription_token> \
  -- uvx glpi-mcp==0.1.2

O en ~/.codex/config.toml (o .codex/config.toml en el proyecto):

[mcp_servers.glpi]
command = "uvx"
args = ["glpi-mcp==0.1.2"]
env = { GLPI_BASE_URL = "<url_glpi>", GLPI_APP_TOKEN = "<glpi_app_token>", GLPI_USER_TOKEN = "<glpi_user_token>", SUBSCRIPTION_TOKEN = "<subscription_token>" }

Antigravity

En ~/.gemini/config/mcp_config.json (global) o .agents/mcp_config.json (workspace):

{
  "mcpServers": {
    "glpi": {
      "command": "uvx",
      "args": ["glpi-mcp==0.1.2"],
      "env": {
        "GLPI_BASE_URL": "<url_glpi>",
        "GLPI_APP_TOKEN": "<glpi_app_token>",
        "GLPI_USER_TOKEN": "<glpi_user_token>",
        "SUBSCRIPTION_TOKEN": "<subscription_token>"
      }
    }
  }
}

opencode

En opencode.jsonc (o ~/.config/opencode/opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "glpi": {
      "type": "local",
      "command": ["uvx", "glpi-mcp==0.1.2"],
      "environment": {
        "GLPI_BASE_URL": "<url_glpi>",
        "GLPI_APP_TOKEN": "<glpi_app_token>",
        "GLPI_USER_TOKEN": "<glpi_user_token>",
        "SUBSCRIPTION_TOKEN": "<subscription_token>"
      },
      "enabled": true
    }
  }
}

Otros clientes (formato genérico mcpServers)

Válido para Claude Desktop y otros clientes que usan el formato mcpServers:

{
  "mcpServers": {
    "glpi": {
      "command": "uvx",
      "args": ["glpi-mcp==0.1.2"],
      "env": {
        "GLPI_BASE_URL": "<url_glpi>",
        "GLPI_APP_TOKEN": "<glpi_app_token>",
        "GLPI_USER_TOKEN": "<glpi_user_token>",
        "SUBSCRIPTION_TOKEN": "<subscription_token>"
      }
    }
  }
}

Troubleshooting

  • Error de configuración: Falta la variable de entorno ...: el proceso no ve las variables requeridas. Verifica que estén definidas en el bloque env/environment del cliente correspondiente (o en un .env si ejecutas desde el repo).

  • Las tools devuelven un JSON de error de suscripción: el SUBSCRIPTION_TOKEN no es válido, está expirado o la póliza no está activa. Obtén/renueva el token en https://globalsoft.lat/pages/glpi. La validación es fail-closed y el resultado válido se cachea 60s.

  • GLPI_BASE_URL mal formada: debe ser la raíz del GLPI sin /apirest.php (ej. https://glpi.ejemplo.com). Los paths internos de la API ya agregan /apirest.php/.

  • Verificar que el paquete arranca (con las variables ya exportadas en el shell):

    uvx glpi-mcp==0.1.2
    

    Si faltan variables, el proceso termina con SystemExit y el mensaje de configuración; es el comportamiento esperado.

Metadata

Release files for glpi-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glpi-mcp 0.1.2
File Size Uploaded Provenance Actions
glpi_mcp-0.1.2.tar.gz 66.5 kB Without provenance Details for glpi_mcp-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glpi-mcp 0.1.2
File Interpreter ABI Platform Actions
glpi_mcp-0.1.2-py3-none-any.whl Python 3 none any Details for glpi_mcp-0.1.2-py3-none-any.whl

Total release size: 93.9 kB

Release files / glpi_mcp-0.1.2.tar.gz

Download URL glpi_mcp-0.1.2.tar.gz
Size 66.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4eea8b60bdc2c50947f85ac547cc667a1a2096507dd3112ed9255c8eb5914657
BLAKE2b-256 checksum
How to use checksums
c9ae05e88fa7d9aa20b860d142e8c0939eeb538529888bdcb4362c74730a39a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / glpi_mcp-0.1.2-py3-none-any.whl

Download URL glpi_mcp-0.1.2-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8b5c913eb7855029b28c8549175a037139f7ee6b269ebedd3dd5dffe752f280
BLAKE2b-256 checksum
How to use checksums
7e676e1395745e008fd4b875a7d42d937c8f4ac8d98729f0245b8c9375a6ea0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Security for glpi-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page