vladimir-kharin/1c_mcp
Инструмент для создания MCP-серверов в 1С:Предприятие путем разработки расширения конфигурации. Позволяет интегрировать данные и функциональность 1С с AI-ассистентами (Claude, Cursor и т.д.). Включает Python-прокси и пример расширения 1С с готовыми инструментами.
What it is
vladimir‑kharin/1c_mcp is an open‑source toolkit that lets developers of the Russian ERP platform 1С:Предприятие expose their data and business logic to large language models (LLMs) via the Model Context Protocol (MCP). It ships a ready‑made 1С extension that implements the MCP server side, plus an optional Python proxy that handles authentication, transport conversion and Docker deployment.
Why it matters
LLMs (ChatGPT, Claude, Cursor, etc.) work best when they can query up‑to‑date, domain‑specific information. MCP is an emerging open standard that lets a model request data through tools it discovers at runtime. This project bridges the gap between 1С’s proprietary data model and that protocol, making 1С‑based knowledge usable by any MCP‑compatible AI client.
Core components
| Component | What it does | Language / Runtime |
|---|---|---|
src/1c_ext/ |
1С extension (MCP_Сервер.cfe) that implements the MCP HTTP service, registers tool containers, and provides helper functions for working with 1С metadata. |
1С (BSL) |
src/py_server/ |
Optional Python proxy that sits between the AI client and the 1С HTTP service. It adds OAuth2 support, can forward per‑user Basic Auth, and translates stdio‑based transports to HTTP. |
Python (Docker‑ready) |
Quick start (high‑level)
- Install the 1С extension – copy the compiled
build/MCP_Сервер.cfeinto your 1С configuration and publish the HTTP servicemcp_APIBackend. - Expose the service – make sure the URL contains the exact database name (case‑sensitive) to avoid redirects that break POST requests.
- Connect an AI client – point a client such as Cursor, Claude Desktop, or any MCP‑compatible tool to
…/your_db/hs/mcp/. Sample client configs are inmcp_client_settings/. - (Recommended) Run the Python proxy – follow the README in
src/py_server/or launch it via Docker (docker‑compose up -d). The proxy handles OAuth2 and can forward each user’s credentials, so you don’t have to disable 1С authentication.
How to add your own functionality
- Create a new 1С processing and add it to the subsystem
mcp_КонтейнерыИнструментов. - Implement two exported methods:
Процедура ДобавитьИнструменты(Инструменты) Экспорт // describe tool names, parameters, etc. КонецПроцедуры Функция ВыполнитьИнструмент(ИмяИнструмента, Аргументы) Экспорт // actual business logic that will be called by the LLM КонецФункции - Alternatively, package your tools in a separate 1С extension that also contains a subsystem named
*_mcp_MCPСервер– the server will auto‑discover it. - Use the guides in
src/1c_ext/agents.mdfor detailed API semantics, and optionally expose Resources (static files) or Prompts (template messages).
Typical use cases
- AI‑assisted ERP support – a chat assistant can ask the model to fetch a customer’s order history, calculate taxes, or create a new invoice on‑the‑fly.
- Code generation assistance – LLMs can request schema information from 1С to produce correct BSL snippets.
- Business intelligence – agents can retrieve aggregated metrics, run custom reports, or trigger background jobs via MCP tools.
Documentation & resources
- Python proxy:
src/py_server/README.md - 1С extension details:
src/1c_ext/README.md - Tool development guide:
src/1c_ext/agents.md - Example client configs:
mcp_client_settings/ - Video overviews: VK, YouTube, Rutube links in the README.
License
MIT – you can freely use, modify, and redistribute the code.
TL;DR: This repo provides a ready‑made MCP server for 1С and a Python proxy, enabling any MCP‑compatible LLM client to call custom 1С‑based tools and retrieve enterprise data automatically. It’s a concrete bridge between a mainstream Russian ERP system and modern AI assistants.
Related
- Project
- Project
- Project
- Project
- Project