Skip to main content
Glama

mcp-itsm-demo

tests

Français · English

Français

Un serveur MCP (Model Context Protocol) d'exemple, en lecture seule, branché sur une base de tickets ITSM entièrement fictive. Il illustre l'article À quoi sert un serveur MCP quand on fait de l'ITSM : un assistant IA consulte les tickets lui-même au lieu qu'on lui colle des copier-coller.

Ce qu'il expose

Outil

Usage

search_tickets

Retrouver les tickets passés qui ressemblent à celui en cours (mots-clés, filtres par application, priorité, statut).

incident_timeline

Reconstituer la chronologie d'un incident à partir de son journal : détection, pont de crise, communications, contournement, résolution.

recent_changes

Lister les changements appliqués dans les dernières heures, pour voir ce qui a bougé juste avant un incident.

La base contient une quinzaine de tickets inventés, dont un incident majeur complet (INC0001001) et le changement qui l'a déclenché. Les données sont figées au 20 novembre 2026 à 18 h (as_of), pour que les résultats ne dépendent pas de la date du jour.

Les garde-fous de l'article, appliqués

  • Lecture seule. Aucun outil n'écrit. Chacun est annoté readOnlyHint: true, destructiveHint: false, openWorldHint: false.

  • Peu d'outils, bien décrits. Trois outils, chacun avec une description et des paramètres documentés : c'est ce que le modèle lit pour choisir.

  • Le texte d'un ticket est une donnée, pas un ordre. Le ticket INC0001007 contient une fausse consigne adressée à l'assistant. Le serveur la renvoie telle quelle, comme une donnée, et n'a de toute façon aucun moyen d'agir.

  • Chaque appel est tracé. Une ligne JSON par appel sur stderr (horodatage, outil, arguments, nombre de résultats). stdout est réservé au protocole.

  • Aucune donnée réelle. Applications, équipes et événements sont inventés ; les personnes sont désignées par leur rôle.

Lancer

Prérequis : Python 3.10 ou plus récent.

git clone https://github.com/iamshinji/mcp-itsm-demo
cd mcp-itsm-demo
python -m venv .venv
source .venv/bin/activate        # Windows : .venv\Scripts\activate
pip install -e ".[dev]"
pytest                           # les tests passent par un vrai client MCP

Le serveur se lance avec la commande itsm-demo (transport stdio). On ne l'utilise pas seul : on le déclare à un client MCP.

Le brancher sur un assistant

Remplacez /chemin/vers par le chemin absolu du dépôt cloné (sous Windows : .venv\Scripts\itsm-demo.exe).

  • Claude Code : claude mcp add itsm-demo -- /chemin/vers/mcp-itsm-demo/.venv/bin/itsm-demo

  • Claude Desktop : dans claude_desktop_config.json

    { "mcpServers": { "itsm-demo": { "command": "/chemin/vers/mcp-itsm-demo/.venv/bin/itsm-demo" } } }
  • MCP Inspector, pour tester sans assistant : npx @modelcontextprotocol/inspector /chemin/vers/mcp-itsm-demo/.venv/bin/itsm-demo

Questions à essayer :

  • « Quels incidents passés ressemblent à des timeouts sur les paiements ? »

  • « Reconstitue la chronologie de l'incident INC0001001 et résume-la pour le métier. »

  • « Quels changements ont été appliqués dans les 48 heures avant cet incident ? »

Aller plus loin

Construit avec le SDK Python officiel du Model Context Protocol (version 2). Licence MIT.


Related MCP server: Tickets and Warehouse MCP Servers

English

A sample read-only MCP (Model Context Protocol) server over an entirely fictional ITSM ticket base. It illustrates the article What an MCP server is good for when you work in ITSM: the AI assistant looks up tickets itself instead of being fed copy-pasted text.

What it exposes

Tool

Use

search_tickets

Find past tickets that look like the current one (keywords, filters on application, priority, status).

incident_timeline

Rebuild an incident's timeline from its journal: detection, crisis bridge, communications, workaround, resolution.

recent_changes

List the changes implemented in the last hours, to see what moved just before an incident.

The base holds about fifteen invented tickets, including a complete major incident (INC0001001) and the change that triggered it. The data is frozen at 20 November 2026, 18:00 (as_of), so results do not depend on today's date.

The article's guardrails, applied

  • Read-only. No tool writes. Each one is annotated readOnlyHint: true, destructiveHint: false, openWorldHint: false.

  • Few tools, well described. Three tools, each with a description and documented parameters: that is what the model reads to choose.

  • Ticket text is data, not an order. Ticket INC0001007 contains a fake instruction aimed at the assistant. The server returns it as is, as data, and has no way to act on it anyway.

  • Every call is traced. One JSON line per call on stderr (timestamp, tool, arguments, result count). stdout is reserved for the protocol.

  • No real data. Applications, teams and events are invented; people are referred to by their role.

Run it

Requires Python 3.10 or later.

git clone https://github.com/iamshinji/mcp-itsm-demo
cd mcp-itsm-demo
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest                           # the tests go through a real MCP client

The server starts with the itsm-demo command (stdio transport). You do not run it on its own: you register it with an MCP client.

Connect it to an assistant

Replace /path/to with the absolute path of the cloned repository (on Windows: .venv\Scripts\itsm-demo.exe).

  • Claude Code: claude mcp add itsm-demo -- /path/to/mcp-itsm-demo/.venv/bin/itsm-demo

  • Claude Desktop: in claude_desktop_config.json

    { "mcpServers": { "itsm-demo": { "command": "/path/to/mcp-itsm-demo/.venv/bin/itsm-demo" } } }
  • MCP Inspector, to test without an assistant: npx @modelcontextprotocol/inspector /path/to/mcp-itsm-demo/.venv/bin/itsm-demo

Questions to try:

  • "Which past incidents look like payment timeouts?"

  • "Rebuild the timeline of incident INC0001001 and summarise it for the business."

  • "Which changes were implemented in the 48 hours before that incident?"

Going further

Built with the official Model Context Protocol Python SDK (version 2). MIT licence.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables semantic search and analysis of customer support tickets. Provides tools to search tickets, analyze the dataset, and retrieve individual tickets using natural language.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes a synthetic issue tracker and pipeline warehouse as callable tools so an agent can answer operational questions about tickets, pipeline health, runs, incidents, and governed metrics with every claim cited to the exact tool call it came from. All writes are proposal-only, requiring human approval through a gated apply path that logs each step for audit.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables read-only lookup of support tickets and ticket lists through two tools, returning only bounded fields like ID, status, title and note. Tenant filtering and argument validation confine every read to the configured organization, with denied access and upstream failures surfaced as explicit results.
      2
      MIT