Skip to main content

GLPI client

Project description

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"
      }
    }

Project details


Release history Release notifications | RSS feed

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.202509181154.tar.gz (8.7 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.202509181154-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: glpic-99.0.202509181154.tar.gz
  • Upload date:
  • Size: 8.7 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.202509181154.tar.gz
Algorithm Hash digest
SHA256 e9ce34ee65cdd113f045c67692dc70d65a2d3c582ae98868f66fee6f11b2d70d
MD5 04dd9d998d97f3803db8dcccf774de43
BLAKE2b-256 7718e138e08b20cfa1835c2ff5f54f35c4ebe1c9cd8c629e1c6a0af21cda5117

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for glpic-99.0.202509181154-py3-none-any.whl
Algorithm Hash digest
SHA256 5025dfba9bf486e33ee45c6dc2d32d4c6b9ad385f5a88ded59ca0a5c62430efd
MD5 e5e6c03368bffe166001001400267536
BLAKE2b-256 7f3b8dc98106cfdc6e9a2a6118189fde8462d20ab1ffbd7d3dea136b80a90adb

See more details on using hashes here.

Supported by

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