Skip to main content

ROIKO MCP server

This server connects an MCP client to the ROIKO API. Create a key in ROIKO settings and keep it private. Until publication, replace the path below with the absolute path to this mcp_server folder.

{"mcpServers":{"roiko":{"command":"uvx","args":["--from","C:/path/to/Roiko/mcp_server","roiko-mcp"],"env":{"ROIKO_API_KEY":"your key here"}}}}

Add this to Claude Desktop's configuration and restart it. Call roiko_whoami to check the connection. ROIKO_API_URL selects another API endpoint. Once the package is on PyPI the --from part goes and the command is uvx roiko-mcp.

mcp-name: ai.roiko/mcp

Remote server — after the server is switched on

The same server runs at https://app.roiko.ai/mcp (Streamable HTTP). Nothing to install: send your key as a bearer. This recipe works only once ROIKO has switched the remote server on; until then the local recipe above is the one to use.

claude mcp add --transport http roiko https://app.roiko.ai/mcp --header "Authorization: Bearer rk_live_…"

Cursor and VS Code take the same URL and header in their mcp.json:

{"mcpServers":{"roiko":{"url":"https://app.roiko.ai/mcp","headers":{"Authorization":"Bearer ${env:ROIKO_API_KEY}"}}}}

Each request is checked against your key (a revoked key stops working within 30 s). A request without a key, or with a key ROIKO does not know, gets a 401. The remote server never sees anything but your own key, and every call it makes to ROIKO is made with that key, so you see exactly what the key sees. Read-only mode is per server, not per request: use a key with only the read scope for an autonomous agent.

Running the remote server yourself

roiko-mcp --transport http listens on ROIKO_MCP_HOST:ROIKO_MCP_PORT (default 127.0.0.1:8001) at /mcp, behind a reverse proxy that sets Host, X-Real-IP and X-Forwarded-For and does not buffer text/event-stream. It refuses to start if ROIKO_API_KEY is set (the key comes with each request). Variables: ROIKO_API_URL (the API it calls, HTTPS or HTTP on loopback), ROIKO_MCP_ALLOWED_HOSTS (comma list of accepted Host values; default the resource URL's host plus host:port), ROIKO_MCP_RESOURCE_URL (default https://app.roiko.ai/mcp), ROIKO_MCP_STATE_KEYS (one or more 32+ character secrets that seal multi-step request state across restarts; without it a fresh key is made at every start), ROIKO_MCP_READ_ONLY.

Tools

Read tools (any key): roiko_whoami, roiko_list_projects, roiko_list_models, roiko_get_model_summary, roiko_get_model, roiko_get_job, roiko_get_results, roiko_get_checks, roiko_search_catalogue, plus the resources roiko://projects, roiko://projects/{id}/models, roiko://models/{id}, roiko://models/{id}/results, roiko://models/{id}/report (markdown) and roiko://catalogue/{name}.

Write tools (the key needs the write scope; roiko_create_model_from_text also needs run):

  • roiko_create_project — makes a new project (name, optional country, location, description, client, project number) and returns its id, to use as project_id below. Needs the write scope and an author seat.
  • roiko_create_model_from_text — plain English in, a saved model out. Without model_id it creates a model (in project_id, else the personal workspace) and generates into it; with model_id it changes that model by prompt. dry_run: true previews without saving. Each saved version is of kind ai.
    • When ROIKO needs more detail it asks back. A client that supports MCP elicitation gets a form and the call finishes on its own; any other client receives status: "question" with a thread, and the assistant calls again with the same prompt and model_id plus answer and that thread.
    • A big model may come back status: "partial": what was built is saved, the tool continues once with the API's thread, and if the model is still incomplete it says what is missing.
    • A generation that outruns the API's 85 s budget is reported as an error that says nothing was saved; the model created for it can be reused with model_id.
  • roiko_edit_model — precise, bounded edits by id (add_member, update_member, remove_member, add_foundation, remove_foundation, add_surface, update_surface, remove_surface, set_release, set_support, upsert_load_case, remove_load_case, set_levels, set_grids, replace_structure), 1 to 50 operations applied together or not at all. The server reads the full structure, applies the patch and saves with expected_version_id (the model's current version when none is given), so every key the assistant never named survives. If the model changed meanwhile the API answers a version conflict, nothing is saved, and the tool says to read the model again and retry. A refused structure names the element, the field and the reason. Each saved version is of kind api.
    • Bulk operations — for repeating, mirroring and group edits, so the text tool is not needed. Each counts as one of the 50 operations. Limits: 2,000 rows a table, 5,000 elements created and 5,000 loads added a call, 20,000 elements a model; a call with a bulk operation may take up to 90 s. The full fields are in the tool's own input schema. One example each:
      • add_members_table / add_foundations_table: {"op": "add_members_table", "kind": "beam", "defaults": {"profile": {"profile_type": "IPE", "size": "300"}, "material": "S355"}, "columns": ["id", "x1", "y1", "z1", "x2", "y2", "z2"], "rows": [["B1", 0, 0, 6, 6, 0, 6], ["B2", 6, 0, 6, 12, 0, 6]]}
      • copy_transform (move, mirror, rotate about a vertical axis, polar array; loads, releases and supports only when named in include): {"op": "copy_transform", "select": {"id_suffix": "-b0"}, "transform": {"rotate": {"axis_point": [0, 0], "angle_deg": 7.5, "count": 47}}, "id_rename": {"replace": ["-b0", "-b{n}"]}, "include": ["members", "foundations", "surfaces", "supports", "releases"]}
      • update_members: {"op": "update_members", "select": {"kinds": ["beam"], "id_prefix": "SB"}, "set": {"cardinal_point": 1}}
      • update_surfaces (thickness in metres): {"op": "update_surfaces", "select": {"kinds": ["slab"]}, "set": {"thickness": 0.22}}
      • add_loads: {"op": "add_loads", "load_case_id": "G", "select": {"kinds": ["beam"], "id_prefix": "SB"}, "load": {"kind": "distributed", "qz": -8}}; inside upsert_load_case a load may carry select in place of element_ref or surface_ref.
    • A selector (select) takes ids, id_prefix, id_suffix, kinds, profile, section, level_z and box; every condition given must hold, and matching nothing is an error.
    • remove_member keeps the loads that name the member, as a delete in the app does, and says how many; remove_surface removes the area loads that name it.

Both model tools return the model summary and a resource_link to roiko://models/{id}, never the structure JSON.

Analysis tools

  • roiko_run_analysis (a write tool; the key needs the run scope) — runs the analysis and code checks on the model's latest saved version, or on version_id. Optional: national_annex (two letters), second_order, include_self_weight, consequence_class. It asks the API to answer at once (Prefer: respond-async), then checks the job every 2 s (every 3 s after 20 s) for up to wait_seconds (default 45, at most 60; one call never waits past 90 s). A finished run returns the results summary: the verdict line, the highest utilisations per family, the worst deflection, the reactions and the stability check. A run still going returns its job_id and says to call roiko_get_job a few seconds later. A cached result comes back at once. Each run spends the user's analysis allowance, and the API saves the result as a version of kind analysis.
  • roiko_get_job — checks a job (waits up to wait_seconds, default 20) and returns the same summary when it is done. A failed or cancelled job is an error that says why.
  • roiko_get_results — the saved result in slices: kind summary, checks, deflections (mm, limit, utilisation) or reactions (kN, kN·m, ruling combination only), with member_ids, min_utilisation, combination, sort, limit (up to 50) and cursor.
  • roiko_get_checks — the API's check rows (GET /models/{id}/checks): governing check, clause, demand and capacity where the result names them, utilisation, verdict, combination. failing_only, family (steel, concrete, foundation, base_plate, wall, slab, joint, deflection), member_ids, min_utilisation, detail and cursor. detail: "all" gives every check row: each EN 1993 check of a steel member (§6.2.5 bending with M_Ed and M_Rd, shear, buckling, ...) under its governing combination, and each pad or plate sub-check; a row with no capacity or no ratio says why in note. It is on by default with member_ids or family foundation / base_plate; detail: "governing" keeps one row per member.

Every analysis reply stays under 40 000 characters and carries a resource_link to roiko://models/{id}/results for the full result. Plan limits (402), a plan without analysis (403), rate limits (429), a model with no result yet and cancelled runs each come back as one plain sentence.

Export and catalogue tools

  • roiko_export (a write tool: it spends the report and export allowances; the key needs the run scope) — format report returns the calculation report as markdown, inline up to 40 000 characters; a longer report is cut with truncated: true and a resource_link to roiko://models/{id}/report, which holds it whole (the last report is kept 10 minutes, so reading it spends nothing more). dxf, ifc, sheet-pdf (needs sheets) and mto always come back as a download link with its expiry (about 15 minutes), never as file bytes. mto also returns the take-off totals (steel by profile, concrete by grade, rebar, panels) unless mto_summary_too is false. Until download links are switched on at the server, a file export says so in one plain sentence; mto still returns its totals.
  • roiko_search_catalogue — sections (searched by the API with query and family, optionally limited to a project_id), steel, concrete and rebar grades, base-plate parts, grating types, slab and wall thicknesses, and jurisdictions (filtered here). Paged with cursor, 25 rows by default, cached 10 minutes; response_format: "detailed" adds the section properties.

Prompts

design_review (summary, then failing checks, then deflections), explain_governing_check (one member's check, clause, demand and capacity) and size_a_beam (the lightest section in the family under a target utilisation, at most three tries).

Read-only mode

ROIKO_MCP_READ_ONLY=true (also 1 or yes) hides the five write tools (roiko_create_project, roiko_create_model_from_text, roiko_edit_model, roiko_run_analysis, roiko_export) from the tool list, and they refuse if a client calls them anyway. roiko_whoami reports read_only: true. Use it, or a key with only the read scope, for autonomous agents that must not change models; a key without write is refused by the API with a readable message in either mode.

Changes

0.2.0 (not published yet)

  • roiko_edit_model gains bulk operations: add_members_table, add_foundations_table, copy_transform (move, mirror, rotate, polar array; loads, releases and supports carried when named), update_members, update_surfaces, add_loads, and loads by selector inside upsert_load_case. Slabs, walls and gratings by id: add_surface, update_surface, remove_surface.
  • A refused structure names the element (kind, index, id), the field and the reason.
  • A run refused for memory says the estimate and what is free (insufficient_memory).
  • roiko_create_model_from_text refuses an ask of more than about 200 elements before anything is made or charged, and points to the bulk operations (too_large_for_text).
  • Concrete sections also take millimetres (b_mm, h_mm, grade); thickness and mesh size above sensible bounds are refused as millimetres typed as metres.
  • remove_member says how many loads still name the removed member.
  • A save no longer sends the 3D viewer's profile outline back to the API; on very large models (about 16,000 steel members) that made the next edit fail as extensions_too_large.

Metadata

Release files for roiko-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roiko-mcp 0.2.0
File Size Uploaded Provenance Actions
roiko_mcp-0.2.0.tar.gz 210.5 kB With provenance Details for roiko_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for roiko-mcp 0.2.0
File Interpreter ABI Platform Actions
roiko_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for roiko_mcp-0.2.0-py3-none-any.whl

Total release size: 342.3 kB

Release files / roiko_mcp-0.2.0.tar.gz

Download URL roiko_mcp-0.2.0.tar.gz
Size 210.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cba6110a6a0ea54aecb9bac41feaa10cd18f55e446002cd31bda2f2274f72654
BLAKE2b-256 checksum
How to use checksums
c81d91607dc4f0872006bb60ec6dc45d243cab550a3428317617e4377eb5cfd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / roiko_mcp-0.2.0-py3-none-any.whl

Download URL roiko_mcp-0.2.0-py3-none-any.whl
Size 131.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f41e6b2ec315899986cb19871e519c7eb37e3e7d65829e08e09ae9d2eeccc4e
BLAKE2b-256 checksum
How to use checksums
faed5ca7c75727e1fc4999e7b71f4cf36e62e8039f990010b33e35849fcae609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for roiko-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for roiko_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page