Skip to main content

WebSocket bridge for ITASCA PFC - runs inside PFC GUI to enable remote simulation control

Project description

pfc-mcp-bridge

English | 简体中文

PyPI

Runtime bridge that runs inside a PFC process and enables execution tools for pfc-mcp.

Quick Start

Install and run in PFC Python console:

import pip
pip.main(["install", "--user", "-U", "pfc-mcp-bridge"])

import pfc_mcp_bridge
pfc_mcp_bridge.start()

The bridge auto-detects the runtime: Qt timer in GUI, blocking loop in console.

Expected output:

============================================================
PFC Bridge Server
============================================================
  URL:         ws://localhost:9001
  Log:         /your-working-dir/.pfc-bridge/bridge.log
  Callbacks:   Interrupt, Diagnostic (registered)
============================================================

Requirements

  • Python >= 3.6 (PFC embedded Python)
  • ITASCA PFC 7.0+
  • websockets==9.1 (installed automatically with pfc-mcp-bridge)

Troubleshooting

Symptom Fix
Server won't start In PFC Python/IPython console, install/upgrade pfc-mcp-bridge with import pip; pip.main(["install", "--user", "-U", "pfc-mcp-bridge"])
Port in use Use pfc_mcp_bridge.start(port=9002) in PFC Python, then set MCP server env PFC_MCP_BRIDGE_URL=ws://localhost:9002
Connection failed Check bridge is running, port is available, see .pfc-bridge/bridge.log
No task execution / cannot connect from MCP If execution tools return ok=false, error.code=bridge_unavailable, and error.details.reason=cannot connect to bridge service, ensure bridge is running in PFC (pfc_mcp_bridge.start()) and PFC_MCP_BRIDGE_URL matches bridge URL

For full MCP client setup, see pfc-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

pfc_mcp_bridge-0.1.6.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

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

pfc_mcp_bridge-0.1.6-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file pfc_mcp_bridge-0.1.6.tar.gz.

File metadata

  • Download URL: pfc_mcp_bridge-0.1.6.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pfc_mcp_bridge-0.1.6.tar.gz
Algorithm Hash digest
SHA256 6e5a58e36bc8c7d109504cdf711b7eee70ee7025f660caacd80c6f71bbc73d64
MD5 8403a23162e43d3056103b2a43475603
BLAKE2b-256 5405c1d8d5d80d205906bd062be673f21bd324683c0c0505282985545190bcbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfc_mcp_bridge-0.1.6.tar.gz:

Publisher: publish-bridge.yml on yusong652/pfc-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 pfc_mcp_bridge-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pfc_mcp_bridge-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pfc_mcp_bridge-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ffe250fd696414569e83e9ab46503cf872496a4db944d89056c70dc88e06dc4d
MD5 821b0b7f682829641215be6191c93e4c
BLAKE2b-256 b58af0ed874d812a43149ea058f2c4db77e810667e8edc492014f42dc7e156dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfc_mcp_bridge-0.1.6-py3-none-any.whl:

Publisher: publish-bridge.yml on yusong652/pfc-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