Skip to main content

This repo contains code for a lightweight client to interact with GLPI and a MCP to consume it from any LLM

Requirements

  • Available glpi instance
  • valid user and API token
  • prettytable python library

Installation

pip3 install glpic

Using client

Store your creds in any env file such as glpic.env.sample and set data accordingly You can then use the following commands

  • List computers
glpic list computers
  • Get information on a specific computer
glpic info computer $computer
  • List reservations
glpic list reservations
  • Get information on a specific reservation
glpic info reservation $reservation
  • Update a given reservations
glpic update reservation $reservation -P end=20240601
  • Update all reservations
glpic update reservations

Using MCP

The server is started and configured differently depending on what transport you want to use

For STDIO:

In VSCode for example:

   "mcp": {
        "servers": {
            "glpi": {
                "command": "python3",
                "args": ["/path/to/glpic/src/glpic/mcp_server.py", "--stdio"],
                "env": {
                    "GLPI_URL": "https://server/apirest.php",
                    "GLPI_USER": "myuser",
                    "GLPI_TOKEN": "mytoken"
                }
            }
        }
    }

For Streamable HTTP:

Start the server in a terminal:

glpimcp

Configure the server in your client:

    "rhsupportcli": {
      "transport": "streamable-http",
      "url": "http://your_server:8000"
      "headers": {
        "GLPI_URL": "https://server/apirest.php",
        "GLPI_USER": "myuser",
        "GLPI_TOKEN": "mytoken"
      }
    }

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glpic-99.0.202509170844.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glpic-99.0.202509170844-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file glpic-99.0.202509170844.tar.gz.

File metadata

  • Download URL: glpic-99.0.202509170844.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for glpic-99.0.202509170844.tar.gz
Algorithm Hash digest
SHA256 897d19fee51a0377220f791ddc7ab56073b8daa188b4134b2a6d4d57eceb4749
MD5 1ca6ac61cd632af842d42d2e3e10a88f
BLAKE2b-256 c7237184aa891207726526fa66e19a918bd78c2f2fe636e3ba96c088f0e3e9ec

See more details on using hashes here.

File details

Details for the file glpic-99.0.202509170844-py3-none-any.whl.

File metadata

File hashes

Hashes for glpic-99.0.202509170844-py3-none-any.whl
Algorithm Hash digest
SHA256 3e342e6ebffb560ed2ead26694a06235544bd16d6dd51606d67da7e784aa0163
MD5 c9c1d0687c30bda137fb773d5259a517
BLAKE2b-256 1bac2f3e3ccaf741e94b69683b5eb6760ed85a6dc6074d777395106f4a32e79b

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page