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.5.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.5-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pfc_mcp_bridge-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 467c6572874c7762db0e8bc1294de93b0273defef86892a0c6e779fa74bc31ca
MD5 ecbb71737d07cf01953c6333f27e6d21
BLAKE2b-256 16bdf5b3a3aa0a58ae405d20cf42e09d4cf1d6637236afbb6697f55c1a1067e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfc_mcp_bridge-0.1.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: pfc_mcp_bridge-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 de18a1e184d80f35e1e1cd4ed757f6c39a1dcd775d40f014d30b0c68749c1c55
MD5 5fd2153e23a5e130f2a8082cfce1befe
BLAKE2b-256 dd742eb30e86c8317c00aa7dee714bd15d698923928f4cf175b0d44da8bc9dcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfc_mcp_bridge-0.1.5-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