Skip to main content
Glama
GIMS Automation MCP Server

GIMS Automation MCP Server

by gelarm

GIMS Automation MCP Server

MCP (Model Context Protocol) сервер для интеграции coding-агентов (Claude Code CLI и др.) с системой GIMS Automation.

Возможности

  • Разработка сценариев автоматизации (Scripts)

  • Разработка типов источников данных (MultyDataSourceType) с методами и свойствами

  • Разработка типов активаторов (ActivatorType) с кодом и свойствами

  • Поиск по коду и имени

  • Автоматическое обновление токена доступа при истечении срока действия

Related MCP server: agent-services-mcp

Установка

Из GitLab

pip install git+ssh://git@gitlab.gelarm.ru/gelarm/gims-automation-mcp-server.git

Из GitHub

pip install git+https://github.com/gelarm/gims-automation-mcp-server.git

Документация

Для разработки

git clone git@gitlab.gelarm.ru:gelarm/gims-automation-mcp-server.git
cd gims-automation-mcp-server
pip install -e ".[dev]"

Справка

gims-mcp-server --help

Конфигурация

Claude Code CLI

Создайте файл .mcp.json в корне вашего проекта:

{
  "mcpServers": {
    "gims-automation": {
      "command": "gims-mcp-server",
      "env": {
        "GIMS_URL": "https://gims.example.com",
        "GIMS_ACCESS_TOKEN": "<JWT_ACCESS_TOKEN>",
        "GIMS_REFRESH_TOKEN": "<JWT_REFRESH_TOKEN>"
      }
    }
  }
}

Self-signed сертификаты

Для работы с серверами с самоподписанными сертификатами добавьте GIMS_VERIFY_SSL:

{
  "mcpServers": {
    "gims-automation": {
      "command": "gims-mcp-server",
      "env": {
        "GIMS_URL": "https://gims.example.com",
        "GIMS_ACCESS_TOKEN": "<JWT_ACCESS_TOKEN>",
        "GIMS_REFRESH_TOKEN": "<JWT_REFRESH_TOKEN>",
        "GIMS_VERIFY_SSL": "false"
      }
    }
  }
}

Параметры

Параметр

CLI

Env

Описание

URL

--url

GIMS_URL

URL GIMS сервера

Access Token

--access-token

GIMS_ACCESS_TOKEN

JWT токен доступа

Refresh Token

--refresh-token

GIMS_REFRESH_TOKEN

JWT токен обновления

Verify SSL

--verify-ssl

GIMS_VERIFY_SSL

Проверка SSL сертификата (по умолчанию: true)

Max Response Size

--max-response-size

GIMS_MAX_RESPONSE_SIZE_KB

Лимит размера ответа в КБ (по умолчанию: 10). Примерный пересчёт в токены: 1КБ ≈ 250 токенов (ASCII) или 170 токенов (кириллица)

Log Stream Timeout

--log-stream-timeout

GIMS_LOG_STREAM_TIMEOUT

Таймаут для SSE-потока логов в секундах (по умолчанию: 60)

Получение токенов

  1. Войдите в GIMS через веб-интерфейс

  2. Откройте Developer Tools → Application → Cookies

  3. Скопируйте значения access_token и refresh_token

Автоматическое обновление токена

MCP сервер автоматически обновляет access token при получении ошибки 401 (токен истёк). Для этого используется refresh token.

При недействительном refresh token выводится сообщение:

Ошибка аутентификации: токен обновления недействителен. Проверьте учётную запись и получите новые токены в GIMS.

Доступные Tools (57)

Scripts (11 tools)

Tool

Описание

list_script_folders

Список папок скриптов с иерархией

create_script_folder

Создать папку

update_script_folder

Обновить папку

delete_script_folder

Удалить папку

list_scripts

Список скриптов (с фильтром по папке)

get_script

Получить скрипт с кодом

create_script

Создать скрипт

update_script

Обновить скрипт

delete_script

Удалить скрипт

search_scripts

Поиск по коду и/или имени

get_script_execution_log

Получить лог выполнения скрипта через SSE-поток. Ожидает маркер завершения или таймаут. Параметры: scr_id (обязательный) — ID скрипта; timeout (опционально) — таймаут в секундах; end_markers (опционально) — маркеры завершения (по умолчанию: ['END SCRIPT']); filter_pattern (опционально) — regex для фильтрации строк; keep_timestamp (опционально) — сохранять timestamp и уровень лога (по умолчанию: false)

DataSource Types (22 tools)

Папки (4 tools)

Tool

Описание

list_datasource_type_folders

Список папок типов ИД

create_datasource_type_folder

Создать папку

update_datasource_type_folder

Обновить папку

delete_datasource_type_folder

Удалить папку

Типы (5 tools)

Tool

Описание

list_datasource_types

Список типов ИД

get_datasource_type

Получить тип с properties и methods

create_datasource_type

Создать тип

update_datasource_type

Обновить тип

delete_datasource_type

Удалить тип

Свойства (4 tools)

Tool

Описание

list_datasource_type_properties

Список свойств типа

create_datasource_type_property

Добавить свойство

update_datasource_type_property

Обновить свойство

delete_datasource_type_property

Удалить свойство

Методы (4 tools)

Tool

Описание

list_datasource_type_methods

Список методов типа

create_datasource_type_method

Добавить метод

update_datasource_type_method

Обновить метод (включая код)

delete_datasource_type_method

Удалить метод

Параметры методов (4 tools)

Tool

Описание

list_method_parameters

Список параметров метода

create_method_parameter

Добавить параметр

update_method_parameter

Обновить параметр

delete_method_parameter

Удалить параметр

Поиск (1 tool)

Tool

Описание

search_datasource_type_code

Поиск по коду методов

Activator Types (14 tools)

Папки (4 tools)

Tool

Описание

list_activator_type_folders

Список папок типов активаторов

create_activator_type_folder

Создать папку

update_activator_type_folder

Обновить папку

delete_activator_type_folder

Удалить папку

Типы (5 tools)

Tool

Описание

list_activator_types

Список типов активаторов

get_activator_type

Получить тип с кодом и properties

create_activator_type

Создать тип

update_activator_type

Обновить тип (включая код)

delete_activator_type

Удалить тип

Свойства (4 tools)

Tool

Описание

list_activator_type_properties

Список свойств типа

create_activator_type_property

Добавить свойство

update_activator_type_property

Обновить свойство

delete_activator_type_property

Удалить свойство

Поиск (1 tool)

Tool

Описание

search_activator_type_code

Поиск по коду типов

Справочники (2 tools)

Tool

Описание

list_value_types

Типы значений (только чтение)

list_property_sections

Разделы свойств (только чтение)

Git Sync (8 tools)

Tools для синхронизации компонентов автоматизации с Git-репозиторием.

Экспорт (3 tools)

Tool

Описание

export_script

Экспорт скрипта в Git-формат (meta.yaml + code.py)

export_datasource_type

Экспорт типа ИД со всеми методами и свойствами

export_activator_type

Экспорт типа активатора со свойствами и кодом

Импорт (3 tools)

Tool

Описание

import_script

Импорт скрипта с валидацией Python синтаксиса

import_datasource_type

Импорт типа ИД

import_activator_type

Импорт типа активатора

Вспомогательные (2 tools)

Tool

Описание

validate_python_code

Проверка синтаксиса Python через ast.parse()

compare_with_git

Сравнение версии в GIMS с Git (по updated_at/exported_at)

Структура Git-репозитория

automation-components/
├── scripts/
│   └── <script_folder>/
│       ├── meta.yaml
│       └── code.py
├── datasource_types/
│   └── <type_folder>/
│       ├── meta.yaml
│       ├── properties.yaml
│       └── methods/
│           └── <method_label>/
│               ├── meta.yaml
│               ├── code.py
│               └── params.yaml
└── activator_types/
    └── <type_folder>/
        ├── meta.yaml
        ├── code.py
        └── properties.yaml

Git-операции

Git-операции выполняются через Bash tool (не через MCP):

git config user.name   # Проверить конфигурацию перед commit
git config user.email
git pull origin main
git add scripts/my_script/
git commit -m "Export script 'My Script'"
git push origin main

Разработка

Запуск тестов

pytest

Линтинг

ruff check src tests

Покрытие тестами

pytest --cov=gims_mcp --cov-report=term-missing

Лицензия

MIT

Available Tools

61 tools
compare_with_gitA

Compare a GIMS component with its Git version (by updated_at)

Inputs: gims_name (required), component_type (required), git_exported_at (required).

create_activator_typeC

Create a new activator type

Inputs: name (required), code, version, folder_id, +1 more.

create_activator_type_folderC

Create a new activator type folder

Inputs: name (required), parent_folder_id.

create_activator_type_propertyA

Create a new property for an activator type. Property is accessed in activator code directly by label name (NOT through self).

Inputs: name (required), label (required), value_type_id (required), section_name_id (required), +6 more.

create_datasource_typeC

Create a new datasource type

Inputs: name (required), version, folder_id, description.

create_datasource_type_folderB

Create a new datasource type folder

Inputs: name (required), parent_folder_id.

create_datasource_type_methodB

Create a new method for a datasource type

Inputs: name (required), label (required), mds_type_id (required), code, +1 more.

create_datasource_type_propertyA

Create a new property for a datasource type. Property is accessed in method code via self.property_label

Inputs: name (required), label (required), mds_type_id (required), value_type_id (required), +6 more.

create_method_parameterA

Create input or output parameter for a datasource type method. Input parameters (input_type=true) are passed when calling the method. Output parameters (input_type=false) are returned as dict from the method.

Inputs: label (required), method_id (required), value_type_id (required), is_hidden, +4 more.

create_scriptC

Create a new script

Inputs: name (required), code, folder_id.

create_script_folderB

Create a new script folder

Inputs: name (required), parent_folder_id.

delete_activator_typeB

Delete an activator type

Inputs: type_id (required).

delete_activator_type_folderC

Delete an activator type folder

Inputs: folder_id (required).

delete_activator_type_propertyB

Delete an activator type property

Inputs: property_id (required).

delete_datasource_typeB

Delete a datasource type

Inputs: type_id (required).

delete_datasource_type_folderC

Delete a datasource type folder

Inputs: folder_id (required).

delete_datasource_type_methodC

Delete a datasource type method

Inputs: method_id (required).

delete_datasource_type_propertyB

Delete a datasource type property

Inputs: property_id (required).

delete_method_parameterB

Delete a method parameter

Inputs: parameter_id (required).

delete_scriptC

Delete a script

Inputs: script_id (required).

delete_script_folderC

Delete a script folder

Inputs: folder_id (required).

export_activator_typeB

Export an activator type with properties and code

Inputs: type_id, type_name.

export_datasource_typeB

Export a datasource type with all properties and methods

Inputs: type_id, type_name.

export_scriptA

Export a script from GIMS to Git format (meta.yaml + code.py)

Inputs: script_id, script_name.

get_activator_typeA

Get activator type metadata. Code is filtered by default - use get_activator_type_code to retrieve code.

Inputs: type_id (required), include_properties.

get_activator_type_codeA

Get the full code of an activator type. Use this when you need to read or analyze the activator code.

Inputs: type_id (required).

get_datasource_typeA

Get a datasource type. Use include_properties=false and include_methods=false to get only basic type info (useful when full response is too large)

Inputs: type_id (required), include_methods, include_properties.

get_datasource_type_methodA

Get method metadata and parameters. Code is filtered - use get_datasource_type_method_code to retrieve code.

Inputs: method_id (required).

get_datasource_type_method_codeA

Get the full code of a datasource type method. Use this when you need to read or analyze the method code.

Inputs: method_id (required).

get_scriptA

Get script metadata by ID. Code is filtered by default - use get_script_code to retrieve code.

Inputs: script_id (required).

get_script_codeA

Get the full code of a script by ID. Use this when you need to read or analyze the script code.

Inputs: script_id (required).

get_script_execution_logA

Get script execution log via SSE stream. Waits for end marker or timeout. Use this to collect script output after manual script execution in GIMS.

Inputs: scr_id (required), timeout, end_markers, filter_pattern, +1 more.

import_activator_typeC

Import an activator type from Git format

Inputs: files (required), target_name, update_existing.

import_datasource_typeB

Import a datasource type from Git format

Inputs: files (required), target_name, update_existing.

import_scriptA

Import a script to GIMS from Git format. Validates Python syntax before import.

Inputs: code (required), meta_yaml (required), target_name, update_existing, +1 more.

list_activator_type_foldersA

List all activator type folders with their hierarchy paths

Inputs: no named parameters.

list_activator_type_propertiesB

List all properties of an activator type

Inputs: activator_type_id (required).

list_activator_typesA

List all activator types

Inputs: no named parameters.

list_datasource_type_foldersA

List all datasource type folders with their hierarchy paths

Inputs: no named parameters.

list_datasource_type_methodsA

List all methods of a datasource type (without code, use get_datasource_type_method for full code)

Inputs: mds_type_id (required).

list_datasource_type_propertiesB

List all properties of a datasource type

Inputs: mds_type_id (required).

list_datasource_typesA

List all datasource types

Inputs: no named parameters.

list_method_parametersA

List all parameters of a method

Inputs: method_id (required).

list_property_sectionsA

List all available property sections. Use this to get section_name_id when creating properties.

Inputs: no named parameters.

list_script_foldersA

List all script folders with their hierarchy paths

Inputs: no named parameters.

list_scriptsA

List all scripts with their folder paths

Inputs: folder_id.

list_value_typesA

List all available value types for properties and parameters. Use this to get value_type_id when creating properties.

Inputs: no named parameters.

search_activator_typesA

Search activator types by name and/or code. Default searches by name only.

Inputs: query (required), search_in, case_sensitive.

search_datasource_typesA

Search datasource types by name and/or method code. Default searches by name only.

Inputs: query (required), search_in, case_sensitive.

search_scriptsA

Search scripts by name and/or code content. Default searches by name only.

Inputs: query (required), search_in, case_sensitive.

update_activator_typeB

Update an activator type (including its code)

Inputs: type_id (required), code, name, version, +2 more.

update_activator_type_folderD

Update an activator type folder

Inputs: folder_id (required), name, parent_folder_id.

update_activator_type_propertyC

Update an activator type property

Inputs: property_id (required), name, label, is_hidden, +3 more.

update_datasource_typeC

Update a datasource type

Inputs: type_id (required), name, version, folder_id, +1 more.

update_datasource_type_folderC

Update a datasource type folder

Inputs: folder_id (required), name, parent_folder_id.

update_datasource_type_methodB

Update a datasource type method (including its code)

Inputs: method_id (required), code, name, label, +1 more.

update_datasource_type_propertyC

Update a datasource type property

Inputs: property_id (required), name, label, is_hidden, +3 more.

update_method_parameterD

Update a method parameter

Inputs: parameter_id (required), label, is_hidden, description, +1 more.

update_scriptC

Update an existing script

Inputs: script_id (required), code, name, folder_id.

update_script_folderC

Update an existing script folder

Inputs: folder_id (required), name, parent_folder_id.

validate_python_codeB

Validate Python code syntax using ast.parse()

Inputs: code (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 61 tools

    Disambiguation5/5

    Every tool targets a specific entity and action with clear prefixes. Similar tools like get_script and get_script_code are explicitly differentiated in descriptions. No overlapping purposes found.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (e.g., create_script_folder, list_datasource_types). Multi-word nouns like datasource_type_method still fit the pattern. Minor deviation like compare_with_git is still readable.

    Tool Count1/5

    At 61 tools, this is far beyond the '25+' threshold and falls into the extreme category. While the server covers many entity types, the sheer number may overwhelm agents and increase selection error rates.

    Completeness4/5

    The surface provides full CRUD for scripts, datasource types (with properties/methods/parameters), and activator types (with properties), plus search, export/import, and validation. The only notable gap is the lack of a tool to execute scripts directly, as execution log retrieval suggests manual execution.

    Related MCP Connectors

    Related MCP Servers