pfc-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PFC_MCP_BRIDGE_URL | No | The URL of the active PFC bridge service (e.g., ws://localhost:9002). This is required for execution tools to connect to a running PFC process. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pfc_browse_commandsA | Browse PFC command documentation by path (like glob + cat). Navigation levels:
When to use:
Related tools:
|
| pfc_browse_python_apiA | Browse PFC Python SDK documentation by path (like glob + cat). |
| pfc_browse_referenceA | Browse PFC reference documentation (syntax elements, model properties). References are language elements used within commands, not standalone commands. Navigation levels:
When to use:
Related tools:
|
| pfc_query_commandA | Search PFC command documentation by keywords (like grep). Returns matching command paths. Use pfc_browse_commands for full documentation. When to use:
Related tools:
|
| pfc_query_python_apiA | Search PFC Python SDK documentation by keywords (like grep). Returns matching API paths with signatures. Use pfc_browse_python_api for full documentation. When to use:
Related tools:
|
| pfc_execute_taskA | Submit a Python script file for asynchronous execution in PFC. Returns a task_id immediately; the script runs in the background. Use the companion tools to manage the task lifecycle:
While the task is cycling, you can call pfc_execute_code at any time to inspect or modify simulation state — including variables the task depends on. This is the standard way to probe progress, tune parameters mid-run, swap callbacks, or trigger early termination via a sentinel variable. Both tools share the same main namespace in PFC's main thread. Console output from itasca.command() inside the script — table dumps, list output, command summaries — is captured and interleaved with Python prints in the task log, visible through pfc_check_task_status. Do NOT have the script invoke This is the async / background execution path: pollable via pfc_check_task_status, cancellable via pfc_interrupt_task. Submission does not lock parameters — start with reasonable values and refine live via pfc_execute_code as the task cycles. For synchronous, inline execution, use pfc_execute_code directly. |
| pfc_check_task_statusA | Check status and paginated output for a submitted PFC task. Output combines Python prints and PFC console output from itasca.command() calls (table dumps, list output, command summaries) interleaved in execution order. Use skip_newest / limit to paginate, or filter to keep only matching lines. |
| pfc_list_tasksB | List tracked PFC tasks with pagination. |
| pfc_interrupt_taskB | Request graceful interruption of a running PFC task. |
| pfc_execute_codeA | Execute Python code synchronously in the running PFC process. Returns stdout and an optional result variable immediately. Code runs in PFC's main thread, sharing the same main namespace as any running task — side effects persist and are immediately visible to the task on its next cycle. This tool remains responsive EVEN WHILE a simulation task is running (submitted via pfc_execute_task), as long as the task is actively cycling — execute_code interleaves at cycle gaps. Use it as a live REPL to inspect simulation state in real time — no need to pre-script print statements, and parameter sweeps or sentinel-based control don't have to be baked into the task script up front. Environment: PFC's embedded Python interpreter. The version is bundled with PFC (PFC 6/7 → Python 3.6, PFC 9 → 3.10); the PFC version is encoded in sys.executable (e.g. PFC700, PFC900). When unsure, write code compatible with Python 3.6+. Typical uses:
Do NOT invoke This is a synchronous tool: the request blocks until the code finishes or hits the timeout (default 10s, max 600s). Output is returned in full; the call is NOT tracked by pfc_list_tasks and cannot be interrupted mid-execution. For cancellable, pollable, or background work, submit it via pfc_execute_task instead — and you can still call pfc_execute_code against the task while it cycles. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yusong652/pfc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server