Bitrix24_MCP_Server
Bitrix24 MCP Server is a server application offering a REST API for Bitrix24 CRM interaction using the MCP architecture. It allows full access to CRM entities, supports client-side data formatting, and includes logging and error handling capabilities.
Bitrix24 MCP Server
Overview
Bitrix24 MCP (Model-Controller-Presenter) Server is a server application providing a REST API for interacting with Bitrix24 CRM. It employs the MCP architectural pattern to organize code and ensure clear separation of responsibilities among components.
Features
- Full access to key entities of Bitrix24 CRM (deals, leads, contacts, tasks, etc.)
- Data formatting for easy client-side usage
- Request and response logging
- Error and exception handling
- CORS support for frontend application interaction
Requirements
- Node.js (version 14.x or higher)
- npm (version 6.x or higher)
- Access to Bitrix24 with configured webhook
Architecture
The server is built on the MCP (Model-Controller-Presenter) pattern:
- Model (Bitrix24Model): Manages interaction with the Bitrix24 API and data processing.
- Controller (Bitrix24Controller): Handles HTTP requests, applies business logic, and coordinates the model and presenter.
- Presenter (Bitrix24Presenter): Formats data for client representation.
API Endpoints
- Deals, Leads, Contacts, Activities, Users, Tasks, Telephony, Files, Timeline with operations for fetching, creating, and updating data.
Logging
The server uses a built-in logging mechanism for tracking requests and responses. The logging level can be configured in the .env
with options such as error
, warn
, info
, and debug
.
Error Handling
The server manages errors and returns appropriate HTTP statuses and messages.
Security
- Use HTTPS for data protection
- Store webhook token securely
- Regularly update the webhook token
License
MIT