Rules MCP: 1C exchange rules parser
rules-mcp
An MCP server that parses 1C exchange rules in Data Conversion 2.0 format and answers questions about them in chat, with no LLM involved in the parsing itself
Low risk
We rate an entry low when it mostly gives the agent instructions and reference material.
Why this level
- Only reads local exchange rule files, does not connect to a production infobase
- The rule-rereading tool is password protected
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/rules-mcpDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Assembled automatically, review before installing.
Run in a terminal
claude mcp add --transport http rules-mcp http://rules-mcp:8000/mcpOr add to the file .mcp.json, in the project
{
"mcpServers": {
"rules-mcp": {
"type": "http",
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"rules-mcp": {
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Run in a terminal
code --add-mcp '{"name":"rules-mcp","type":"http","url":"http://rules-mcp:8000/mcp"}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"rules-mcp": {
"type": "http",
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
codex mcp add rules-mcp --url http://rules-mcp:8000/mcpOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.rules-mcp]
url = "http://rules-mcp:8000/mcp"If the file already exists, append the block to the end.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
gemini mcp add -s user -t http rules-mcp http://rules-mcp:8000/mcpOr add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"rules-mcp": {
"httpUrl": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"rules-mcp": {
"serverUrl": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"rules-mcp": {
"type": "streamableHttp",
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"rules-mcp": {
"type": "streamable-http",
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"rules-mcp": {
"type": "remote",
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"rules-mcp": {
"url": "http://rules-mcp:8000/mcp"
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
GITLAB_REPOoptional- Адрес репозитория с правилами по HTTPS. Пусто — работать с тем, что уже лежит в RULES_DIR
GITLAB_TOKENsecret, optional- Токен на чтение репозитория
GITLAB_BRANCHoptional- Ветка с правилами. Пусто — ветка по умолчанию
RULES_SUBDIRoptional- Подкаталог внутри репозитория, если папки направлений лежат не в корне
REFRESH_INTERVALoptional- Период опроса, секунды. 0 — не опрашивать
REFRESH_PASSWORDsecret, optional- Пароль для refresh_rules. Не задан — команда недоступна
RULES_DIRoptional- Каталог с направлениями. При работе из репозитория клон кладётся в /data/checkout
HOSToptional- Адрес прослушивания
PORToptional- Порт прослушивания
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Lay out the Data Conversion 2.0 rule exports in per-direction folders at the repository root, configure the environment variables from .env.example, start the server with docker compose up or directly with server.py, and connect rules-mcp to Open WebUI.
Other ways from the author
docker compose up -dStarts the server in Docker after configuring .env from the .env.example template.
This is third-party code. Review the repository files before installing.
What it does
The server parses multi-megabyte exchange rule XML files (ExchangeRules.xml and RegistrationRules.xml in Data Conversion 2.0 format) once into an in-memory index with a plain program, no model involved, so tokens are spent only on answers. Eight tools answer questions: an overview of exchange directions, tracing a document from registration to the receiver, a full conversion rule card, searching by code or text, the full text of a rule or attribute handler page by page with line numbers, breaking a handler's queries into individual queries and temp tables, and what the rules expect from receiver attributes for reconciliation. The tools also understand shared algorithms that rules call via Выполнить(Алгоритмы.Имя), and individual attribute handlers.
Who it is for. For 1C developers who work with or debug Data Conversion 2.0 exchanges and want to ask questions about the rules directly in chat.
Good fit when
- You need to quickly understand what a specific conversion rule does without opening the XML by hand
- You need to trace where and how a document is processed during exchange
- You need to reconcile what the rules expect from the receiver configuration with the real attributes
Not a fit when
- The exchange is built on Data Conversion 3 (EnterpriseData): the server supports only Data Conversion 2.0
- You need a ready MCP server that reads the 1C configuration itself: rules-mcp only works with exchange rule files
Example request
Show what happens to the sales document during the UPP to ERP exchange, and where each rule call sitsLimitations
Only Data Conversion 2.0 is supported; EnterpriseData (Data Conversion 3) is not read. The rules must sit locally in a specific folder structure by exchange direction. The CorrespondentExchangeRules.xml file is not read. The index lives in memory with no database, and the refresh_rules tool for rereading is password protected.
How to disable. Stop the server container or process and remove the rules-mcp entry from your Open WebUI MCP client settings.
MCP
- Transport
- stdio, http
- Authentication
- not required
| Environment variables | |
|---|---|
| RULES_REFRESH_PASSWORD secret | Password for the refresh_rules tool, which rereads the rules from the repository. |
Security check
- Only reads local exchange rule files, does not connect to a production infobase
- The rule-rereading tool is password protected
README in short
The README lays out the problem: exchange rules are tens of megabytes of XML with embedded code, impossible to read blindly or in full. The server parses them once into an index and answers precisely. It lists eight tools with their purpose, the folder layout for storing rules by exchange direction, and the idea of pairing it with a separate server reading 1C configurations for automatic reconciliation.
FAQ
Does an LLM take part in parsing the rules?
No, the XML parsing is a plain program; model tokens are spent only on what the tool returns in chat.
Can the rules be checked against the real configuration?
Yes, if a server reading 1C configurations is connected alongside it, such as rlm-tools-bsl, the model compares data from rules-mcp against real attributes.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything