bsl-context
MCP server with the 1C platform reference and validation of BSL code against the real API of a chosen platform version
Install
cargo build --release
bsl-context-rs --config /path/to/config.tomlBefore running, copy configs/config.toml.example to config.toml and set platform_path. The binary is in target/release.
This is third-party code. Review the repository files before installing.
What it does
The server reads the platform Syntax Helper from shcntx_ru.hbk without running 1C and gives the agent types, methods, properties, constructors and system enumeration values. The validate_module tool checks a module or fragment for nonexistent enum values, wrong argument counts, unknown type members, bad directives, duplicate declarations and unbalanced procedure blocks. In query texts inside code it flags poor joins, temp tables without indexes and reads from physical register tables. With a configuration name index connected it also catches calls to nonexistent common modules and metadata objects.
Who it is for. For 1C developers who validate agent-generated code before loading it into a base.
Good fit when
- The agent invents methods and enum values and you want that caught automatically
- You need to check a module the platform may refuse to compile
- You want the reference for a specific platform version inside the agent
Not a fit when
- There is no installed 1C platform to take shcntx_ru.hbk from
- You need visibility checks of exported procedures across modules: the server cannot know that
Example request
Run validate_module on this module in the strict profile and explain each findingLimitations
There is no prebuilt package, the server is built from Rust sources. The Syntax Helper file is not in the repository and comes from an installed platform directory. Low-confidence findings depend on type inference and may be false. Without a configuration name source, calls to procedures in other modules look like typos.
How to disable. Stop the bsl-context-rs process and remove the bsl-context block from the MCP client config.
MCP
- Transport
- http
- Authentication
- not required
Security check
- Runs a local HTTP server
- Reads the configuration dump and builds an index from it
README in short
The README explains which layer of errors the server covers and gives a table of finding kinds with confidence levels. It covers analysis levels, profiles, the validator's knowledge limits and three ways to supply configuration names: a built-in lite index, a code-index database or a code-index service. It includes the build, a config example, the tool list and client JSON for HTTP. There is an Infostart article and a Russian README. MIT license.
FAQ
How does strict differ from full?
strict keeps only high-confidence findings at level one. It suits weaker models so false positives do not send them into loops.
Can it check several configurations?
Yes, the config lists several name sources and the tools take a repo parameter.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything
Up-to-date, version-specific library docs and code examples in your agent's context, via MCP or a CLI plus skill