Skip to main content
Glama
GLPI MCP Server v2

GLPI MCP Server v2

by Luizcc87

GLPI MCP Server v2

🌐 English version · Português (Brasil)

GLPI 통합을 위한 TypeScript/Node 기반 MCP(Model Context Protocol) 서버입니다. OAuth2를 통한 GLPI v2.3 API를 사용하여 ITIL 커버리지와 통합 도구(티켓, 문제, 변경, 지식 기반, 통계, 자산, 관리)를 AI 에이전트에 직접 제공합니다.

이 프로젝트는 여러 도구를 통합하고, 요청 중복을 방지하며, LLM이 소비하기에 최적화된 형식으로 데이터를 제공합니다.

🌟 크레딧 및 감사의 말

이 프로젝트는 다음 프로젝트의 구조와 도구 커버리지를 재사용합니다:

새로운 GLPI v2.3 API(OAuth2)에 맞게 수정되었습니다. ITIL 매핑의 아키텍처 영감과 비즈니스 로직을 제공해 주신 원저자들(GMS64260 및 DevSkillsIT)에게 감사드립니다.

Related MCP server: mcp-itop

🚀 기능(도구)

생산성에 초점을 맞춘 도구가 제공됩니다:

  • 지원(Assistance): 티켓, 문제, 변경의 생성, 업데이트, 검색(RSQL 필터 포함) 및 전체 읽기(1회 요청으로 타임라인 포함). 통계 및 후속 조치 추가.

  • 지식 기반(Knowledgebase): 문서 검색 및 읽기.

  • 자산(Assets): 컴퓨터 목록 및 읽기(상세 사양 포함 플래그 포함).

  • 관리(Administration): 사용자 검색, 사용자 컨텍스트 읽기 및 그룹 목록.

🛠 설치

  1. 저장소를 클론하거나 파일을 다운로드합니다.

  2. 종속성을 설치합니다:

    npm install
  3. 프로젝트를 컴파일합니다:

    npm run build

⚙️ 구성(.env)

프로젝트 루트에 .env.example 파일을 기반으로 .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

GLPI에서 OAuth2 API 클라이언트 생성 방법

  1. GLPI에 접속합니다(버전 11 / v2.3 활성화).

  2. 구성 → OAuth 클라이언트(/front/oauthclient.php)로 이동합니다.

  3. 새 클라이언트를 추가합니다.

  4. 권한 부여에서 비밀번호(password grant — 스크립트/에이전트에 권장)를 추가합니다.

  5. 범위에서 최소한 api를 선택합니다(사용자 컨텍스트 도구를 사용하려면 user도 선택).

  6. 저장하고 저장된 항목에 표시된 Client ID(식별자)와 Client Secret을 복사합니다.

🔌 MCP 클라이언트 등록

서버는 stdio(node dist/index.js + 환경 변수)를 통해 실행되므로, 호환되는 모든 MCP 클라이언트가 등록할 수 있습니다. 아래는 클라이언트별 예시입니다.

Claude Desktop / Claude Code

claude_desktop_config.json 파일(Desktop) 또는 .mcp.json 파일(Claude Code, 프로젝트 루트):

{
  "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 및 CLI)

~/.gemini/config/mcp_config.json 파일(전역) 또는 .agents/mcp_config.json 파일(작업 공간별):

{
  "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)

~/.codex/config.toml 파일(전역) 또는 .codex/config.toml 파일(프로젝트별, 신뢰할 수 있는 환경):

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

또는 codex mcp add glpi-v2 --command node --args caminho/absoluto/para/glpi-mcp-v2/dist/index.js(env 변수용 대화형)를 통해 추가할 수 있습니다.

Hermes Agent

hermes mcp add glpi-v2 --command "node caminho/absoluto/para/glpi-mcp-v2/dist/index.js"

환경 변수(GLPI_BASE_URL, GLPI_CLIENT_ID 등)는 Hermes가 실행되는 환경에서 사용 가능해야 하며, 프로젝트 디렉터리의 .env를 통해 구성할 수도 있습니다(서버는 dotenv를 통해 로드합니다. 해당되는 경우 — src/config.ts 확인).

OpenClaw

~/.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"
        }
      }
    }
  }
}

참고: 위의 Hermes Agent 및 OpenClaw 예시는 작성 시점의 각 프로젝트 공개 문서를 따르지만, 이 서버에 대해 직접 테스트되지는 않았습니다. 프로덕션에서 의존하기 전에 로컬에서 연결을 검증(노출된 도구 목록 확인)하세요.

대안: HTTP 전송

클라이언트가 stdio를 지원하지 않는 경우, 서버는 StreamableHTTPServerTransport도 노출합니다(src/httpServer.ts 참조). 프로세스 환경 변수에 MCP_TRANSPORT=http를 설정하고, 선택적으로 MCP_HTTP_PORT(기본값 3000)를 설정합니다. 엔드포인트는 http://localhost:<포트>/mcp(POST)에 있으며 — 로컬 명령 대신 클라이언트를 이 URL로 지정하세요.

📄 OpenAPI 스펙(개발 참조)

swagger-v2.3.json 파일(v2.3 API의 전체 OpenAPI 스펙, GLPI에서 동적으로 생성됨)은 버전 관리되지 않습니다(git-ignored — 4.6MB, 생성됨). 실행 중인 GLPI 인스턴스에서 다시 생성하려면:

curl -s "http://SEU_GLPI/api.php/doc.json" -o swagger-v2.3.json

🌐 HTTP 모드(Express)

서버는 선택적으로 권장 stateless 엔드포인트(POST /mcp)를 사용한 HTTP 통신을 지원합니다. 이 모드를 활성화하려면 환경 변수를 설정하세요:

  • MCP_TRANSPORT=http(기본값은 stdio)

  • MCP_HTTP_PORT=3000(선택 사항, Express 서버 포트 설정)

curl을 사용하여 도구 목록을 요청하는 예시:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'

라이선스

MIT

Available Tools

30 tools
glpi_add_change_followupA

Adiciona um followup (acompanhamento) à timeline de um change.

Inputs: id (required), content (required), is_private.

glpi_add_problem_followupB

Adiciona um followup (acompanhamento) à timeline de um problem.

Inputs: id (required), content (required), is_private.

glpi_add_ticket_followupC

Adiciona um followup (acompanhamento) à timeline de um ticket.

Inputs: id (required), content (required), is_private.

glpi_create_changeC

Cria um novo change.

Inputs: input (required).

glpi_create_problemC

Cria um novo problem.

Inputs: input (required).

glpi_create_ticketB

Cria um novo ticket.

Inputs: input (required).

glpi_get_asset_statsC

Retorna estatísticas de ativos (assets) associados a chamados, mudanças ou problemas.

Inputs: itemtype (required), date_end, date_start.

glpi_get_changeA

Retorna o contexto completo de UM change, incluindo timeline, sem precisar de múltiplas chamadas.

Inputs: id (required).

glpi_get_change_statsC

Retorna as estatísticas de um change.

Inputs: id (required).

glpi_get_change_timelineB

Retorna a timeline de UM change (followups, tasks, etc).

Inputs: id (required).

glpi_get_computerC

Retorna o contexto completo de UM computador, incluindo especificações de hardware (CPU, memória, disco, rede) e software instalado.

Inputs: id (required).

glpi_get_knowbase_itemA

Retorna o conteúdo completo de um artigo da base de conhecimento.

Inputs: id (required), language.

glpi_get_problemC

Retorna o contexto completo de UM problem, incluindo timeline, sem precisar de múltiplas chamadas.

Inputs: id (required).

glpi_get_problem_statsC

Retorna as estatísticas de um problem.

Inputs: id (required).

glpi_get_problem_timelineA

Retorna a timeline de UM problem (followups, tasks, etc).

Inputs: id (required).

glpi_get_ticketA

Retorna o contexto completo de UM ticket, incluindo timeline, sem precisar de múltiplas chamadas.

Inputs: id (required).

glpi_get_ticket_statsC

Retorna as estatísticas de um ticket.

Inputs: id (required).

glpi_get_ticket_timelineA

Retorna a timeline de UM ticket (followups, tasks, etc).

Inputs: id (required).

glpi_get_user_contextC

Retorna o contexto de UM usuário, incluindo itens usados e gerenciados.

Inputs: id (required).

glpi_list_computersC

Busca e lista computadores (Assets). Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter, include_specs.

glpi_list_groupsA

Busca e lista grupos (Groups). Permite paginação e filtros.

Inputs: limit, start, filter.

glpi_search_changesC

Busca e lista changes. Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter.

glpi_search_faqA

Busca artigos marcados como FAQ na base de conhecimento (is_faq=true). Use para dúvidas rápidas de uso do GLPI antes de abrir ticket.

Inputs: limit, query, start, language.

glpi_search_knowbaseA

Busca artigos na base de conhecimento (Knowledgebase). Permite paginação (start, limit) e filtros (filter).

Inputs: limit, start, filter, language.

glpi_search_problemsA

Busca e lista problems. Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter.

glpi_search_ticketsB

Busca e lista tickets. Permite paginação (start, limit) e filtros (filter em RSQL).

Inputs: limit, start, filter.

glpi_search_userA

Busca e lista usuários (Users). Permite paginação e filtros.

Inputs: limit, start, filter.

glpi_update_changeA

Atualiza campos de um change existente.

Inputs: id (required), input (required).

glpi_update_problemC

Atualiza campos de um problem existente.

Inputs: id (required), input (required).

glpi_update_ticketC

Atualiza campos de um ticket existente.

Inputs: id (required), input (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 30 tools

    Disambiguation4/5

    Tools mostly target distinct resources and actions: tickets, problems, changes, knowledgebase, computers, users, and groups are clearly named. Some overlap exists between full-context getters and standalone timeline getters, and between knowledgebase search and FAQ search, but the descriptions help disambiguate them.

    Naming Consistency4/5

    Nearly all tools follow glpi_verb_entity snake_case with consistent create/update/search/get/add patterns for the main ITSM entities. Minor deviations include list_computers/list_groups versus search_* for the other collections, and get_knowbase_item versus get_computer/get_ticket.

    Tool Count2/5

    At 30 tools, this is above the 25-tool heavy threshold and the set includes redundant timeline endpoints that duplicate the full-context getters. A leaner set around 20-22 tools could cover the same GLPI modules without extra selection burden.

    Completeness3/5

    The core ticket/problem/change lifecycle is well covered with search, get, create, update, and followup, and there is read access to knowledgebase, computers, users, and groups. However, there are no create/update/delete operations for computers, users, or groups, no knowledgebase write tools, and no task/solution-specific endpoints for tickets, problems, or changes.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • 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
      -
    • F
      license
      Not graded
      quality
      D
      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
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for ticketing automation that exposes tools to create, search, and update IT helpdesk tickets, with metrics tracking.
      -