BSL CallGraph MCP Server
A local stdio MCP server on Node.js: builds an in-memory call graph over a 1C BSL source export and finds definitions, callers, callees and the impact radius
Low risk
We rate an entry low when it mostly gives the agent instructions and reference material.
Why this level
- The tools are strictly read-only, and the server executes no BSL code and needs no network
- Responses include symbol names, module names and relative file paths, visible to the connected client
Install
Manual install
git clone https://github.com/ShustovM/bsl-callgraph.git
cd bsl-callgraph
npm ci
npm testInstalls from source, requires Node.js 22 or 24.
This is third-party code. Review the repository files before installing.
What it does
The server indexes .bsl files in memory and gives an MCP client seven tools: find_symbol and search_symbols to find definitions by exact name or substring, get_callers and get_callees to find calling and called procedures, get_impact to transitively walk a change's impact radius, reindex to rebuild the index after files change, and stats plus server_info for server state and capabilities. Each call is classified as resolved (one known target), ambiguous (several candidates) or dynamic (needs a runtime type), and exact mode returns only resolved edges while exploratory mode shows ambiguous candidates with a confidence note. A stateful lexer recognizes Russian and English Процедура/Procedure and Функция/Function declarations, Асинх/Async and Экспорт/Export, including multiline signatures, and does not turn query text inside strings into graph edges. The analysis is static and deliberately lightweight: not a BSL compiler or full type inference, and results should be treated as navigation evidence, not proof.
Who it is for. For 1C developers who need to quickly estimate a change's impact radius in a large configuration without manually walking through files.
Good fit when
- You need to find every call site of a procedure before changing it
- You need an estimate of a change's transitive impact across several levels of depth
- You need fast navigation through a large BSL export without opening dozens of files
Not a fit when
- You need exact compiler-grade analysis with full type inference: the tool is static and cannot resolve dynamic dispatch
- You need analysis of a live database, not a filesystem export of source files
Example request
Find everyone who calls the РассчитатьСумму function and estimate the impact radius of changing it to depth 3Limitations
Dynamic dispatch and values stored in variables do not always resolve to a single target, identical symbol or module names can be ambiguous, and preprocessor behavior, type inference and runtime metadata are not evaluated. The BSL root is set once at startup by the client and cannot be replaced by a tool call. Results carry no guarantee of fixed latency or an exact token-saving ratio.
How to disable. Remove the server registration from the MCP client, for example codex mcp remove bsl-callgraph, and stop the server process; it creates no disk cache to clean up.
MCP
- Transport
- stdio
- Authentication
- not required
Security check
- The tools are strictly read-only, and the server executes no BSL code and needs no network
- Responses include symbol names, module names and relative file paths, visible to the connected client
README in short
The README details the seven tools with their parameters, the resolved/ambiguous/dynamic edge classification, the accuracy limits of static analysis, and a privacy section: parsing happens locally, the server does not execute BSL and needs no network, but MCP responses are seen by the connected client and possibly a remote agent per its policy. It gives source-install commands, configuration for Codex CLI, Claude Code and a generic stdio client with POSIX and Windows examples, and a troubleshooting and uninstall section. Baseline and benchmark scripts measure performance on your own machine. MIT license.
FAQ
Can I change the indexed folder without restarting?
No, the root is set once via the launch argument in the client config; the reindex tool only rebuilds the index for the same folder after files change.
What is the difference between exact and exploratory modes?
exact returns only unambiguously resolved calls, while exploratory also shows ambiguous and dynamic candidates with their reason and confidence.
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
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything