Content
bridge
A smallC:EDT plugin** that exposes EDT's **live semantic model** to AI agents and other
tools over the **Model Context Protocol (MCP)** — on `http://127.0.0.1:8770/mcp`.
Static parsers read source files; edt-bridge instead asks the running IDE. It answers things
that need the *live* model: EDT's problems, real metadata structure,
semantic cross-references, and **query validation against the project's actual metadata**.
> Read **and** write. Localhost only; writes are token-gated and dry-run by default. The plugin
> runs, so EDT must be open with the project.
## Tool List Tool | What it returns |
|------|-----------------|
| `edt_project_errors` | EDT validation problems (errors/warnings) for a project: message, severity, resource, line. |
| `edt_metadata_details` | A metadata object's core properties structure** — attributes, tabular sections, forms, commands, templates, dimensions, resources, enum with each attribute's value type. `edt_metadata_objects` | Top-level metadata objects, optionally filtered by type (`Catalog`, `Document`, …) and substring| `edt_find_references` | Inbound references to a metadata object (metadata + BSL), from EDT's cross-reference index| `edt_validate_query` | Validates a 1C query against the project's live metadata: syntax **and** semantics (unknown tables/fields, type errors), with positions. |
| `edt_go_to | Resolve a BSL definition at a position+column or offset): the target's kind, name object and location. |
edt_symbol_info` | Type info at a position inSL module: the element under the cursor and the computed value type(s) of the expression (dynamic typing). |
| `edt_form | A managed form's itemsfields/groups/tables/buttons/decorations) with data bindings, attributes, commands, parameters and event handlers. |
| `edt_form_render` | Renders a managed form to a PNG via EDT's native offscreen renderer (the engine behind the form-editor preview); chooses the interface variant (Taxi / 8.5) and theme. |
**Write tools** mutate the model through EDT's own engine (not text edits). All are **token-gated**
and **dry-run by default** (`apply=false` returns a plan and changes nothing); `apply=true` performs
the change and serializes the `.mdo`.
| Write tool | What it does |
|------------|--------------|
| `edt_add_attribute` | Add an attribute to a metadata object (type / klass / synonym / comment), validated. |
| `edt_modify_attribute` | Change an existing attribute's type, synonym or comment. |
| `edt_remove_attribute` | Remove an attribute (reference-checked; refuses if referenced unless forced). |
| `edt_rename` | Rename an object or member and **cascade every reference in metadata AND BSL** via EDT's native refactoring engine (`force` required — a rename is a breaking change). |
| `edt_create_object` | Create a new top object (Catalog/Document/Enum/InformationRegister/…) via EDT's factory + per-type initializer, registered in the Configuration. |
| `edt_delete_object` | Delete an object or member and **cascade the removal of every reference in metadata AND BSL** via EDT's native refactoring engine; removes the object's `.mdo` and updates the Configuration (`force` required — a delete is irreversible and breaking). |
Naming convention: tools are `edt_*` (snake_case); parameters are camelCase (`projectName`,
`fqn`, `queryText`); Cyrillic FQNs are supported (`Catalog.Contraparte`).
## Requirements
- **1C:EDT** installed and running, with your project open in the workspace.
- A **JDK 17+** to build (the bundle's bytecode targets Java 17, the EDT runtime).
- The local **EDT bundle pool** (used as the offline build target). On **Windows** that is the
p2 pool `<your-home>\.p2\pool\plugins`; on **macOS** the self-contained pool lives inside the
installed component: `…/1C/1CE/components/1c-edt-<ver>-x86_64/1cedt (<ver>).app/Contents/Eclipse/plugins`
(the shell build auto-detects it).
## Build
**Option A — no Maven** (quickest; pure local JDK + the EDT pool, no network):
```powershell
# Windows — defaults: -Pool %USERPROFILE%\.p2\pool\plugins, -JdkHome %JAVA_HOME%
powershell -ExecutionPolicy Bypass -File build-nomaven.ps1
# or override:
powershell -File build-nomaven.ps1 -Pool "D:\path\.p2\pool\plugins" -JdkHome "C:\path\to\jdk"
```
```bash
# macOS / Linux — same output. Defaults: --jdk-home from JAVA_HOME (or `/usr/libexec/java_home -v 17`
# on macOS); --pool auto-detected from the installed 1C:EDT component pool.
./build-nomaven.sh
# or override:
./build-nomaven.sh --pool "/path/to/Contents/Eclipse/plugins" --jdkpath/to/jdk-17"
```
Produces `build/com.e1c.fresh.edtbridge_0.0.1.<timestamp>.jar`.
**Option B — Maven + Tycho** (standard, for CI). Edit `edt-bridge.target` to point at your pool, then:
```
mvn -.xml clean verify
```
## Install & run
1. Copy the built jar into EDT's `dropins/` folder — Windows: `…/installations/<EDT>/1cedt/dropins/`;
**mac1C/1CE/components/1c-edt-<ver>-x86_64/1cedt (<ver>).app/Contents/Eclipse/dropins/`
(create it if it does not2. **Restart EDT.** On launch the plugin starts the MCP server on `http://127.0.0.1:8770/mcp`.
To run EDT **headless** (no GUI window) so the server serves the live model, use
`run-headless.ps1` (Windows) or-headless.sh --workspace <ws>` (macOS / Linux).
Smoke-test with curl:
```bash
# list tools
curl -s -X POST http://127.0.0.1:8770/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# call a tool
curl -s -X POST http://127.0.0.1:8770/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"edt_project_errors","arguments":{"projectName":"YourProject"}}}'
```
## MCP client wiring
Add an HTTP MCP server entry (e.g. in your client's `.mcp.json`):
```json
{
"mcpServers": {
"edt-bridge": { "type": "http", "url": "http://127.0.0.1:8770/mcp" }
}
}
```
The minimal server speaks plain JSON-RPC over HTTP (`initialize` / `tools/list` / `tools/call`) —
no extra SDK required.
## Dashboard
Open `http://127.0.1:8770/` in a browser built-in dashboard: server status, the open
EDT projects, and an interactive runner for every tool. Light/dark theme and an EN/RU language
defaults to the browser locale).
## Security
- Binds **`127.0.0.1** — never interface.
- **Writes are every write tool requires a configured token, defaults to a dry-run, and
operates only on your own local EDT model; `edt_rename` and `edt_delete_object` additionally need an
explicit `force`. No code execution: `edt_validate_query` only parses and validates.
- Optional **shared-secret token** — setT_BRIDGE_TOKEN` (or `-Dedt.bridge`) and send
`Authorization <token>` (or `X-Edt-Bridge-Token: <token>`). Any local process can reach
the port, so set a token for shared machines.
- Port override: `EDT_BRIDGE_PORT` / `-Dedt.bridge.port=`.
## Status & roadmap
- **Phase 1 (read) + Phase 2) — done.** 15 tools: 9 read + 6 write (above).
- **Later phases:** debugging (drive EDT's BSL debugger), test runs — out of scope here.
## License
[Apache License 2.0](LICENSE). See [NOTICE](NOTICE) and [ORIGIN.md](ORIGIN.md).
## Tools
| Tool | What it returns |
|------------|----------------|
| `edt_project_errors` | EDT validation issues (errors/warnings): message, severity, resource, line. |
| `edt_metadata_details` | Metadata object properties **and its structure** — attributes, table parts, forms, commands, layouts, measurements, resources, enumeration values — with each attribute type. |
| `edt_metadata_objects` | Top-level metadata objects; optional filter by type (`Catalog`, `Document`, …) and name substring. |
| `edt_find_references` | Incoming references to a metadata object (metadata + BSL) from EDT cross-references index. |
| `edt_validate_query` | Validates 1C query against live project metadata: syntax **and** semantics (non-existent tables/fields, type errors) with positions. |
| `edt_go_to_definition` | Go to BSL symbol definition at position (line+column or offset): target type, name, owner object, location. |
| `edt_symbol_info` | BSL symbol type/info at module position: element under cursor and inferred value expression types (dynamic typing). |
| `edt_form_structure` | Managed form element tree (fields/groups/tables/buttons/decorations) with data bindings, plus attributes, commands, parameters, and form event handlers. |
| `edt_form_render` | Renders managed form to PNG using EDT offscreen renderer (form preview engine); choose interface variant (Taxi / 8.5) and theme. |
**Recording tools** change the model through EDT engine (not text replacement). All are **under token** and by default **dry-run** (`apply=false` returns plan and does nothing);
`apply=true` applies change and serializes `.mdo`.
| Recording Tool | What it does |
|-------------------|------------|
| `edt_add_attribute` | Adds attribute to metadata object (type / synonym / comment), with validation. |
| `edt_modify_attribute` | Changes existing attribute type, synonym, or comment. |
| `edt_remove_attribute` | Removes attribute (checks references; refuses if references exist without force). |
| `edt_rename` | Renames object or member **with cascading all references in metadata AND BSL** via EDT refactoring engine (requires `force` — renaming breaks compatibility). |
| `edt_create_object` | Creates new top-level object (Catalog/Document/Enumeration/InfoRegister/…) via EDT factory + type initializer, with registration in Configuration. |
| `edt_delete_object` | Deletes object or member **with cascading deletion of all references in metadata AND BSL** via EDT refactoring engine; removes object's `.mdo` and edits Configuration (requires `force` — deletion is irreversible and breaks compatibility). |
Naming convention: tools `edt_*` (snake_case); parameters camelCase (`projectName`, `fqn`, `queryText`); Cyrillic FQN supported (`Справочник.Контрагенты`).
## Requirements
- Installed and launched **1C:EDT** with open project.
- **JDK 17+** for build (plugin bytecode — Java 17, EDT runtime).
- Local **EDT bundle pool** (offline build target). On **Windows** it's p2 pool `<home-dir>\.p2\pool\plugins`; on **macOS** self-contained pool is located inside installed component: `…/1C/1CE/components/1c-edt-<version>-x86_64/1cedt (<version>).app/Contents/Eclipse/plugins` (shell build finds it automatically).
## Build
**Variant A — without Maven** (fastest; local JDK + EDT pool, no network):
```powershell
# Windows
powershell -ExecutionPolicy Bypass -File build-nomaven.ps1
# or with path overrides:
powershell -File build-nomaven.ps1 -Pool "D:\path\.p2\pool\plugins" -JdkHome "C:\path\to\jdk"
```
```bash
# macOS / Linux — same result. Default: --jdk-home from JAVA_HOME (or
# `/usr/libexec/java_home -v 17` on macOS); --pool auto-determined from installed 1C:EDT pool.
./build-nomaven.sh
# or with path overrides:
./build-nomaven.sh --pool "/path/to/Contents/Eclipse/plugins" --jdk-home "/path/to/jdk-17"
```
Result: `build/com.e1c.fresh.edtbridge_0.0.1.<timestamp>.jar`.
**Variant B — Maven + Tycho** (standard, for CI). Fix path in `edt-bridge.target`, then:
```
mvn -f pom.xml clean verify
```
## Installation and Launch
1. Copy built jar to EDT's `dropins/` folder — Windows: `…/installations/<EDT>/1cedt/dropins/`;
**macOS**: `…/1C/1CE/components/1c-edt-<version>-x86_64/1cedt (<version>).app/Contents/Eclipse/dropins/` (create if it doesn't exist).
2. **Restart EDT.** On start, plugin will launch MCP server on `http://127.0.0.1:8770/mcp`.
To run EDT **headless** (without GUI window), use `run-headless.ps1` (Windows) or
`run-headless.sh --workspace <ws>` (macOS / Linux).
Check via curl:
```bash
curl -s -X POST http://127.0.0.1:8770/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```
## Connecting MCP Client
Add MCP server (e.g., in client's `.mcp.json`):
```json
{
"mcpServers": {
"edt-bridge": { "type": "http", "url": "http://127.0.0.1:8770/mcp" }
}
}
```
Minimal server speaks plain JSON-RPC over HTTP (`initialize` / `tools/list` /
`tools/call`) — without SSE and extra SDKs.
## Dashboard
Open `http://127.0.0.1:8770/` in browser — embedded panel: server status, open
EDT projects, and interactive tool launch. Switch light/dark theme and
language EN/RU (default — browser locale).
## Security
- Listens **only on `127.0.0.1`** — never public interface.
- **Recording is protected**: each recording tool requires token, default dry-run, and works
only with your local EDT model; `edt_rename` and `edt_delete_object` require explicit
`force`. No code execution: `edt_validate_query` only parses and validates.
- Optional **common secret token** — set `EDT_BRIDGE_TOKEN` (or `-Dedt.bridge.token=`) and
send `Authorization: Bearer <token>` (or `X-Edt-Bridge-Token: <token>`).
- Port: `EDT_BRIDGE_PORT` / `-Dedt.bridge.port=`.
## Status and Plan
- **Phase 1 (read) + Phase 2 (write) — ready.** 15 tools: 9 read + 6 write (above).
- **Next:** debugging (EDT debugger driver), test runner — outside this phase.
## License
[Apache License 2.0](LICENSE). See [NOTICE](NOTICE) and [ORIGIN.md](ORIGIN.md).
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
No recommendations available