{
  "markdown": "# OpenSTAAD MCP Server\n\nA Model Context Protocol (MCP) server for Bentley [STAAD.Pro](https://www.bentley.com/software/staad/) that **enables AI agents** like Claude Desktop, Gemini, or VSCode Copilot **to interact with your STAAD.Pro models** and perform various time-consuming tasks like load cases definition, data extraction, repetitive property setting and more.\n\nThis MCP server was introduced as part of Bentley's [Infrastructure AI Co-Innovation Initiative](https://www.bentley.com/software/infrastructure-ai-co-innovation-initiative/) to help our users and accounts discover opportunities and innovate faster, while connecting Bentley's unique engineering tool capabilities to their emerging agentic workflows.\n\n## Key Features\n\n- **Fast and flexible**: Enjoy minimal latency, interact with every STAAD.Pro features covered by the OpenSTAAD API.\n- **AI-friendly**: Provides documentation, guidance and feedback via dedicated tools to help your AI agent ramp up quickly on the STAAD.Pro API.\n- **Multi-instance support**: Connects to multiple running STAAD.Pro instances simultaneously to parallelize tasks across models.\n- **Privacy-first**: All processing happens locally on your machine. No data is sent to the cloud. No telemetry.\n\n## Prerequisites\n\n- OS: **Windows 11 or newer**\n- [STAAD.Pro](https://www.bentley.com/software/staad/) 2025 or newer installed and running\n\n## Quick Start with Claude Desktop (<2min)\n\n1. Download the latest **`openstaad-mcp.mcpb`** file from the [GitHub Releases](https://github.com/BentleySystems/openstaad-mcp/releases) page.\n2. Open **Claude Desktop**.\n3. Click the **☰ menu** (top-left) → **File** → **Settings** → **Extensions**.\n4. Click **Advanced** → **Install Extensions**.\n5. Select the downloaded `.mcpb` file.\n6. Click the **☰ menu** (top-left) → **File** → **Exit**\n7. Restart Claude Desktop.\n\nClaude Desktop will install the server automatically. Open a new conversation and ask Claude to interact with your STAAD.Pro model.\n\n**Tip: Make sure STAAD.Pro is running with a model open before you start chatting.**\n\n---\n\n## Other Clients & Configuration\n\n**TL;DR:**\n\nIf not already installed, [install uv](https://docs.astral.sh/uv/getting-started/installation/) with the command:\n\n```powershell\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n\nConfigure your client to start the server in stdio mode with the command:\n\n```powershell\nuvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp\n```\n\n### VS Code with GitHub Copilot\n\n- For **stdio**: Open the Command Palette → **MCP: Add Server...** → **Command (stdio)** and enter the following command:\n  ```powershell\n  uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp\n  ```\n\n- For **http**: First, start the server in a terminal:\n  ```powershell\n  uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp --transport http\n  ```\n  Look for the generated token and URL in the terminal output. It should look like this:\n  ```\n  WARNING: No --token provided. Auto-generated token: abc123def456ghi789jkl012mno345pq\n  INFO:  Starting MCP server 'OpenSTAAD MCP' with transport 'http' (stateless) on http://127.0.0.1:18120/mcp\n  ```\n\n  Then, in VS Code, open the Command Palette → **MCP: Add Server...** → **HTTP URL** and enter the URL shown in the terminal (e.g. `http://127.0.0.1:18120/mcp`). `18120` is the default port, but yours may differ if you have multiple instances running or if you changed the default. Add the header `Authorization: Bearer <token>` with the token shown in the MCP server terminal.\n\n### GitHub Copilot CLI\n\nUse the `/mcp add` command inside a Copilot CLI session to add the server. See the [Copilot CLI documentation](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers) for more details.\n\n- For **stdio** transport, use the command:\n  ```powershell\n  uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp\n  ```\n\n- For **HTTP** transport, first start the server in a terminal:\n  ```powershell\n  uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp --transport http\n  ```\n  Look for the generated token and URL in the terminal output. It should look like this:\n  ```\n  WARNING: No --token provided. Auto-generated token: abc123def456ghi789jkl012mno345pq\n  INFO:  Starting MCP server 'OpenSTAAD MCP' with transport 'http' (stateless) on http://127.0.0.1:18120/mcp\n  ```\n\n  Then add the server in Copilot CLI using the URL shown in the terminal (e.g. `http://127.0.0.1:18120/mcp`). `18120` is the default port, but yours may differ if you have multiple instances running or if you changed the default. Add the header `Authorization: Bearer <token>` with the token shown in the MCP server terminal.\n\n### Claude Desktop (manual configuration)\n\nIf you prefer manual setup over the `.mcpb` bundle, edit the Claude Desktop\nconfig file directly:\n\n- **Windows (MSIX)**: `%LOCALAPPDATA%\\Packages\\Claude_<id>\\LocalCache\\Roaming\\Claude\\claude_desktop_config.json`\n- **Windows (classic)**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"openstaad\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"git+https://github.com/BentleySystems/openstaad-mcp\", \"openstaad-mcp\"]\n    }\n  }\n}\n```\n\n### Claude Code (CLI)\n\n- For **stdio** transport, use the command:\n  ```powershell\n  claude mcp add --transport stdio openstaad -- uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp\n  ```\n\n- For **HTTP** transport, first start the server in a terminal:\n  ```powershell\n  uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp --transport http\n  ```\n  Look for the generated token and URL in the terminal output. It should look like this:\n  ```\n  WARNING: No --token provided. Auto-generated token: abc123def456ghi789jkl012mno345pq\n  INFO:  Starting MCP server 'OpenSTAAD MCP' with transport 'http' (stateless) on http://127.0.0.1:18120/mcp\n  ```\n\n  Then add the server in Claude Code with the command:\n  ```powershell\n  claude mcp add --transport http openstaad http://127.0.0.1:18120/mcp --header \"Authorization: Bearer <your-token>\"\n  ```\n  `18120` is the default port, but yours may differ if you have multiple instances running or if you changed the default.\n\n### Gemini CLI\n\n- For **stdio** transport, use the command:\n  ```powershell\n  gemini mcp add openstaad uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp\n  ```\n\n- For **HTTP** transport, first start the server in a terminal:\n  ```powershell\n  uvx --from git+https://github.com/BentleySystems/openstaad-mcp openstaad-mcp --transport http\n  ```\n  Look for the generated token and URL in the terminal output. It should look like this:\n  ```\n  WARNING: No --token provided. Auto-generated token: abc123def456ghi789jkl012mno345pq\n  INFO:  Starting MCP server 'OpenSTAAD MCP' with transport 'http' (stateless) on http://127.0.0.1:18120/mcp\n  ```\n\n  Then add the server in Gemini CLI with the command:\n  ```powershell\n  gemini mcp add --transport http --header \"Authorization: Bearer <your-token>\" openstaad http://127.0.0.1:18120/mcp\n  ```\n  `18120` is the default port, but yours may differ if you have multiple instances running or if you changed the default.\n\n### Transport Modes\n\nThe server supports two transport modes:\n\n| Mode | When to use |\n|------|-------------|\n| **stdio** (default) | The MCP client launches the server process directly. Used by Claude Desktop, Claude Code, VS Code Copilot (stdio config). |\n| **HTTP** | The server runs persistently and clients connect over the network. |\n\n\n### CLI Options\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--transport {stdio,http}` | `stdio` | Transport mode |\n| `--log-level LEVEL` | `INFO` | `DEBUG`, `INFO`, `WARNING`, or `ERROR` |\n| `--log-file PATH` | OS default | Path to log file |\n| `--port PORT` | `18120` | **[http]** TCP port to listen on |\n| `--token TOKEN` | - | **[http]** Bearer token for authentication |\n\n---\n\n## Available MCP Tools\n\n| Tool | Description |\n|------|-------------|\n| `discover_api` | Lists available API skills and usage guidance |\n| `read_skills` | Returns detailed guidance for requested skills |\n| `list_instances` | Lists active STAAD.Pro instances with model paths and versions |\n| `execute_code` | Runs validated Python code against the connected STAAD.Pro model |\n| `get_status` | Returns connection state, STAAD version, model path, analysis status |\n\n### File I/O\n\nThe `execute_code` tool supports optional **server-side file I/O** for bulk data workflows.\nInstead of passing large datasets through the agent's context window, the server reads/writes\nCSV and XLSX files directly and injects the data into the sandbox as the `input_data` variable.\n\n| Parameter | Description |\n|-----------|-------------|\n| `input_data_path` | Path to a `.csv` or `.xlsx` file. The server reads and parses it, then injects as the `input_data` variable in the sandbox. |\n| `output_data_path` | Path where the sandbox return value will be written. The return value must be a list-of-lists (CSV) or a `{sheet_name: {columns, rows}}` dict (multi-sheet XLSX). |\n| `overwrite` | Allow overwriting an existing output file (default `false`). |\n\n`input_data` has a stable, extension-specific shape:\n\n- CSV: a list of row lists. If a header is detected, it is `input_data[0]` and data rows start at `input_data[1:]`.\n- XLSX: a dict: `{sheet_name: {\"columns\": list, \"rows\": list_of_rows}}`.\n\n**Path containment:** File paths must resolve inside a configured allowed boundary before any read/write occurs.\nThe server supports both **client-configured MCP roots** and **server-configured allowed directories** (via `--allowed-dirs` or `user_config.allowed_directories` in the manifest).\nThe server validates paths against these boundaries before any file access.\n\n**Limits:** Max file size 50 MB, max 100K rows, max 500 columns, max 50 input sheets.\n\n## Security Notes\n\n- **Bearer token authentication.** Pass `--token MY_SECRET_TOKEN` when running in HTTP mode and include `Authorization: Bearer <token>` in client requests.\n- **DNS rebinding protection.** Starlette Middlewares validate `Host`, `Sec-Fetch-Site` and `Origin` headers.\n- **Code sandbox.** The `execute_code` tool validates all Python code via\n  AST analysis before execution. Imports, file access, and dangerous\n  builtins are blocked.\n\n## Privacy Policy\n\nPlease find the Bentley Systems privacy policy [here](https://www.bentley.com/legal/privacy-policy/).\n\n---\n\n## Development Setup\n\n### 1. Clone the repository\n\n```powershell\ngit clone https://github.com/BentleySystems/openstaad-mcp.git\ncd openstaad-mcp\n```\n\n### 2. Create a virtual environment\n\n```powershell\npython -m venv .venv\n\n# Windows (PowerShell)\n.\\.venv\\Scripts\\Activate.ps1\n\n# Windows (cmd)\n.venv\\Scripts\\activate.bat\n```\n\n### 3. Install in editable mode with dev dependencies\n\n```powershell\npip install -e \".[dev]\"\n```\n\n### 4. Run the server from source\n\n```powershell\n# stdio mode (default)\nopenstaad-mcp\n\n# HTTP mode\nopenstaad-mcp --transport http\n```\n\n### 5. Run tests\n\n```powershell\n# All unit tests (no STAAD.Pro needed)\npytest\n\n# Specific test files\npytest tests/test_skills.py tests/test_connection.py -v\n\n# Integration tests (requires a running STAAD.Pro instance on Windows)\npytest -m integration -v\n```\n\n### 6. Lint\n\n```powershell\nruff check .\nruff format --check .\n```\n\n### 7. Building the MCPB Bundler\n\n1. To produce the standalone `.exe` files distributed via the installer:\n\n  ```powershell\n  pip install -e \".[build]\"\n  pyinstaller mcpb/openstaad-mcp.spec --noconfirm\n  ```\n\n  This creates one file in the `dist/` directory:\n\n  - `openstaad-mcp.exe`: console executable (stdio & http transport)\n\n2. To create the `.mcpb` installer bundle, run:\n\n  ```powershell\n  npm install -g @anthropic-ai/mcpb\n  New-Item -ItemType Directory -Path mcpb-staging -Force\n  Copy-Item dist/openstaad-mcp.exe mcpb-staging/\n\n  $version = (Select-String -Path pyproject.toml -Pattern '^version\\s*=\\s*\"(.+)\"$').Matches[0].Groups[1].Value\n  $manifest = Get-Content mcpb/manifest.json -Raw | ConvertFrom-Json\n  $manifest.version = $version\n  $manifest | ConvertTo-Json -Depth 10 | Set-Content mcpb-staging/manifest.json -Encoding utf8\n\n  mcpb pack mcpb-staging/ openstaad-mcp.mcpb\n  ```\n\nThe output MCPB bundle is written to `.\\openstaad-mcp.mcpb`.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on setting up your\ndevelopment environment, branch naming, running tests, and submitting pull\nrequests.\n",
  "bytes": 12678,
  "sha": "d4ffb308d54067edc744e521ad834222fb13800fdc1cbcc3e3dc616c863bc0b7",
  "repo_slug": "bentleysystems/openstaad-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_bentleysystems_openstaad_mcp_8c324cb4/readme"
}