1c-mcp
An MCP client for 1C 8.3: metadata, queries, reading documents, and diagnosing why a document will not post inside a transaction that always rolls back
- 0 ★ on the repository
- Last commit
Extended access
Why this level
- The object_update and document_post write tools, when enabled, change real objects and post documents
- The base user's credentials are stored in the MCP client's environment variables
Install
- Works in
- Services
Manual install
npm install
cp .env.example .env
npm run buildInstalls the client; .env is filled with ONEC_URL, ONEC_USER, ONEC_PASSWORD after implementing the HTTP service in the 1C extension.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The object_update and document_post write tools, when enabled, change real objects and post documents
- The base user's credentials are stored in the MCP client's environment variables
This is third-party code. Review the repository files before installing.
What it does
The server is a thin TypeScript client that talks to an mcp HTTP service in your 1C configuration extension. The tools cover reading object metadata, 1C query-language queries, reading objects by reference, listing documents, register movements, and, as the headline feature, posting diagnosis via document_diagnose: the extension checks fill validity, tries to post the document inside a transaction that always rolls back, and returns the error text, the failing attribute, the document data, its metadata and the movements it would have made. The write tools object_update and document_post register only with an explicit ONEC_ALLOW_WRITE=1; by default the server is read-only. The HTTP service on the 1C side has to be implemented yourself against a fixed contract; there is no bundled extension in the repo.
Who it is for. For 1C developers and analysts who want an agent to work out on its own why a document will not post, instead of manually digging through the error in the Configurator.
Good fit when
- You need to find out why a specific document will not post, with the exact error text and failing field
- You want an agent to see base metadata and data, but without a default risk of changing anything
- You are ready to implement the extension's HTTP service against the project's contract
Not a fit when
- You are not ready to write your own extension with an HTTP service: the project ships no ready-made extension
- You need to write to the database without explicitly enabling ONEC_ALLOW_WRITE=1
Example request
Diagnose why document Реализация 0001 dated 01.01.2026 will not post and explain the reasonMCP
- Transport
- stdio
- Authentication
- API key
Environment variables
ONEC_URLrequired- The root of the extension's HTTP service, e.g. http://host/base/hs/mcp.
ONEC_USERrequired- The 1C user for Basic Auth.
ONEC_PASSWORDrequired, secret- The 1C user's password.
ONEC_ALLOW_WRITE- 1 registers the object_update and document_post write tools; any other value keeps the server read-only.
Limitations
There is no ready-made 1C extension in the repo: the mcp HTTP service has to be implemented yourself in BSL against the documented contract, a separate piece of work. It requires publishing the base on a web server with HTTP services enabled and a dedicated Basic Auth user. The README itself lists a bundled reference extension as a good first contribution, meaning it does not exist yet.
How to disable. Remove the 1c entry from the MCP client config and disable the mcp HTTP service in the base extension.
FAQ
Does diagnosis change the database?
No, document_diagnose always rolls back the transaction, so it has zero side effects on the database.
How do I enable writes?
Set the ONEC_ALLOW_WRITE=1 environment variable, which registers the object_update and document_post tools.
Discussion
No questions or reviews yet.
Related
All 1C:Enterprise toolsMCP server for 1C:Enterprise data over OData: receivables, sales, stock and cash, plus document creation and posting behind a separate flag
A native component that runs a full MCP server inside 1C: tools, resources and prompts are written in BSL, while a DLL handles the protocol
1C metadata MCP proxy (adapted fork)
1C_MCP_SERVER_OWN
A Python proxy between an MCP client and a 1C HTTP service: reads metadata, object structure and predefined data, with optional OAuth2
MCP server for 1C:Enterprise databases over standard OData: catalogs, documents, registers and accounting with no configuration extension
A strictly read-only MCP server on a 1C HTTP service: 39 tools for metadata, queries, accounting and reports on any configuration
1C OData MCP with a JSON cache
MCP сервер для работы с OData 1C
A Python MCP server over 1C OData: reads and changes catalogs and documents, saving everything to JSON files for local analysis without repeat queries
README in short
The README explains the motivation: most 1C tools give either metadata or data, while the question 'why won't this document post' needs both plus running the posting logic. It details the document_diagnose mechanism with a BSL code example inside a rolled-back transaction, a table of 11 tools, the full HTTP method contract with request and response shapes, an extension setup checklist, and a security section: writes only behind an explicit flag, credentials only from the environment. The contributor ideas list separately mentions a bundled reference extension. MIT license.