Skip to main content

GLPI client

Project description

This repo contains code for a MCP interacting with GLPI API to allow consuming it from any LLM. Additionally a lightweight client is available

Available tools
create_reservation
delete_reservation
info_computer
info_reservation
get_user
list_computers
list_reservations
list_users
update_computer
update_reservation

Requirements

  • Available glpi instance
  • Valid user and API token

Installation

You can either run as a container or install dependencies locally

pip3 install glpic

Using MCP

STDIO

Include the following configuration snippet In VSCode or Claude Desktop:

"mcpServers": {
    "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"
            }
        }
    }

Streamable HTTP

For Streamable HTTP, first start the server in a terminal:

glpimcp

or via a container (with additional env variables to avoid defining headers on client side)

podman run -p 8000:8000 -d --name glpi --entrypoint=/usr/local/bin/glpimcp quay.io/karmab/glpic

You can also set env variables prior to launching or in the container to avoid defining headers on client side). For instance

podman run -p 8000:8000 -d --name glpi -e GLPI_URL=https://glpiserver/apirest.php -e GLPI_USER=myser -e GLPI_TOKEN=mytoken --entrypoint=/usr/local/bin/glpimcp quay.io/karmab/glpic

You can then point to the server from your client with a modified snippet and specifying credentials via headers if needed

"mcpServers": {
         "glpi": {
             "command": "/usr/local/bin/npx",
             "args": ["mcp-remote", "http://your_server:8000/mcp", "--allow-http",
             "--header", "GLPI_URL: https://glpiserver/apirest.php",
             "--header", "GLPI_USER: myuser",
             "--header", "GLPI_TOKEN: mytoken"]
        }
    }

For Claude Code, you can add the mcp directly from command line:

claude mcp add --transport http glpi http://glpiserver:8000/mcp -H "GLPI_URL: https://myserver/apirest.php" -H "GLPI_USER: myuser" -H "GLPI_TOKEN: mytoken"

Using client

Store your creds in any env file such as glpic.env.sample and set data accordingly. You can then use glpic and access similar functions

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: glpic-99.0.202510021331.tar.gz
  • Upload date:
  • Size: 9.4 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.202510021331.tar.gz
Algorithm Hash digest
SHA256 2996f47b25e688546f88932b94d21b2d38d60ea51c057f4eb8aef2c3d4819f31
MD5 eb2cb2163530aa9128630b7ae3a8b1d7
BLAKE2b-256 f77eb5273c031db8ff58955acb77ed055f49c3d4d28e62d9061facd1d901cf5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for glpic-99.0.202510021331-py3-none-any.whl
Algorithm Hash digest
SHA256 0461b8b1a7fc40421f8e6e7f94dc1093b6b33fbf5d4813e7c9be1961b8410490
MD5 78b7c2bd291461a333351d17416de494
BLAKE2b-256 a7651fea3ed198c51f5d84ad3e7fdf73e7a7f9ba8fcc7308c2dceaf45a916c90

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