Bitrix24 MCP Server

Bitrix24 MCP Server

Enables AI agents to interact with Bitrix24 CRM through standardized MCP tools, including searching and managing contacts, deals, leads, tasks, and replying in chats.

Category
Visit Server

README

Bitrix24 MCP Server

License: MIT Python 3.12+ MCP

MCP-сервер для Bitrix24 CRM: подключите AI-агента к сделкам, контактам и чатам за 5 минут.

Bitrix24 MCP Server предоставляет стандартизированный Model Context Protocol интерфейс, через который любой AI-агент (Claude, GPT, DeepSeek, локальные LLM) может:

  • 🔍 Искать контакты, сделки, лиды
  • 📝 Создавать и обновлять CRM-сущности
  • 💬 Отвечать в чатах Bitrix24 как обычный сотрудник
  • 📋 Писать комментарии в таймлайн сделок

Всё через единый протокол. Без написания REST-обёрток. Без парсинга вебхуков. Один раз настроил — и забыл.

Быстрый старт (5 минут)

1. Установка

pip install bitrix24-mcp

2. Настройка

Создайте входящий вебхук в Bitrix24 (права: crm, imbot, user) и пропишите URL:

export BITRIX_WEBHOOK_URL="https://your.bitrix24.ru/rest/1/your-token/"

3. Запуск

bitrix24-mcp

Готово. Сервер слушает stdio — можно подключать AI-клиент (Claude Desktop, Cursor, Hermes Agent).

Подключение AI-агента к чатам Bitrix24

Сервер включает готовый слой для чат-ботов (imbot):

from src.domain.entities.bot_event import BotIncomingMessage, BotReply
from src.application.services.chat_bot import ChatBotService

class MyAIAgent:
    """Ваш AI-агент. Единственное, что нужно написать."""

    async def handle_message(self, message: BotIncomingMessage) -> BotReply:
        # Вызовите свою LLM
        answer = await my_llm.ask(message.text)
        return BotReply(
            text=answer,
            # Опционально: дублировать в таймлайн сделки
            timeline_comment=TimelineCommentTarget(
                entity_type="deal",
                entity_id=123
            )
        )

# Регистрация — остальное сервер берёт на себя
chat_bot_service.register_agent(bot_id, MyAIAgent())

После регистрации ваш AI-агент появляется в общих чатах Bitrix24 как обычный сотрудник. Менеджер пишет — агент отвечает. Комментарии автоматически попадают в таймлайн.

MCP-инструменты

CRM: Контакты

Инструмент Описание
get_contact Получить контакт по ID
search_contacts Поиск по имени, телефону, email
list_contacts Список с фильтрацией

CRM: Сделки

Инструмент Описание
get_deal Сделка по ID
list_deals Список с фильтрами (активные, по контакту)
update_deal_stage Передвинуть сделку по воронке
create_deal Создать новую сделку

CRM: Лиды

Инструмент Описание
create_lead Создать лид
list_leads Список с поиском
get_lead Лид по ID

Чат-бот

Инструмент Описание
ChatBotService.register_bot Зарегистрировать бота в портале
ChatBotService.register_agent Подключить AI-агента к боту
ChatBotService.dispatch_event Обработка входящих сообщений

Задачи

Инструмент Описание
search_tasks Поиск задач
create_task Создать задачу
get_task_by_id Задача по ID

MCP-ресурсы

AI-агент может запрашивать данные по URI:

Ресурс Пример Назначение
contact://{id} contact://123 Данные контакта
deal://{id} deal://456 Данные сделки
deals://active deals://active Все активные сделки

Подключение к AI-клиентам

Claude Desktop

{
  "mcpServers": {
    "bitrix24": {
      "command": "bitrix24-mcp",
      "env": {
        "BITRIX_WEBHOOK_URL": "https://your.bitrix24.ru/rest/1/token/"
      }
    }
  }
}

Hermes Agent

mcp_servers:
  bitrix24:
    transport: stdio
    command: bitrix24-mcp
    env:
      BITRIX_WEBHOOK_URL: "https://your.bitrix24.ru/rest/1/token/"

Cursor / VS Code

Добавьте в .cursor/mcp.json или настройки Cursor MCP.

Чат-бот: полный пример

export BOT_EVENT_HANDLER_URL="https://your-domain.example.com/bot/events"
python examples/custom_agent_example.py

Сервер регистрирует бота, поднимает HTTP-обработчик вебхуков и подключает AI-агента. Подробнее: docs/source/ai_chat_agent.rst.

Архитектура

AI-клиент (Claude/DeepSeek/GPT)
        │
        ▼ MCP (stdio)
┌───────────────────────┐
│  Bitrix24 MCP Server  │
│                       │
│  ┌─────────────────┐  │
│  │  MCP Handlers   │  │  ← CRM: contacts, deals, leads
│  ├─────────────────┤  │
│  │  ChatBotService │  │  ← imbot: register, dispatch, reply
│  ├─────────────────┤  │
│  │  WebhookServer  │  │  ← HTTP: приём событий Bitrix24
│  └─────────────────┘  │
└───────────┬───────────┘
            │ REST API (fast_bitrix24)
            ▼
     Bitrix24 Cloud

Требования

  • Python 3.12+
  • Входящий вебхук Bitrix24 (права: crm, imbot, user)
  • Для чат-бота: публичный HTTPS URL (ngrok, cloudflared, или любой хостинг) для приёма вебхуков

Лицензия

MIT. Подробности в LICENSE.

Ссылки

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured