Content
## Copyright Notice
The repository source code comes from [429](https://github.com/XuF163/jlc-eda-mcp), and I have made modifications for learning purposes only.
# JLC-EDA-BRIDGE
In the **JLC EDA Professional Edition Local Client**, through the "Extension + Local Service" bridge, expose EDA capabilities as a set of `jlc.*` tools for LLM to automate tasks such as **reading / local editing / supplementing drawing / exporting** schematics.
The current recommended usage of this repository is: **EDA Extension + websocat (short-lived / WS Server)**, no need to install Node / MCP packages on the user side.
> Note: The EDA extension is a **WebSocket client**, it will only connect to `ws://127.0.0.1:<port>`; therefore, you still need a "local WS server" for the extension to connect to. Here, we use the general-purpose tool `websocat` as the server, which will be started temporarily for each call.
> [!CAUTION]
> **This is a warning!**
> Please ensure that you use this project in a disposable test environment and back up your data regularly. The author is not responsible for any accidents, such as AI deleting the repository.
## Quick Start: Using websocat to Provide Support for LLM to Call EDA API
### 1) Install websocat
macOS (Homebrew):
```bash
brew install websocat
```
General (requires Rust):
```bash
cargo install websocat
```
Or download the binary directly and add it to the environment variables:
- https://github.com/vi/websocat/releases
### 2) Configure WS Address in EDA Extension (already configured to 9050 by default, modify if conflicting with existing services)
> For multiple windows / multiple projects: suggest configuring ports in the range of `9050-9059`. The extension will automatically negotiate an available port (one port per project window, up to 10) and display it in the handshake `hello` / `MCP Bridge -> Status`.
### 3) LLM Call Example & Installation Verification
The following command will temporarily start a WS server, wait for the extension to connect, send one request, and require the extension to respond and disconnect actively (for convenient reuse of the port):
```bash
printf '%s\n' '{"type":"request","id":"1","method":"ping","closeAfterResponse":true}' \
| websocat -t --no-close --oneshot ws-l:127.0.0.1:9050 -
```
> The output will contain the extension's `hello` and the current `response`. It is recommended to only listen on `127.0.0.1` and not expose it to the LAN / public network.
(Optional) Verify `jlc.*` tools (require extension support for `tools.list/tools.call`; if it returns `METHOD_NOT_FOUND: tools.call`, please reinstall the latest extension):
```bash
printf '%s\n' '{"type":"request","id":"1","method":"tools.call","params":{"name":"jlc.bridge.ping","arguments":{}},"closeAfterResponse":true}' \
| websocat -t --no-close --oneshot ws-l:127.0.0.1:9050 -
```
## Verified Capabilities
For details, please see the [extension display page](/packages/eda-extension/README.md)
Tested on version 0.0.13, using Git Bash as the default terminal for codex on Windows.
## Skills (for LLM to Get Started Quickly)
- Skills Entrance: `skills/jlceda-eda-rest/SKILL.md`
- Area selection / reading / editing / accelerated splitting document: `skills/jlceda-eda-rest/docs/`
- "Schematic-as-Code":
- Plan and milestones: `docs/SCHEMATIC_AS_CODE_PLAN.md`
- websocat interactive demo: `docs/SCHEMATIC_AS_CODE_DEMO.md`
## ~~MCP (stdio) Support~~
<details>
<summary>Click here to view detailed instructions (this is the default display title)</summary>
- Still provide MCP Server (stdio) for access to general MCP clients, but the repository's default example / documentation will prioritize the calling method of **websocat + Skills**.
- If you want to enable MCP (stdio), do not add `--no-mcp`:
```bash
node packages/mcp-server/dist/cli.js --port 9050
```
Due to historical reasons, for compatibility with some old users, related npm packages are not deleted, but are no longer recommended.
(Optional) npx configuration example:
```json
{
"command": "npx",
"args": ["-y", "jlceda-eda-mcp", "--port", "9050"]
}
```
</details>
## ~~packages/mcp-server~~
<details>
<summary>Click here to view detailed instructions (this is the default display title)</summary>
`packages/mcp-server` is a reference implementation provided by the repository (WS Bridge + HTTP + optional MCP). To reduce the installation cost and maintenance complexity on the user side, the default workflow will be "EDA Extension + websocat (short-lived)" and `packages/mcp-server` will be gradually discarded.
</details>
## Open Source License
AGPLv3
This project is one of the earliest community implementations. Please indicate the source of the code when secondary development is done, and do not think that washing the code with AI can make it your own.