Skip to main content

WebSocket bridge for YADE MCP server - runs inside YADE Python environment

Project description

yade-mcp-bridge

PyPI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yade_mcp_bridge-0.3.1.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yade_mcp_bridge-0.3.1-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

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

Hashes for yade_mcp_bridge-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ca541a4846035d7b82a00b266cf01725cf6b79968efae1d3d69b26dd03c1a7d6
MD5 5077cc0c8aab5e1c53c5472ca0bcbda1
BLAKE2b-256 7dcf46b4318ebbd2f5fb1e1d1b71465c5b4d811db7c51215b6ea4ede7039e7c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for yade_mcp_bridge-0.3.1.tar.gz:

Publisher: release-bridge.yml on yusong652/yade-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for yade_mcp_bridge-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0dc781929c2abee6878d3337736a65eb74d6d299433f66f81e406092b23d0231
MD5 fad438813d391bbe61ecda0b97889ee8
BLAKE2b-256 559906217250d8335a7091564bb4376581954232a39a89a2f67a831c8cb51afb

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page