home / mcp / bitrix24 mcp server

Bitrix24 MCP Server

Provides access to Bitrix24 CRM data via MCP tools and resources for LLMs and AI agents.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "averagedigital-mcpforbitrix": {
      "command": "uvx",
      "args": [
        "bitrix24-mcp"
      ],
      "env": {
        "BITRIX_WEBHOOK_URL": "https://your-domain.bitrix24.ru/rest/1/yoursecretcode/"
      }
    }
  }
}

This Bitrix24 MCP Server lets you securely access Bitrix24 CRM data from AI models and agents using the Model Context Protocol (MCP). It exposes predefined tools to read and modify contacts and deals, while keeping interactions asynchronous and dependency-aware, so your AI workloads can work with your CRM data at scale.

How to use

You run the MCP server locally and connect your MCP client or LLM to it. Start by providing your Bitrix24 webhook URL as an environment variable. The server exposes tools for common CRM operations and resources that return data in structured forms that your AI can consume. You can ask the AI to search contacts, fetch a contact or deal by ID, list multiple contacts or deals, and update a deal stage. Use the tools to orchestrate CRM tasks without exposing direct API credentials to the AI.

How to install

Prerequisites you need to have installed before starting: Python 3.12 or newer.

Install or ensure you have the MCP runtime available as shown in the setup steps.

Set the required environment variable for your Bitrix24 webhook and then start the MCP server.

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

uvx bitrix24-mcp

Configuration tips

The server relies on environment-based configuration. Ensure the BITRIX_WEBHOOK_URL points to a valid Bitrix24 webhook with at least crm privileges.

Testing the integration

To quickly verify the Bitrix24 integration, run the provided test script which exercises common API calls such as listing contacts and retrieving a contact by ID.

python test_services.py

Operational notes

The MCP server is built with asyncio for efficient request handling and uses wireup for dependency management. It is designed to be extended with additional Bitrix24 entities or new MCP tools and resources. When you start the server, you will see logs in the console indicating registered MCP tools and resources.

Troubleshooting tips

If the server fails to start, confirm that BITRIX_WEBHOOK_URL is reachable and the webhook has the required permissions. Check that Python 3.12+ is installed and that uvx is available in your environment.

Available tools

tool://get_contact

Fetch contact information by ID and return a JSON string with the contact data.

tool://search_contacts

Search contacts by name, phone, or email with optional type and limit, returning a JSON list.

tool://list_contacts

List contacts with optional filtering by limit and company_id, returning a JSON list.

tool://get_deal

Get deal information by ID and return a JSON string with deal data.

tool://list_deals

List deals with filters like active_only, contact_id, company_id, and limit, returning a JSON list.

tool://update_deal_stage

Update the stage of a deal by deal_id and stage_id, returning a JSON result indicating success or failure.