Skip to main content
Glama
fscp-mcp

fscp-mcp

by qui364

fscp-mcp

tests

An MCP server for reading and editing .fscp configurations — files of the "Rubezh-Global" fire protection system (Windows Global Monitor).

A real facility's configuration is 25 MB of XML, 512 thousand lines, and 5656 devices that have no names: only GUIDs, DriverUID, and IntAddress. You can neither open it whole nor grep it meaningfully. The server parses the archive once and answers with addressable pages: "what is on KAU 1.2", "what object is 84ee9eae-…", "what logic does the LIFTY scenario have", "show the plan backdrop".

Edits — add a device, bind a zone, draw an object on a plan — accumulate in the memory of the open session; only an explicit fscp_save writes them to disk, and it always writes to a new file. The original configuration is never overwritten. fscp_create builds a configuration from scratch.

Installation

Python 3.11 or newer is required. It installs with a single command — no need to clone the repository:

uv tool install "git+https://github.com/qui364/fscp-mcp"

Without uv, pipx install "git+https://github.com/qui364/fscp-mcp" does the same, and into a regular environment — pip install "git+https://github.com/qui364/fscp-mcp". After installation, the fscp-mcp command appears — that is the server; it speaks stdio and is launched not by hand but by the client.

The img extra (Pillow) is only needed for inline backdrop previews — without it everything works except get_plan_image:

uv tool install "fscp-mcp[img] @ git+https://github.com/qui364/fscp-mcp"

Claude Desktop

Settings → Developer → Edit Config opens claude_desktop_config.json (Windows: %APPDATA%\Claude, macOS: ~/Library/Application Support/Claude). Add the server to it, keeping what is already in the file:

{
  "mcpServers": {
    "fscp": {
      "command": "fscp-mcp",
      "env": { "PYTHONUTF8": "1", "PYTHONIOENCODING": "utf-8" }
    }
  }
}

If fscp-mcp is not visible to the app (a common case on Windows: the GUI has its own PATH), specify the full path to it — uv tool list or pipx list will show where it is installed. env is not decorative: without it, the Windows console returns cp1251 and Cyrillic in responses turns into mojibake.

Then restart Claude Desktop — the server will appear in a new chat.

Claude Code

In the cloned repository, the server starts on its own: the configuration is in .mcp.json. To make it available in any project, register it globally:

claude mcp add fscp --scope user -- fscp-mcp

Development

py -3 -m venv .venv
.venv/Scripts/python.exe -m pip install -e ".[dev,img]"
.venv/Scripts/python.exe -m pytest -q

On Windows, a python stub from WindowsApps usually hangs in PATH — it does not work; call the interpreter by its explicit path.

Related MCP server: mcp-office-parser

Getting started

Tell the model which file to open — from there it works by handle:

open C:\Configurations\object.fscp and show what is on KAU 1.2

For editing — the same, but with a destination for the result:

add an IP 212-149 detector to ALS 1.2.1 and save as object-edit.fscp

Good to know: the server does not open SecurityConfiguration.xml (user password hashes) at all — neither for reading nor writing: it is carried into the new file as opaque bytes. It is worth opening the result in Global Monitor itself — the server does not check that.

Tests

The base tests require nothing but the repository: the configuration for them is built on the fly in tests/factories.py — a ZIP with the same entries and the same XmlSerializer output as a real file.

Real configurations are not published — they contain facility data and SecurityConfiguration.xml with password hashes. If they are available locally, specify the directory, and address-to-plan-label verification will be added (93% threshold), a 25 MB parse speed check, a stale-label detector, and a byte-for-byte serializer check: every XML entry of every working configuration is parsed and written back, and the result must match the source down to the byte — that is the guarantee that fscp_save does not corrupt what it did not touch:

FSCP_TEST_CONFIGS=<каталог с .fscp> .venv/Scripts/python.exe -m pytest -q

Tools

37 tools: 20 for reading and 17 for writing.

Group

Tools

Session

fscp_open, fscp_close, fscp_info

Saving

fscp_save, fscp_diff, fscp_revert, fscp_create

Devices

list_devices, get_device, search_devices, device_tree, add_device, set_device, move_device, remove_device

GC objects

list_objects, get_object, resolve_uid, add_object, set_object, remove_object, add_clause, clear_logic

Plans

list_plans, get_plan, find_on_plans, add_plan, set_plan, remove_plan, place_object, remove_placement

Backdrops

list_plan_images, extract_plan_image, get_plan_image

Other

list_drivers, read_xml, export_devices_csv, validate_config

A device is addressed either by UID or by an address of the form 1.2.1.1.

Write model

Edits go into the open session and do not reach disk until fscp_save is called — and it always writes to a new file: overwriting the source is impossible, even deliberately. Archive entries that an edit did not touch are copied into the new file byte-for-byte along with their metadata (including the own timestamps of Content/* blobs) — an "add one detector" edit in a 25 MB configuration changes a couple of thousand bytes in the file, not the whole file.

fscp_diff shows what has accumulated in the session, in Russian. fscp_revert rolls everything back at once to the state at open time. Before writing, fscp_save runs an integrity check (check=false disables it) and refuses if it finds a violation: duplicate UID, address conflict, a logic condition with no target at all, fields in an order other than the one XmlSerializer itself writes.

Objects can only be created of the kinds whose schema was captured from working configurations — currently devices, zones, and scenarios. Directions, MPT, security zones, doors, and ACS zones are empty in all available configurations: they can be edited and deleted, but not created — a guessed structure would silently break the file.

What is inside .fscp

A ZIP with XML from .NET XmlSerializer plus plan backdrops in Content/. In scope: GKDeviceConfiguration.xml, PlansConfiguration.xml, and Content/*. SecurityConfiguration.xml is not read — it contains user password hashes.

A detailed format breakdown, the address calculation rule, and the package architecture are in CLAUDE.md.

Integrity check

validate_config finds defects that are not visible in Global Monitor itself:

  • stale plan labels — an object's label is cached at render time and after ALS renumbering shows a foreign address (up to 215 per file were found in working configurations);

  • type name mismatches between the drivers.json reference and the application;

  • dangling plan objects, broken backdrop references, and orphans in Content/.

Available Tools

38 tools
add_clauseB

Добавить условие в логику устройства или объекта. group — OnClausesGroup, OffClausesGroup, OnNowClausesGroup, OffNowClausesGroup или StopClausesGroup. state принимается кодом (Fire2) или по-русски (Пожар2). Список для целей и название операции выбираются по виду целей; every=true даёт «во всех» вместо «в любом из».

Inputs: owner (required), handle (required), targets (required), tag, +4 more. Returns: object

add_deviceB

Добавить устройство под указанный узел дерева. driver — короткое имя из list_drivers или UID драйвера. Без int_address берётся первый свободный адрес на линии. count>1 добавляет несколько подряд.

Inputs: driver (required), handle (required), parent (required), count, +2 more. Returns: object

add_objectA

Создать объект верхнего уровня: zone (зона) или scenario (сценарий). Номер No назначается автоматически — следующий свободный. Виды, для которых схема не снята с рабочих конфигураций, создать нельзя.

Inputs: kind (required), name (required), handle (required), fields, +1 more. Returns: object

add_planB

Создать план. parent_uid вкладывает его в другой план. image_path — картинка PNG или JPEG с диска: она кладётся в Content/ архива, а размеры плана берутся из её заголовка.

Inputs: name (required), handle (required), width, height, +3 more. Returns: object

clear_logicA

Убрать логику: указанную группу условий целиком либо, без group, все группы владельца.

Inputs: owner (required), handle (required), tag, group. Returns: object

device_treeC

Компактное текстовое дерево устройств с потолком по глубине и узлам.

Inputs: handle (required), root, max_depth, max_nodes. Returns: object

export_devices_csvC

Выгрузить плоский список устройств в CSV по указанному пути вне архива.

Inputs: handle (required), out_path (required). Returns: object

extract_plan_imageC

Выгрузить подложку плана в файл на диск (вне архива) для просмотра.

Inputs: guid (required), handle (required), out_path (required). Returns: object

find_on_plansA

На каких планах нарисован объект с данным UID.

Inputs: uid (required), handle (required). Returns: object

fscp_closeC

Закрыть архив и освободить память сессии.

Inputs: handle (required). Returns: object

fscp_createB

Создать новую пустую конфигурацию .fscp и сразу открыть её — вернётся handle. donor — путь к существующему .fscp, из которого побайтово переносится SecurityConfiguration.xml (учётные записи): сервер его не разбирает и не показывает. Без донора запись просто отсутствует, и пользователей заводят в самом Global Monitor — примет ли он такой файл, не проверено.

Inputs: path (required), donor, overwrite. Returns: object

fscp_diffB

Что накоплено в сессии: список правок по-русски и какие записи архива будут перезаписаны при сохранении.

Inputs: handle (required), limit, offset. Returns: object

fscp_infoC

Сводка по открытому архиву: версии, счётчики, список ГК, записи ZIP.

Inputs: handle (required). Returns: object

fscp_openC

Открыть файл .fscp и получить handle для остальных вызовов.

Inputs: path (required). Returns: object

fscp_revertA

Откатить все правки сессии к состоянию на момент открытия архива. Частичный откат не поддерживается.

Inputs: handle (required). Returns: object

fscp_saveA

Сохранить конфигурацию с правками в НОВЫЙ файл .fscp. Исходник не трогается никогда; существующий файл по пути out_path перезаписывается только при overwrite=true. Записи, которых правка не касалась, копируются побайтово. Перед записью идёт проверка целостности — отключается через check=false.

Inputs: handle (required), out_path (required), check, overwrite. Returns: object

get_deviceC

Полная карточка устройства по UID или адресу вида 1.2.1.1.

Inputs: device (required), handle (required). Returns: object

get_objectC

Карточка объекта верхнего уровня (зона, сценарий, направление) по UID.

Inputs: uid (required), handle (required). Returns: object

get_planD

План со списком нарисованных на нём объектов (страницами).

Inputs: handle (required), plan_uid (required), limit, offset. Returns: object

get_plan_imageC

Инлайновое превью подложки. Требует установленной Pillow (pip install -e .[img]); max_px обязателен — оригиналы бывают 5000x4749.

Inputs: guid (required), handle (required), max_px.

list_devicesC

Дети узла дерева устройств. Без parent — корень конфигурации.

Inputs: handle (required), limit, driver, offset, +1 more. Returns: object

list_driversC

Справочник драйверов Рубеж; query фильтрует по имени, описанию, категории.

Inputs: limit, query, handle, offset. Returns: object

list_objectsD

Объекты верхнего уровня: zone, guard_zone, scenario, direction, mpt, door и др.

Inputs: handle (required), kind, limit, query, +1 more. Returns: object

list_plan_imagesC

Подложки планов из Content/: размер, разрешение, кто ссылается, сироты.

Inputs: handle (required). Returns: object

list_plansC

Дерево планов с числом объектов на каждом.

Inputs: handle (required). Returns: object

move_deviceA

Перенести устройство вместе с поддеревом под другой узел — например, перевесить прибор на другую АЛС. Без int_address адрес выбирается свободный на новой линии.

Inputs: device (required), handle (required), new_parent (required), int_address. Returns: object

place_objectA

Нарисовать объект ГК на плане. Устройства кладутся точкой (left, top), зоны и сценарии — прямоугольником (нужны ещё width и height). Связь ставится с обеих сторон.

Inputs: item (required), handle (required), plan_uid (required), top, +3 more. Returns: object

read_xmlA

Сырой фрагмент XML по пути ElementTree (например Zones/GKZone[1]). Запасной путь, когда типизированных инструментов не хватает.

Inputs: path (required), handle (required), config, max_chars. Returns: object

remove_deviceA

Удалить устройство вместе с поддеревом. Если на него ссылаются зоны, логика или объекты на планах, вызов отказывает и перечисляет ссылки; force=true удаляет вместе с ними.

Inputs: device (required), handle (required), force. Returns: object

remove_objectB

Удалить зону или сценарий, вычистив ссылки на него: привязки устройств, условия логики, объекты на планах. Без force отказывает и перечисляет, кто ссылается.

Inputs: uid (required), handle (required), force. Returns: object

remove_placementC

Убрать объект с плана, сняв связь с обеих сторон.

Inputs: item (required), handle (required), plan_uid (required). Returns: object

remove_planB

Удалить план вместе с вложенными в него и всеми нарисованными объектами. Без force отказывает, если удалять есть что.

Inputs: handle (required), plan_uid (required), force. Returns: object

resolve_uidC

Что за объект скрывается за GUID: устройство, зона, план, подложка, драйвер.

Inputs: uid (required), handle (required). Returns: object

search_devicesC

Поиск устройств по типу (короткое имя драйвера), префиксу адреса, описанию или значению свойства.

Inputs: handle (required), limit, driver, offset, +4 more. Returns: object

set_deviceA

Изменить поля устройства: описание, IntAddress, отключение, серийный номер, привязку к зонам, свойства GKProperty. Задавайте только то, что меняете. Подписи на планах обновляются сами.

Inputs: device (required), handle (required), zones, serial_no, +4 more. Returns: object

set_objectC

Изменить поля объекта: имя, описание, Fire1Count/Fire2Count у зоны, DelayTime/Hold/DelayRegime у сценария. Номер No не меняется никогда — он входит в отображаемое имя и на него ссылаются.

Inputs: uid (required), handle (required), name, fields, +1 more. Returns: object

set_planB

Изменить имя, описание или размеры плана.

Inputs: handle (required), plan_uid (required), name, width, +2 more. Returns: object

validate_configC

Проверка целостности: устаревшие подписи на планах, битые ссылки на подложки и объекты, сироты в Content/.

Inputs: handle (required), limit. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 38 tools

    Disambiguation5/5

    Each tool has a distinct purpose: archive operations (fscp_*), device CRUD, object management, plan editing, logic clauses, and utilities. Even similar actions like remove_plan vs remove_placement vs remove_device are clearly separated by resource type. No two tools appear to do the same thing.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern (list_devices, add_device, set_device, remove_device). However, there are deviations: the fscp_ prefix for archive operations (fscp_create, fscp_open, fscp_save) vs. plain add_/set_ for entities, plus a few unique names (device_tree, resolve_uid, read_xml). While readable, the mixed conventions prevent a perfect score.

    Tool Count2/5

    38 tools exceeds the 25+ threshold for 'too many'. The server covers a broad domain (devices, objects, plans, logic, archives), but the sheer number may overwhelm an agent, and some tools could be consolidated (e.g., plan image tools). The count feels excessive for typical MCP servers, even with this scope.

    Completeness4/5

    The surface covers the main lifecycle: create/read/update/delete for devices, objects, and plans, plus logic management and archive operations. There are minor gaps—no raw XML write capability (only read_xml as fallback), no editing of SecurityConfiguration, and no bulk import beyond CSV export—but these are workable or intentional shortcuts.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A local MCP server that provides tools for working with 7-Zip archives, enabling archive creation, extraction, item management, and file system operations through a standardized interface.
      MIT
    • A
      license
      D
      quality
      D
      maintenance
      Enables reading, writing, editing, and converting Office documents (ODT, DOCX, ODS, XLSX, PDF, etc.) using MCP tools, with no external dependencies.
      11
      21 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that enables searching and reading binary document files (PDF, DOCX, PPTX, XLSX, ODT, ODS, ODP, RTF, EPUB) using regex patterns and retrieving content by sections.
      2
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Provides read-only analysis of Mitsubishi GX Works3 PLC projects via MCP, enabling device tracing, cross-referencing, ladder inspection, linting, and report generation without modifying source projects.
      15
      101 PyPI
      10
      -