Skip to main content
Glama

b24-mcp

A local MCP server for Bitrix24. It gives your AI agent fresh data from your portal — calendar, tasks and their discussions, chats, collab projects, AI call analyses, and people cards.

Read-only. Works with any portal — cloud or on-premise — through your personal inbound webhook.

Why bother if the agent can already do HTTP

The agent can call REST itself. But then:

  • on every request it assembles the URL, remembers method names and API versions, parses the response;

  • the token passes through its environment on every call;

  • nothing stops it from calling a method that changes the portal.

The server removes this: the agent calls a business operation (tasks_list, task_chat), while transport, versions, pagination, and normalization live inside. Only read operations and only the listed ones are exposed — raw REST is not exposed at all.

Related MCP server: Bitrix24 MCP Bridge

What it can do (14 tools)

Tool

What it does

whoami

Who owns the webhook — a quick check that the connection is alive

person_find

Find a person: position, department, contacts, whether active

calendar_events

Events in a window: time, participants, who is the organizer, meeting or personal block

tasks_list

A person's tasks in the responsible / originator / auditor role

task_get

Task header: description, status, deadline, whether there is a chat

task_chat

Discussion inside the task — that's where the substance is, not in the fields

task_result

Task results: they are not in the chat, only a system line without text there

tasks_updates

What is moving in your tasks over a window + what new ones appeared

chat_read

Read a dialog: group chat or direct message

projects_list

Collab projects by activity freshness

project_chats

What a project consists of: child chats

project_read

Discussion in the project chat

followups_list

Calls with a ready AI analysis over a window

followup_get

Call analysis: topic, agreements, action items, transcript

Responses are normalized: lists come as {items, count, limit}, markup is stripped, limits are clamped.

Installation

Python 3.11+ is required.

git clone <этот-репозиторий> b24-mcp && cd b24-mcp
python3 -m venv .venv
.venv/bin/python -m pip install -e .

Configuration

1. Issue an inbound webhook on your portal. Developer section: Applications → Developers → Other → Inbound webhook.

Scopes used by the server:

Scope

What for

user, department

people and org structure

calendar

events

task, tasks_extended

tasks

im

chats: task, personal, group, project

call

AI call analyses (everything else works without it)

Fewer scopes — less risk. Start without call, add it when you need calls.

2. Put the webhook in .env:

cp .env.example .env
chmod 600 .env          # сервер откажется читать файл, доступный другим
B24_WEBHOOK=https://<твой-портал>/rest/<число>/<токен>/
B24_USER_ID=<твой id>   # необязательно: определится сам через user.current

3. Connect it to your MCP client. Example for Claude Code (~/.claude.json):

{
  "mcpServers": {
    "b24": {
      "command": "/абсолютный/путь/b24-mcp/.venv/bin/python",
      "args": ["-m", "b24_mcp.server"],
      "env": { "B24_MCP_ENV": "/абсолютный/путь/b24-mcp/.env" }
    }
  }
}

Restart the client and ask the agent: "check the connection to the portal" — it will call whoami.

Security

  • The token lives in .env with 600 permissions. The server checks permissions at startup and refuses to work if the file is readable by others.

  • The token never appears in tool responses, logs, or error texts. The operation name and time are logged, not the URL.

  • Read-only. The client is created with write methods blocked at the transport level, and only the listed operations are exposed. Even a bug in a tool's code will not create a task or send a message.

  • Honest boundary: this removes the class of "secret accidentally leaked into command output," but it does not take the shell away from the agent. If it has filesystem access, it can still read .env — just like any process running under your user.

  • Only what the webhook owner is a participant in is visible. The server cannot reach other people's private chats and events.

  • If the token leaks — revoke the webhook on the portal and issue a new one; you only need to change .env.

Development

.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m pytest -q --asyncio-mode=auto

Tests run without a network. They pin the tool list (a new one will not appear silently), the read-only barrier, the normalization contract, and the portal response shapes — including the ones that are easy to miss.

Two contract pitfalls that cost debugging time (covered by tests):

  • The call transcript is in the transcription field (not transcript), the summary comes in segments ({segments: [{title, summary}]}), agreements and tasks are under the agreement / actionItem keys, not text. A miss gives a silently empty response, not an error.

  • A call participant is identified by the userId field, not id. Reading id will return None — and the participant cannot be linked to a person.

Boundaries

The server deliberately does not do:

  • write operations — does not create tasks, send messages, or change the portal;

  • heavy runs — a full sweep of all correspondence over a month, exporting quarterly reports, summarizable traversals with checkpoints. A tool call lives within a single agent turn: there is a time ceiling and nowhere to save progress. Such tasks are solved by a separate script, not an MCP tool.

License

MIT.

Available Tools

13 tools
calendar_eventsB

События календаря: время, участники, кто host.

is_meeting + attendees дают отличить структурную встречу от личного блока. Одиночное событие с проектным названием — спроси владельца, с кем это, не классифицируй молча.

Inputs: days, start, user_id. Returns: result

chat_readA

Прочитать диалог, где ты участник: групповой чат или личку.

Вложения отдаются списком (имя, размер, disk_id) — ссылки на скачивание сюда не попадают, они могут нести auth-параметр.

Inputs: full, limit, chat_id, user_id, +1 more. Returns: result

followup_getA

Разбор звонка: тема, повестка, договорённости, action items, участники.

⚠️ action_items — СЫРЬЁ портала, а не готовый список твоих задач. Кому принадлежит задача, решай по говорящему и адресату: «ты сделай» → владелец адресат, «я сделаю» → владелец говорящий. Для этого бери transcript=True.

Inputs: call_id (required), transcript. Returns: result

followups_listC

Завершённые звонки с ГОТОВЫМ AI-разбором за окно.

Звонки без разбора портал не возвращает — пустой список это норма, а не сбой.

Inputs: days, user_id, max_items. Returns: result

person_findA

Найти человека на портале: должность, отдел, контакты, активен ли.

Зови ЭТО до обращения по ID — в крупной компании есть однофамильцы.

Inputs: query (required), limit. Returns: result

project_chatsA

Из чего состоит проект: дочерние чаты (задачи, синки, под-чаты).

Главный чат проекта сюда не входит — это и есть project_id.

Inputs: project_id (required). Returns: result

project_readC

Прочитать обсуждение в чате проекта.

Inputs: chat_id (required), days, limit, live_only. Returns: result

projects_listC

Проекты-коллабы по свежести активности.

Проект группирует чаты (задачи, синки, под-чаты); их содержания обычно нет в заметках — это прямой слой слепых пятен.

Inputs: limit. Returns: result

task_chatB

Обсуждение внутри задачи — там суть, а не в полях.

Системные записи (назначения, смены сроков) по умолчанию скрыты.

Inputs: task_id (required), full, limit, include_system. Returns: result

task_getB

Шапка задачи: тело, статус, дедлайн, есть ли чат обсуждения.

Inputs: task_id (required). Returns: result

tasks_listB

Задачи человека в выбранной роли.

Дефолт responsible = «висит лично на нём». У руководителя почти все видимые задачи чужие (он постановщик/наблюдатель) — без роли список шумит. Поле self_note помечает «заметки сам себе» (постановщик = исполнитель).

Inputs: role, limit, user_id, include_done. Returns: result

tasks_updatesA

Что шевелится в СВОИХ задачах за окно + какие появились новые.

Идёт по recent-хвосту, а не по списку своих member-задач (их тысячи → таймаут). Дёшево: последняя реплика уже приходит в recent.

Inputs: days, deep. Returns: result

whoamiA

Кто владелец подключённого вебхука. Быстрая проверка, что мост живой.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool targets a distinct resource or aspect: calls (followups_list vs followup_get), tasks (list, get, chat, updates), people, projects, calendar, and chat. No overlapping purposes; descriptions clarify boundaries.

    Naming Consistency4/5

    Mostly consistent verb_noun snake_case pattern (e.g., tasks_list, task_get, project_read). Minor inconsistencies: plural vs singular (tasks_list vs task_get, followups_list vs followup_get) and a standalone unlike whoami.

    Tool Count5/5

    13 tools cover the apparent domain of a CRM portal (people, tasks, projects, calls, calendar, chats) without redundancy. Each tool earns its place for a focused integration.

    Completeness2/5

    Heavily read-oriented: tools retrieve data but lack create, update, or delete operations. Users can inspect tasks, projects, calls, and chats but cannot modify them, causing dead ends for agents needing to take action.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Bitrix24 CRM integration, enabling AI agents to manage contacts, deals, tasks, and more via natural language.
      7 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Локальный MCP-сервер, дающий ИИ-агенту read-only доступ к задачам, проектам и чатам Bitrix24 в объёме прав пользователя — через браузерное расширение, переиспользующее живую сессию. Без прав администратора и без официального REST-вебхука.
      641 npm
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Universal MCP server for the Bitrix24 REST API, enabling full read and write access to CRM, tasks, calendar, disk, and more. Supports any MCP client with stdio or Streamable HTTP transport.
      88
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A secure, self-hosted MCP server for Bitrix24 CRM that enables reading CRM data and performing confirmation-gated writes through schema discovery and OAuth integration.
      7 npm
      MIT