WebSocket bridge for YADE MCP server - runs inside YADE Python environment
Project description
yade-mcp-bridge
WebSocket bridge that runs inside a YADE process and enables execution tools for yade-mcp.
Quick Start
In a YADE Python console, install the bridge using YADE's own interpreter:
import sys, subprocess
subprocess.check_call([
sys.executable, "-m", "pip", "install", "--user",
"--break-system-packages", "yade-mcp-bridge",
])
Restart YADE, then in the Python console:
import yade_mcp_bridge
yade_mcp_bridge.start()
The bridge auto-detects the runtime: Qt timer in GUI mode, blocking poll in console mode.
Expected output (one line):
YADE MCP Bridge on ws://localhost:9002, log: /your-working-dir/.yade-mcp/bridge.log
Detailed initialization logs go to bridge.log only (stdout shows warnings and errors).
Options
yade_mcp_bridge.start(
host="localhost", # Server host
port=9002, # Server port
mode="auto", # "auto", "gui", or "console"
interrupt_check_period=1, # PyRunner checks every N iterations
)
Requirements
- Python >= 3.8
- YADE with Python bindings
websockets >= 9.1, < 13
Troubleshooting
| Symptom | Fix |
|---|---|
| Port in use | yade_mcp_bridge.start(port=9003), then set YADE_MCP_BRIDGE_URL=ws://localhost:9003 |
| Connection failed | Check bridge is running, see .yade-mcp/bridge.log |
| PyRunner not available | YADE installation may lack PyRunner; interrupt checking during O.run() will be disabled |
Development
Run the bridge from source inside YADE:
import sys
sys.path.insert(0, '/path/to/yade-mcp/yade-mcp-bridge/src')
import yade_mcp_bridge
yade_mcp_bridge.start()
For full MCP client setup, see yade-mcp.
License: MIT (LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yade_mcp_bridge-0.3.1.tar.gz.
File metadata
- Download URL: yade_mcp_bridge-0.3.1.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca541a4846035d7b82a00b266cf01725cf6b79968efae1d3d69b26dd03c1a7d6
|
|
| MD5 |
5077cc0c8aab5e1c53c5472ca0bcbda1
|
|
| BLAKE2b-256 |
7dcf46b4318ebbd2f5fb1e1d1b71465c5b4d811db7c51215b6ea4ede7039e7c1
|
Provenance
The following attestation bundles were made for yade_mcp_bridge-0.3.1.tar.gz:
Publisher:
release-bridge.yml on yusong652/yade-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yade_mcp_bridge-0.3.1.tar.gz -
Subject digest:
ca541a4846035d7b82a00b266cf01725cf6b79968efae1d3d69b26dd03c1a7d6 - Sigstore transparency entry: 1508248280
- Sigstore integration time:
-
Permalink:
yusong652/yade-mcp@0c53d27f6f162bdd1a53f3a438aaafe706a3d7bb -
Branch / Tag:
refs/tags/bridge-v0.3.1 - Owner: https://github.com/yusong652
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-bridge.yml@0c53d27f6f162bdd1a53f3a438aaafe706a3d7bb -
Trigger Event:
push
-
Statement type:
File details
Details for the file yade_mcp_bridge-0.3.1-py3-none-any.whl.
File metadata
- Download URL: yade_mcp_bridge-0.3.1-py3-none-any.whl
- Upload date:
- Size: 45.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc781929c2abee6878d3337736a65eb74d6d299433f66f81e406092b23d0231
|
|
| MD5 |
fad438813d391bbe61ecda0b97889ee8
|
|
| BLAKE2b-256 |
559906217250d8335a7091564bb4376581954232a39a89a2f67a831c8cb51afb
|
Provenance
The following attestation bundles were made for yade_mcp_bridge-0.3.1-py3-none-any.whl:
Publisher:
release-bridge.yml on yusong652/yade-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yade_mcp_bridge-0.3.1-py3-none-any.whl -
Subject digest:
0dc781929c2abee6878d3337736a65eb74d6d299433f66f81e406092b23d0231 - Sigstore transparency entry: 1508248324
- Sigstore integration time:
-
Permalink:
yusong652/yade-mcp@0c53d27f6f162bdd1a53f3a438aaafe706a3d7bb -
Branch / Tag:
refs/tags/bridge-v0.3.1 - Owner: https://github.com/yusong652
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-bridge.yml@0c53d27f6f162bdd1a53f3a438aaafe706a3d7bb -
Trigger Event:
push
-
Statement type: