Content
# edt-companion-mcp
HTTP MCP server inside 1C:EDT. OSGi plugin raises a local server on
`http://127.0.0.1:6868/mcp` (JSON-RPC 2.0 + MCP) and provides **39 tools**,
through which the AI agent (Claude Code, Cursor, Cline, any MCP client) sees the
same as EDT itself: typed metamodel, BSL code with unsaved edits of open editors,
form structure, SKD, XDTO, as well as Eclipse Debug API for running and debugging
yaxunit tests.
The plugin works **only with the currently open workspace in EDT** —
it does not launch a separate EDT/1C process.
## Features
- **Reading** metadata and BSL: configuration objects, forms (with extInfo and
handlers), SKD, XDTO, predefined elements, role rights, subsystems, defined types.
Through BM transactions — sees unsaved edits of open editors, not just disk.
- **Search and navigation**: text search by BSL, symbol resolution,
cross-reference index (`find_object_references`), method call hierarchy.
- **Metadata editing** — unified tool `edit_metadata`: creation and
deletion of objects, attributes, tabular parts, forms (through standard
`IFormGenerator`), form elements, event handlers with auto-generation
of BSL stubs, rights, subscriptions, defined types, XDTO schemes, layouts, SKD.
Accepts both configurations and extension projects.
- **Adoption in extension**: `adoptObject` / `adoptChild` / `adoptModule`
through standard `IModelObjectAdopter`.
- **Validation and build**: EDT validation markers, `rebuild_project`, query
validation, headless database update (`sync_database`) without modal dialog.
- **yaxunit + debugging**: test running, report reading, breakpoints with
condition/hit-count, `getState` / `getVariables` / `evaluate`, step-by-step
execution — through standard Eclipse Debug API.
Full catalog of tools, parameter conventions, and typical scenarios — in
[docs/llm-guide.md](docs/llm-guide.md).
## Requirements
- 1C:EDT 2025.2 (tested on 2025.2.5 / EDT core 26.0.1).
- Java 17 (comes with EDT).
- Open workspace in EDT with configuration or extension project.
## Installation
The plugin is supplied as a ready-made jar file (drop-in bundle) in the
[Releases](../../releases) section.
1. Download `io.github.sekam68.edt.companion.mcp-<version>.jar` from the latest
release.
2. Copy the jar to the `dropins` directory of your 1C:EDT installation. Typical path:
```
<1C:EDT installation>/components/1c-edt-<version>-x86_64/dropins/
```
(e.g., `C:/Program Files/1C/1CE/components/1c-edt-2025.2.5+2-x86_64/dropins/`).
3. Restart 1C:EDT.
4. Check that the server has started:
```
curl http://127.0.0.1:6868/health
→ {"status":"ok","tools":39}
```
If `/health` does not respond — EDT is not running, or the bundle has not been activated
(on the first installation, a one-time EDT launch with the `-clean` key helps).
The default port is `127.0.0.1:6868`. It can be changed without recompilation via
VM argument `-Dedt.yaxunit.mcp.port=<port>` (in `1cedt.ini` after `-vmargs`) or
environment variable `EDT_YAXUNIT_MCP_PORT`. System property has priority.
## Connecting AI Agent
Register the server in the project's `.mcp.json` (or in the configuration of your
MCP client):
```jsonc
{
"mcpServers": {
"edt-companion-mcp": {
"type": "http",
"url": "http://127.0.0.1:6868/mcp"
}
}
}
```
Protocol — JSON-RPC 2.0 via `POST /mcp`; supported methods `initialize`,
`tools/list`, `tools/call`. The agent receives the list of tools and their parameters
via `tools/list`; human-readable reference — in
[docs/llm-guide.md](docs/llm-guide.md).
## Tool Catalog (39)
| Group | Tools |
|---|---|
| Workspace and environment | `list_workspace_projects`, `list_applications`, `show_edt_version` |
| Reading BSL | `read_module_source`, `read_method_source`, `get_module_structure`, `search_in_code`, `resolve_symbol` |
| Writing BSL | `write_module_source` |
| Metadata (reading) | `list_metadata_objects`, `list_modules`, `get_object_details`, `get_form_layout`, `get_config_properties` |
| Analysis | `find_object_references`, `get_method_call_hierarchy`, `get_validation_errors` |
| Metadata editing | `edit_metadata` (unified operation manager) |
| XDTO | `read_xdto_package`, `edit_xdto_package` |
| Build and database | `rebuild_project`, `sync_database` |
| Queries | `validate_query` |
| Platform documentation | `get_object_help`, `get_platform_docs` |
| yaxunit | `run_yaxunit`, `get_yaxunit_report` |
| Debugging | `addBreakpoint`, `removeBreakpoint`, `listBreakpoints`, `getState`, `getVariables`, `evaluate`, `resume`, `suspend`, `stepOver`, `stepInto`, `stepReturn`, `terminate` |
## When it doesn't fit
- **Headless / CI / remote development without open EDT** — the server lives
inside the EDT process; without UI, some operations (including `sync_database`) are unavailable.
- **Editing the body of an existing BSL method** — the plugin reads modules, searches
by code, finds references, and writes handler stubs, but the agent edits the body
of the procedure using its own file tools.