BSL Atlas logo

BSL Atlas

Community
Arman-Kudaibergenov

MCP-сервер для 1С/BSL: векторный поиск, структурный индекс, граф вызовов

PublisherArman-Kudaibergenov
Repositorybsl-atlas
LanguagePython
Forks
13
Stars
77
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseAGPL-3.0
Links
  • Connect tools to AI workflows

    BSL Atlas exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    77 stars and 13 forks from the linked repository.

BSL Atlas

Docker Hub

Публичный MCP-сервер для быстрой индексации и поиска по исходникам 1С. Работает с XML/BSL-выгрузкой конфигурации или расширения и отдает структурный и, при необходимости, семантический поиск для AI-ассистентов.

Что умеет

  • искать функции, процедуры и модули через SQLite/FTS
  • искать объекты метаданных, реквизиты и связи
  • строить контекст по вызовам и структуре модулей
  • работать в fast режиме без внешних embedding API
  • переиндексировать проект после новой выгрузки

Режимы

РежимЧто даетЧто нужно
fastбыстрый структурный поискDocker и выгруженные исходники 1С
fullструктурный + семантический поискDocker, исходники и embedding backend/API key

fast — основной и рекомендуемый стартовый режим.

Важно: mount исходников обязателен

Если вы запускаете bsl-atlas в Docker, контейнер обязан видеть реальные исходники проекта через bind mount SOURCE_PATH -> /data/source.

  • SOURCE_PATH нужен для индексации файлов
  • если bind mount настроен неверно, /data/source внутри контейнера может существовать, но будет пустым
  • в этом случае Atlas честно сообщит, что каталог исходников пустой

Это отдельная тема от RLM: Atlas читает файлы проекта напрямую, поэтому без source mount индексировать нечего.

Быстрый старт

1. Выгрузите исходники 1С

В конфигураторе используйте Конфигурация -> Выгрузить конфигурацию в файлы и укажите пустой каталог.

2. Скачайте конфиги

bash
curl -O https://raw.githubusercontent.com/Arman-Kudaibergenov/bsl-atlas/master/docker-compose.yml
curl -O https://raw.githubusercontent.com/Arman-Kudaibergenov/bsl-atlas/master/.env.example
cp .env.example .env

3. Заполните .env

env
SOURCE_PATH=C:\bsl-src
INDEXING_MODE=fast

Для full режима дополнительно укажите embedding provider и нужные ключи.

4. Запустите контейнер

bash
docker compose up -d

5. Подключите MCP в Claude

Добавьте в claude_desktop_config.json или в .mcp.json проекта:

json
{
  "mcpServers": {
    "bsl-atlas": {
      "type": "http",
      "url": "http://localhost:8000/mcp"
    }
  }
}

Windows: что важно

Docker Desktop на Windows часто ломается на путях с пробелами или кириллицей. Если реальный путь выглядит как C:\1С\Выгрузки\МояКонфигурация, лучше сначала сделать ASCII-алиас.

powershell
cmd /c mklink /D C:\bsl-src "C:\1С\Выгрузки\МояКонфигурация"

После этого в .env используйте:

env
SOURCE_PATH=C:\bsl-src

Если Atlas пишет, что SOURCE_PATH пустой, проблема почти всегда в bind mount, а не в самом приложении.

Поддерживаемые структуры

Каталог исходников может выглядеть так:

text
SOURCE_PATH/
  cf/
    Catalogs/
    Documents/
    CommonModules/

или так:

text
SOURCE_PATH/
  Catalogs/
  Documents/
  CommonModules/

или так:

text
SOURCE_PATH/
  cfe/
    MyExtension/
      Catalogs/
      CommonModules/

Основные инструменты

  • search_function(name) — найти функцию или процедуру по имени
  • get_module_functions(path) — список функций модуля
  • get_function_context(name) — контекст вызовов
  • metadatasearch(query) — поиск по объектам метаданных
  • get_object_details(full_name) — структура объекта
  • codesearch(query) — семантический поиск в full режиме
  • helpsearch(query) — поиск по help/knowledge слою в full режиме
  • reindex(force_chromadb) — переиндексация после изменений
  • stats() — статистика индекса

Переиндексация

После новой выгрузки исходников:

bash
curl -X POST http://localhost:8000/reindex

Embedding defaults

  • рекомендуемое семейство: qwen3-embedding-8b
  • OpenRouter: qwen/qwen3-embedding-8b
  • Ollama: qwen3-embedding:8b

LLM-стикеры функций

Стикер — короткое русское описание назначения BSL-функции: что она делает, что возвращает и какой имеет побочный эффект. Он помогает найти функцию по смыслу, когда точное имя неизвестно. Стикеры хранятся в symbols.doc_generated и добавляются к карточке функции при следующей векторной индексации.

Генерировать стикеры стоит только для функций без хорошего //-комментария: экспортных методов, обработчиков, точек входа и центральных узлов графа. Формы и очевидные вспомогательные функции обычно не окупают стоимость генерации.

Пример генерации через Claude Haiku

Актуальный закреплённый ID модели — claude-haiku-4-5-20251001.

python
import json
import os

from anthropic import Anthropic

client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
function = {
    "id": 42,
    "name": "ОбработкаПроведения",
    "module": "Документы/ЗаказКлиента/Ext/ObjectModule.bsl",
    "signature": "Процедура ОбработкаПроведения(Отказ, РежимПроведения)",
    "body": "Движения.Взаиморасчеты.Записать();",
}

response = client.messages.create(
    model="claude-haiku-4-5-20251001",
    temperature=0,
    max_tokens=200,
    system=(
        "Создай один русский стикер для поиска по BSL-коду. "
        "Укажи назначение, возвращаемое значение и побочный эффект, если они видны. "
        "Не выдумывай объекты и бизнес-смысл. Не более 160 символов. "
        "Верни только JSON: {\"id\": число, \"description\": \"текст\"}."
    ),
    messages=[{
        "role": "user",
        "content": json.dumps(function, ensure_ascii=False),
    }],
)
print(response.content[0].text)

Ожидаемый результат:

json
{"id": 42, "description": "Проводит заказ клиента и записывает движения по взаиморасчётам."}

Для массовой генерации используйте Anthropic Message Batches: пакетный API дешевле обычных синхронных запросов. Сохраняйте результат как JSON {symbol_id: description}:

json
{"42": "Проводит заказ клиента и записывает движения по взаиморасчётам."}

Импорт:

bash
python scripts/import_generated_docs.py descriptions.json --db data/bsl_index.db

После импорта выполните reindex_changed, чтобы обновить векторы затронутых модулей. Скрипт не принимает и не хранит токены LLM.

Installation

TypingMind
{
  "mcpServers": {
    "bsl-atlas": {
      "command": "python",
      "args": [
        "path/to/your/main.py"
      ]
    }
  }
}

Use BSL Atlas MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once BSL Atlas is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add BSL Atlas as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the BSL Atlas MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "bsl-atlas": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the BSL Atlas MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the BSL Atlas MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use BSL Atlas to help me with this task?
BSL Atlas
Sure. I read it.
Here is what I found using BSL Atlas.

Option 2: Add an MCP server URL

Use this when BSL Atlas is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for BSL Atlas.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the BSL Atlas connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the BSL Atlas tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the BSL Atlas tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use BSL Atlas to help me with this task?
BSL Atlas
Sure. I read it.
Here is what I found using BSL Atlas.

Frequently asked questions

What is the BSL Atlas MCP server used for?

BSL Atlas is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use BSL Atlas MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use BSL Atlas with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use BSL Atlas MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With BSL Atlas connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect BSL Atlas MCP to TypingMind?

BSL Atlas can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does BSL Atlas MCP provide in TypingMind?

BSL Atlas exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use BSL Atlas MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If BSL Atlas requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇