PhysBox: MCP - Model Context Protocol server for local simulation apps
Project description
PhysBox: MCP
PhysBox: MCP is a Model Context Protocol (MCP) server that enables LLMs and MCP clients (such as Claude Code or Claude Desktop) to interact programmatically with the three simulation web applications in the browser:
| Application | Production URL | Description |
|---|---|---|
| Flux | flux.physbox.io | Discrete-event / system-dynamics simulation (interactive React Flow graph) |
| Volt | volt.physbox.io | SPICE circuit simulation (powered by NgSpice WASM in browser) |
| Mesh | mesh.physbox.io | Rigid-body physics simulation (powered by MuJoCo WASM in browser) |
All communication is handled via JSON over WebSockets directly to the web app in your browser—no browser automation or DOM scraping is needed.
How It Works
PhysBox: MCP functions as a local companion server that establishes a WebSocket relay on port 3142.
When you open any of the simulation web apps, they connect directly to this WebSocket relay. When an MCP client executes a tool call, the command flows from the client to the companion server, gets forwarded to the active browser tab, and the results flow back.
MCP Client (e.g. Claude Desktop)
└── spawns → physbox-mcp (stdio)
└── WebSocket Server (ws://localhost:3142)
├── Flux
├── Volt
└── Mesh
Installation
Install the companion server directly from PyPI:
pip install physbox-mcp
Usage & Setup
1. Open the Web Applications
Launch or access the simulation web applications in your web browser:
- Flux: flux.physbox.io
- Volt: volt.physbox.io
- Mesh: mesh.physbox.io
As soon as a page finishes loading, it automatically registers with the companion WebSocket server.
2. Configure Your MCP Client
For Claude Desktop
Add the following block to your Claude Desktop configuration file (typically located at AppData/Roaming/Claude/claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"physbox-mcp": {
"command": "physbox-mcp",
"args": ["--stdio"]
}
}
}
For Claude Code
Add a .mcp.json file to your project root (or update your global configuration at ~/.claude/mcp.json):
{
"mcpServers": {
"physbox-mcp": {
"type": "stdio",
"command": "physbox-mcp",
"args": ["--stdio"]
}
}
}
For Google Antigravity IDE
On Windows/WSL setups, Antigravity IDE reads configuration from the global configuration directory. Because the global directory (~/.gemini/config/) may be write-restricted, you should link it to the writable ~/.gemini/antigravity/ folder:
-
In PowerShell, create a Hard Link from the global configuration target to the writable user directory:
# Delete the empty placeholder file if it exists Remove-Item -Path "$env:USERPROFILE\.gemini\config\mcp_config.json" -Force -ErrorAction SilentlyContinue # Create a Hard Link to the writable copy New-Item -ItemType HardLink -Path "$env:USERPROFILE\.gemini\config\mcp_config.json" -Target "$env:USERPROFILE\.gemini\antigravity\mcp_config.json"
-
Add the
physbox-mcpWSL configuration to yourmcp_config.json(which maps automatically to the hard-linked destination):{ "mcpServers": { "physbox-mcp": { "command": "C:\\Windows\\system32\\wsl.exe", "args": [ "-d", "Ubuntu-20.04", "/home/boab/physbox_mcp/venv/bin/python", "/home/boab/physbox_mcp/physbox_mcp/server.py", "--stdio" ] } } }
-
Restart the IDE (or close and reload the agent chat session) to register the MCP tools natively.
3. Run the Companion Server Manually (Optional)
If you are running the server in HTTP mode rather than Stdio, you can run:
# Starts HTTP server listening on port 3141 (default)
physbox-mcp
Or configure custom port parameters:
physbox-mcp --port=4000
Development & Contribution
For instructions on local development, modifying schemas, extending tool definitions, and manual builds, please refer to README_DEV.md.
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 physbox_mcp-0.1.1.tar.gz.
File metadata
- Download URL: physbox_mcp-0.1.1.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41e9f4267deaf05c9b09d0f8065de815c20b69c3839e764d3a592f1dac63fa07
|
|
| MD5 |
58510a67c443d13da4c8536722abc021
|
|
| BLAKE2b-256 |
776c4dd756293ecbf7c8c64bf903aab169e4443d0a157dc5ffed3c8666ef67f5
|
Provenance
The following attestation bundles were made for physbox_mcp-0.1.1.tar.gz:
Publisher:
publish.yml on physbox-io/physbox-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
physbox_mcp-0.1.1.tar.gz -
Subject digest:
41e9f4267deaf05c9b09d0f8065de815c20b69c3839e764d3a592f1dac63fa07 - Sigstore transparency entry: 2094983269
- Sigstore integration time:
-
Permalink:
physbox-io/physbox-mcp@529c6fd229091cc7b0e4d302aaccb7fc83677c06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/physbox-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@529c6fd229091cc7b0e4d302aaccb7fc83677c06 -
Trigger Event:
release
-
Statement type:
File details
Details for the file physbox_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: physbox_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 34.0 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 |
41918b01e249db91b064ec7e55ed33664900be61bef237d794439ea50f7e134f
|
|
| MD5 |
9eaa9323f498028580560808fbc14242
|
|
| BLAKE2b-256 |
a118a1252cf6f598f38eb73587ec6755dd4afb49b3cd55e4488f8a3ef3a61176
|
Provenance
The following attestation bundles were made for physbox_mcp-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on physbox-io/physbox-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
physbox_mcp-0.1.1-py3-none-any.whl -
Subject digest:
41918b01e249db91b064ec7e55ed33664900be61bef237d794439ea50f7e134f - Sigstore transparency entry: 2094983610
- Sigstore integration time:
-
Permalink:
physbox-io/physbox-mcp@529c6fd229091cc7b0e4d302aaccb7fc83677c06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/physbox-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@529c6fd229091cc7b0e4d302aaccb7fc83677c06 -
Trigger Event:
release
-
Statement type: