Skip to main content
Glama
Zoo MCP Server

Zoo MCP Server

Official
by KittyCAD

Zoo Model Context Protocol (MCP) Server

An MCP server housing various Zoo built utilities

Prerequisites

A Zoo account. Run uvx zoo-mcp auth login once before starting the server. The command opens your browser and prints a verification URL and code. The server reuses your saved login; public tools also work without login.

You can also use an API key:

export ZOO_API_TOKEN="your_api_key_here"

Related MCP server: FreeCAD MCP

Installation

  1. Ensure uv has been installed

  2. Create a uv environment

    uv venv
  3. Activate your uv environment (Optional)

  4. Install the package from GitHub

    uv pip install git+ssh://git@github.com/KittyCAD/mcp.git

Running the Server

The server can be started by using uvx

uvx zoo-mcp

The server can be started locally by using uv and the zoo_mcp module

uv run -m zoo_mcp

Manage device login explicitly:

uvx zoo-mcp auth login
uvx zoo-mcp auth login --no-browser
uvx zoo-mcp auth status
uvx zoo-mcp auth logout

Logins are saved per API origin in your system credential store using keyring: macOS Keychain, Windows Credential Locker, or a supported Linux keyring. On headless systems without an available keyring, set ZOO_API_TOKEN instead. Status never displays tokens. Logout removes only the saved login for the current origin; restart running servers afterward. If your login expires or is revoked, run auth login again and restart the server. If the login command fails because of a network error, run it again to retry. Server startup never opens a browser. Device authorization and polling use requests-oauth2client. Device login requires the API's dedicated Zoo MCP device client registration.

The server can also be run with the mcp package

uv run mcp run src/zoo_mcp/server.py

Streamable HTTP

The server uses stdio by default. To serve the same tools over Streamable HTTP:

uvx zoo-mcp --transport streamable-http --host 127.0.0.1 --port 8000
# From a local checkout:
uv run -m zoo_mcp --transport streamable-http

Connect an MCP client to http://127.0.0.1:8000/mcp. The SDK manages HTTP sessions and streaming responses. --host and --port configure the HTTP listener; their defaults are 127.0.0.1 and 8000.

Supplying client configuration from Python

Local entry points capture credentials when Zoo MCP is imported at startup. Token precedence is KITTYCAD_API_TOKEN, ZOO_API_TOKEN, then the registry's ZOO_TOKEN alias. Any explicit environment token bypasses saved/device login. API origin precedence is ZOO_HOST, KITTYCAD_HOST, then https://api.zoo.dev. Saved logins never cross API origins.

Applications can supply client configuration explicitly without changing the process environment or adding authentication arguments to MCP tools:

from zoo_mcp.client_config import ZooClientConfig, use_client_config
from zoo_mcp.server import mcp

with use_client_config(ZooClientConfig(token=api_token, base_url=api_origin)):
    result = await mcp.call_tool("list_org_datasets", {})

The context supplies the same token, origin, and headers to the KittyCAD SDK and KCL session constructors and restores the previous configuration on exit. New calls can use refreshed configuration. Finish child tasks before leaving their configuration context. An explicit configuration context also prevents the server lifespan from loading a saved local login. Hosted workers and embeddings should always use this interface.

To forward custom HTTP headers, pass headers={"User-Agent": "MyApp/1.0", "X-Request-Source": "example"} to ZooClientConfig. These headers reach REST requests and modeling WebSocket handshakes, including KCL sessions. A supplied User-Agent replaces the default value. Tokens and headers are excluded from configuration representations.

Client configuration applies to downstream calls. Applications serving different owners must also isolate their process-wide modeling sessions and workspaces.

The optional ZOO_MCP_MAX_INLINE_IMAGE_BYTES environment variable limits the raw file size for inline execution images. Larger images return artifact metadata and can be downloaded. The default has no size limit.

Prebuilt binaries

Each GitHub release also attaches standalone executables (built with PyInstaller) for Linux (x86_64, arm64), macOS (arm64, x86_64), and Windows (x86_64) — no Python toolchain required. Download the binary for your platform, set ZOO_API_TOKEN, and run it directly, e.g.:

ZOO_API_TOKEN="your_api_key_here" ./zoo-mcp-linux-x86_64

The binaries are not code-signed, so macOS Gatekeeper and Windows SmartScreen may warn on first run.

Integrations

The server can be used as is by running the server or importing directly into your python code.

from zoo_mcp.server import mcp

mcp.run()

Individual tools can be used in your own python code as well. At Zoo we use zoo-mcp like this with ZooKeeper to save on resources. Instead of spinning up one MCP server per agent, each agent in a sense "embeds" the server in their own runtime. It has the additional benefit of preventing shared state.

from mcp.server.mcpserver import MCPServer
from zoo_mcp.zoo_tools import ResultZooExecuteKcl, zoo_execute_kcl

mcp = MCPServer(name="My Example Server")


@mcp.tool()
async def my_execute_kcl(kcl_code: str) -> ResultZooExecuteKcl:
    """
    Example tool that uses the zoo_execute_kcl function from zoo_mcp.zoo_tools
    """
    return await zoo_execute_kcl(kcl_code=kcl_code)

The server can be integrated with Claude desktop using the following command

uv run mcp install src/zoo_mcp/server.py

The server can also be integrated with Claude Code using the following command

claude mcp add --scope project "Zoo-MCP" uv -- --directory "$PWD"/src/zoo_mcp run server.py

The server can also be tested using the MCP Inspector

uv run mcp dev src/zoo_mcp/server.py

For running with codex-cli

codex \
  -c 'mcp_servers.zoo.command="uvx"' \
  -c 'mcp_servers.zoo.args=["zoo-mcp"]' \
  -c mcp_servers.zoo.env.ZOO_API_TOKEN="$ZOO_API_TOKEN"

You can also use the helper script included in this repo:

./codex-zoo.sh

The script prompts for a request, runs Codex with the Zoo MCP server, and saves a JSONL transcript (including token usage) to codex-run-<timestamp>.jsonl.

Architecture

Tools are defined in src/zoo_mcp/*.py, where they are then imported into src/zoo_mcp/server.py and tied to actual @mcp.tool() decorated functions.

src/zoo_mcp/zoo_tools.py acts as a large toolset to interact with Zoo's KCL and engine facilities. This source file houses other utilities like parse_unit or normalize_ext (normalizing file extensions).

Modeling scenes use explicit persistent sessions, with at most one session open per server process. Call get_modeling_sessions to recover its ID after a client reconnect, or call start_modeling_session when none exists. Populate the session with execute_kcl or import_cad_file, passing session_id to either tool. Reuse the same session_id with snapshot and modeling tools; then call stop_modeling_session when finished.

Sessions remain available across client reconnects while the server and engine connection stay alive. Idle sessions continue receiving engine status messages so keepalive checks remain responsive. Disconnected sessions are removed from get_modeling_sessions; start a new session and execute the model again to recover.

KCL execution and persistent modeling sessions use the CPU engine pool. Isolated KCL snapshots temporarily enable CPU rendering. Persistent sessions initialize rendering on the first snapshot, selection, highlight, or camera tool and retain it until the session is stopped, preserving visual state across calls. Exports, measurements, and geometry queries do not initialize graphics.

The KCL samples tools list and search public Aquarium projects from the Zoo API. Pass the returned name (a public project ID) to get_kcl_sample to download its KCL sources. Filenames preserve project-relative paths, including subdirectories. These public tools do not require an API token. The multipleFiles field in list/search results is a hint until the project has been downloaded.

execute_kcl runs mock execution before real execution and returns separate mock_preflight and real_execution objects. Each contains status (succeeded, failed, or not_run), message, and diagnostics grouped by severity. Stage messages are short summaries; the top-level message retains the full report for existing callers. Failed stages also expose error_family, including ZooMCPTimeoutError for session timeouts. Mock errors or an aborted mock execution return immediately with ok: false and real_execution.status: "not_run". Mock warnings remain in mock_preflight.diagnostics even if real execution fails. The known planeOf mock-engine limitation is reported as a warning so the real engine can evaluate it; other mock errors still block execution. Session responses expose mock diagnostics; the engine does not return real-stage diagnostics for session execution.

Path inputs capture the entrypoint, its transitive imports (including linked modules and glTF buffers), and project.toml once. Both stages use that copy without scanning unrelated files in the containing directory. Dependencies and symlink targets must stay inside the entrypoint's directory; external paths are rejected before file reads or execution. Transient local real-execution failures retain their bounded retries using the same copy without repeating mock execution. Diagnostics refer to the original source paths. Inline kcl_code accepts self-contained code and standard-library imports; filesystem imports require kcl_path so their dependencies can be captured within an explicit directory. When calling execute_kcl with session_id, check ok, then read path_artifact_graph on session success. The standalone mock_execute_kcl tool continues to return its existing boolean/message pair.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository

PRs will need to pass tests and linting before being merged.

ruff is used for linting and formatting.

uvx ruff check
uvx ruff format

ty is used for type checking.

uvx ty check

Testing

The server includes tests located in tests. To run the tests, use the following command:

uv run pytest -n auto

Available Tools

61 tools
calculate_bounding_box_cadA

Calculate the bounding box of a CAD file.

Args: input_file (str): The path of the CAD file. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive)

Returns: dict | str: A dictionary with 'center' (dict with x,y,z) and 'dimensions' (dict with x,y,z), or an error message if the operation fails.

Inputs: input_file (required). Returns: result

calculate_cad_physical_propertiesA

Calculate physical properties (volume, mass, surface area, center of mass, bounding box) of a CAD file.

Args: input_file (str): The path of the file. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive) unit_length (str): The unit of length for center of mass. One of 'cm', 'ft', 'in', 'm', 'mm', 'yd'. unit_mass (str): The unit of mass for the mass result. One of 'g', 'kg', 'lb'. unit_density (str): The unit of density for the material. One of 'lb:ft3', 'kg:m3'. density (float): The density of the material. unit_area (str): The unit of area for surface area. One of 'cm2', 'dm2', 'ft2', 'in2', 'km2', 'm2', 'mm2', 'yd2'. unit_volume (str): The unit of volume. One of 'cm3', 'ft3', 'in3', 'm3', 'mm3', 'yd3', 'usfloz', 'usgal', 'l', 'ml'.

Returns: dict | str: A dictionary with keys 'volume', 'mass', 'surface_area', 'center_of_mass', and 'bounding_box', or an error message if the operation fails.

Inputs: density (required), unit_area (required), unit_mass (required), input_file (required), +3 more. Returns: result

calculate_center_of_massA

Calculate the center of mass of a 3d object represented by the input file.

Args: input_file (str): The path of the file to get the mass from. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive) unit_length (str): The unit of length to return the result in. One of 'cm', 'ft', 'in', 'm', 'mm', 'yd'

Returns: str: The center of mass of the file in the specified unit of length, or an error message if the operation fails.

Inputs: input_file (required), unit_length (required). Returns: result

calculate_massA

Calculate the mass of a 3d object represented by the input file.

Args: input_file (str): The path of the file to get the mass from. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive) unit_mass (str): The unit of mass to return the result in. One of 'g', 'kg', 'lb'. unit_density (str): The unit of density to calculate the mass. One of 'lb:ft3', 'kg:m3'. density (float): The density of the material.

Returns: str: The mass of the file in the specified unit of mass, or an error message if the operation fails.

Inputs: density (required), unit_mass (required), input_file (required), unit_density (required). Returns: result

calculate_surface_areaA

Calculate the surface area of a 3d object represented by the input file.

Args: input_file (str): The path of the file to get the surface area from. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive) unit_area (str): The unit of area to return the result in. One of 'cm2', 'dm2', 'ft2', 'in2', 'km2', 'm2', 'mm2', 'yd2'.

Returns: str: The surface area of the file in the specified unit of area, or an error message if the operation fails.

Inputs: unit_area (required), input_file (required). Returns: result

calculate_volumeA

Calculate the volume of a 3d object represented by the input file.

Args: input_file (str): The path of the file to get the volume from. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive) unit_volume (str): The unit of volume to return the result in. One of 'cm3', 'ft3', 'in3', 'm3', 'mm3', 'yd3', 'usfloz', 'usgal', 'l', 'ml'.

Returns: str: The volume of the file in the specified unit of volume, or an error message if the operation fails.

Inputs: input_file (required), unit_volume (required). Returns: result

cancel_job_executionC

Request cancellation. Check the job's status to confirm how it ended.

Inputs: job_id (required). Returns: id, status, created_at, runtime_id, +6 more

center_camera_on_selectionA

Point the camera at the current "selection set".

Useful for making a small selection legible, especially an edge: an edge is only a pixel or two wide, so centring it helps far more than any change of colour. Set the selection first with select_entities.

Centring moves the camera without re-framing the scene, so parts of the model may fall outside the image. Follow with snapshot passing zoom=False, since zoom=True re-frames the whole scene and undoes the centring.

Args: session_id: An open modeling session, from start_modeling_session. Required: camera position is scene state and would be discarded without one. move_vantage: Move the camera's vantage point as well as its target. True (the default) centres the selection most precisely; False re-aims the camera from where it already is.

Returns: DefaultCameraCenterToSelection: Confirmation that the camera was centred.

Inputs: session_id (required), move_vantage. Returns: The response from the `DefaultCameraCenterToSelection` endpoint.

convert_cad_fileA

Convert a CAD file from one format to another CAD file format.

Args: input_file (str): The input cad file to convert. The file should be one of the supported formats: .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, .stl (case-insensitive) export_path (str | None): The path to save the converted CAD file to. If the path is a directory, a temporary file will be created in the directory. If the path is a file, it will be overwritten if the extension is valid. export_format (str | None): The format of the exported CAD file. This should be one of 'fbx', 'glb', 'gltf', 'obj', 'ply', 'step', 'stl'. If no format is provided, the default is 'step'.

Returns: str: The path to the converted CAD file, or an error message if the operation fails.

Inputs: input_file (required), export_path (required), export_format (required). Returns: result

curve_get_end_pointsA

Get the start and end points of a curve entity.

Args: curve_id: Curve UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: CurveGetEndPoints: The curve's start and end points.

Inputs: curve_id (required), session_id (required). Returns: Endpoints of a curve

curve_get_typeA

Get whether a curve is a line, arc, or NURBS curve.

Args: curve_id: Curve UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: CurveGetType: The curve's geometric type.

Inputs: curve_id (required), session_id (required). Returns: The response from the `CurveGetType` command.

edge_get_lengthA

Get the length of an edge entity in the current scene units.

Args: edge_id: Edge UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: EdgeGetLength: The edge length in the current scene units.

Inputs: edge_id (required), session_id (required). Returns: The response from the `EdgeGetLength` command.

engine_util_evaluate_pathA

Evaluate a serialized KCL path at parameter t.

Examples of path_json:

{
  "start": {
    "from": [10, 0]
  },
  "value": [
    {
      "type": "Arc",
      "center": [0, 0],
      "radius": 10,
      "angle_range": [0, 90]
    }
  ]
}
{
  "start": {
    "from": [0, 0]
  },
  "value": [
    {
      "type": "ToPoint",
      "to": [10, 0]
    },
    {
      "type": "ToPoint",
      "to": [10, 10]
    }
  ]
}

Args: path_json: The serialized JSON representation of the KCL sketch or path. t: Normalized path parameter, conventionally between 0 and 1. session_id: A modeling session populated by execute_kcl.

Returns: EngineUtilEvaluatePath: The position on the path at parameter t.

Inputs: t (required), path_json (required), session_id (required). Returns: The response of the `EngineUtilEvaluatePath` endpoint

entity_distanceA

Get the minimum and maximum distance between two model entities.

Args: entity_id1: The first entity UUID, typically obtained from an artifact graph. entity_id2: The second entity UUID. session_id: A modeling session populated by execute_kcl. on_axis: Optional global axis for projected distance; omit for Euclidean distance.

Returns: EntityGetDistance: The minimum and maximum distance between the entities.

Inputs: entity_id1 (required), entity_id2 (required), session_id (required), on_axis. Returns: The response from the `EntitiesGetDistance` command.

entity_get_all_child_uuidsB

Get all child UUIDs belonging to an entity.

Args: entity_id: Entity UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: EntityGetAllChildUuids: All child entity UUIDs.

Inputs: entity_id (required), session_id (required). Returns: The response from the `EntityGetAllChildUuids` command.

entity_get_indexA

Get an entity's index within its parent.

Args: entity_id: Entity UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: EntityGetIndex: The entity's index within its parent.

Inputs: entity_id (required), session_id (required). Returns: The response from the `EntityGetIndex` command.

entity_get_parent_idA

Get the UUID of an entity's parent.

Args: entity_id: Entity UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: EntityGetParentId: The parent entity's UUID.

Inputs: entity_id (required), session_id (required). Returns: The response from the `EntityGetParentId` command.

entity_get_sketch_pathsB

Get the sketch path UUIDs belonging to an entity.

Args: entity_id: Entity UUID, typically obtained from an artifact graph. session_id: A modeling session populated by execute_kcl.

Returns: EntityGetSketchPaths: The sketch path UUIDs belonging to the entity.

Inputs: entity_id (required), session_id (required). Returns: The response from the `EntityGetSketchPaths` command.

evaluate_kclA

Execute KCL once and collect requested measurements, snapshots and exports.

Prefer this when several checks or final export formats are known in advance. Provide exactly one source: self-contained kcl_code or a saved kcl_path project. Save editable source separately; inline code does not create a source file. Mock errors prevent hosted execution. The isolated session closes after the operation; no persistent session ID is needed or returned.

snapshot_request: Optional views (1–4 named views or camera dicts with up, vantage, center). An empty object requests one isometric image. Named views use zoom-to-fit; custom views default to their explicit framing. physical_properties_request: Optional properties list (volume, mass, surface_area, center_of_mass, bounding_box) and units. Mass additionally requires density and unit_density. Only requested properties are measured. exports: Optional format/destination_dir pairs. Each format needs a separate, non-overlapping directory, created if missing. Returned bundle filenames are preserved; existing files are not overwritten. Request final formats together rather than executing separately for each export. Use sldprt for a native SolidWorks part when enabled for your account or organization.

Returns structured execution/inspection outcomes and per-export statuses and file paths, plus an inline image when requested and available. ok describes execution only. The tool reports an error if execution or any requested snapshot, measurement, or export fails. Output failures never rerun geometry; successful outputs remain available.

Inputs: exports, kcl_code, kcl_path, snapshot_request, +1 more.

execute_kclA

Execute KCL code given a string of KCL code or a path to a KCL project. Either kcl_code or kcl_path must be provided. If kcl_path is provided, it should point to a .kcl file or a directory containing a main.kcl file.

Prefer evaluate_kcl when execution, measurements, snapshots, or exports are needed together; it collects them from one execution.

Executing kcl_code does not save a .kcl source file. For model creation, save the source and required project files with the client's authorized file-editing tools, then validate the saved project using kcl_path and include the editable KCL files in the handoff.

Session executions save the artifact graph to a temporary JSON file and return its path. Local executions do not produce an artifact graph and can have large network overhead depending on the model.

Args: kcl_code (str | None): Self-contained KCL code to execute. Standard-library imports are allowed; filesystem imports require kcl_path. kcl_path (str | None): The path to a KCL file to execute. The path should point to a .kcl file or a directory containing a main.kcl file. Dependencies and symlink targets must remain inside the entrypoint's directory. session_id: An open modeling session in which to execute the KCL.

Returns: ResultZooExecuteKcl: Separate mock_preflight and real_execution outcomes, each with status, message, and diagnostics. Mock errors return immediately with real_execution not_run; mock warnings remain visible and allow real execution. Known mock-engine limitations are warnings. Session successes include path_artifact_graph. Transient local failures may retry real execution without repeating preflight.

Inputs: kcl_code, kcl_path, session_id. Returns: result

format_kclA

Format KCL code given a string of KCL code or a path to a KCL project. Either kcl_code or kcl_path must be provided. If kcl_path is provided, it should point to a .kcl file or a directory containing .kcl files.

Args: kcl_code (str | None): The KCL code to format. kcl_path (str | None): The path to a KCL file to format. The path should point to a .kcl file or a directory containing a main.kcl file.

Returns: str | None: Returns the formatted kcl code if the kcl_code is used otherwise returns None, the KCL in the kcl_path will be formatted in place

Inputs: kcl_code, kcl_path. Returns: result

get_face_infoA

Get the position, gradient, normal, and center of a face in a modeling session.

Args: face_id (str): Usually a user or LLM-selected face id. session_id: A modeling session populated by execute_kcl.

Returns: FaceInfo: The face position, gradient, normal, and center. The position is the starting point of the face's outside perimeter in KittyCAD engine space. The center is the geometric center of the face and should generally be preferred over the position.

Inputs: face_id (required), session_id (required). Returns: face_get_center, face_get_gradient, face_get_position

get_job_executionA

Check a job's status, archived log previews, and outputs. Wait up to 20 seconds. Pass results.artifacts.next_page as artifact_page_token for more outputs.

Inputs: job_id (required), wait_seconds, artifact_page_token. Returns: A durable job and partial, paginated reads of its retained outputs.

get_kcl_docA

Get the full content of a specific KCL documentation file.

Prefer lookup_kcl_docs first; fetch a full page when more detail is needed. Use list_kcl_docs() to see available documentation paths, or lookup_kcl_docs() to find relevant documentation by symbol or topic.

Args: doc_path (str): The path to the documentation file (e.g., "docs/kcl-lang/functions" or "docs/kcl-std/functions/std-sketch-extrude")

Returns: str: The full Markdown content of the documentation file, or an error message if not found.

Raises: ToolError: Documentation could not be fetched; the call can be retried.

Inputs: doc_path (required). Returns: result

get_kcl_sampleA

Get the full content of a specific KCL sample including all files.

Downloads a public Aquarium project and retrieves its KCL files with their project-relative paths, including files in subdirectories.

Use list_kcl_samples() to see available sample names, or search_kcl_samples() to find samples by keyword.

Args: sample_name (str): The public project ID returned by list_kcl_samples() or search_kcl_samples().

Returns: SampleData | str: A SampleData dictionary containing: - name: The public project ID - title: Human-readable title - description: Brief description - multipleFiles: Whether the sample contains multiple files. Reliable here (unlike in list_kcl_samples / search_kcl_samples), because this tool downloads the project and counts its KCL files. - files: List of SampleFile dictionaries, each with a project-relative 'filename' and its 'content' Returns an error message string if the sample is not found.

Raises: ToolError: The sample could not be fetched; the call can be retried.

Inputs: sample_name (required). Returns: result

get_modeling_sessionsA

List modeling sessions owned by the current MCP server process.

Use this to recover the active session ID after reconnecting to a server process. A restarted server has no sessions. The current implementation supports at most one session, but the list return type allows future support for multiple sessions.

Returns: list[str]: Active modeling session IDs, currently empty or one item.

Inputs: no named parameters. Returns: result

get_sketch_constraint_statusA

Execute KCL and return a report of sketch constraint status. Either kcl_code or kcl_path must be provided. If kcl_path is provided, it should point to a .kcl file or a directory containing a main.kcl file.

Sketches are grouped by constraint status: fully_constrained, under_constrained, over_constrained, and errors. Each sketch entry includes the sketch name, status, free_count (under-constrained segments), conflict_count (over-constrained segments), and total_count (total segments analyzed).

The report also includes kcl_executes_successfully (False when KCL parsing/execution failed before all sketches were analyzed) and kcl_error (None on success, otherwise a dict with phase ("parse" or "execution") and text fields describing the failure). A partial report may still contain sketch entries analyzed prior to the failure.

Args: kcl_code (str | None): The KCL code to check constraints for. kcl_path (str | None): The path to a KCL file or directory containing a main.kcl file.

Returns: dict | str: A report grouping sketches by constraint status, or an error message if the operation fails.

Inputs: kcl_code, kcl_path. Returns: result

highlight_set_entitiesA

Replace the currently highlighted entities. Does NOT modify the "selection set".

This is a visual command: follow it with the snapshot tool, passing the same session_id and zoom=False, to see the highlight without moving the camera. It highlights edges, surfaces and bodies.

Highlighting only brightens an entity slightly. select_entities is markedly more obvious, tinting the entity and drawing an outline around it. For the strongest emphasis on a face, call both; on an edge call only one, because selection overrides the highlight. An edge is a pixel or two wide whichever you choose, so also consider center_camera_on_selection or a larger max_image_dimension to make one legible.

Highlights draw through the solid, so an entity facing away from the camera still renders, seen through the body. A highlighted entity in a snapshot is therefore not evidence that it faces the camera; choose a camera on the same side as the entity to see it properly.

Args: entity_ids: Entity UUIDs to highlight; pass an empty list to clear highlights. session_id: An open modeling session, from start_modeling_session. Required: highlights are scene state and would be discarded without one.

Returns: HighlightSetEntities: Confirmation that the highlights were replaced.

Inputs: entity_ids (required), session_id (required). Returns: The response from the `HighlightSetEntities` endpoint.

import_cad_fileA

Import a CAD file into an existing modeling session.

Args: session_id: The ID returned by start_modeling_session. input_file: Path to a .fbx, .gltf, .obj, .ply, .sldprt, .step, .stp, or .stl file.

Returns: str: The modeling engine ID of the imported object.

Inputs: input_file (required), session_id (required). Returns: result

lint_and_fix_kclA

Lint and fix KCL code given a string of KCL code or a path to a KCL project. Either kcl_code or kcl_path must be provided. If kcl_path is provided, it should point to a .kcl file or a directory containing .kcl files.

Args: kcl_code (str | None): The KCL code to lint and fix. kcl_path (str | None): The path to a KCL file to lint and fix. The path should point to a .kcl file or a directory containing a main.kcl file.

Returns: tuple[str, list[str]]: If kcl_code is provided, it returns a tuple containing the fixed KCL code and a list of unfixed lints. If kcl_path is provided, it returns a tuple containing a success message and a list of unfixed lints for each file in the project.

Inputs: kcl_code, kcl_path. Returns: result

list_cloud_librariesA
Read-only

List personal libraries and active-organization libraries, including all creation sources.

Continue with next_page as page_token, even when a page has no items. Unassigned projects have no named library; use list_cloud_projects for them.

Inputs: limit, page_token.

list_cloud_projectsA
Read-only

Browse cloud projects and return cloud: project_id values for filesystem tools.

Use library_id alone or scope/unassigned without library_id. Keep filters unchanged while continuing with next_page as page_token.

Inputs: limit, scope, library_id, page_token, +1 more.

list_job_executionsC

List this account's jobs across conversations, newest first. Use next_page to continue.

Inputs: status, page_token, runtime_id. Returns: items, next_page

list_kcl_docsA

List all available KCL documentation topics organized by category.

Returns a dictionary with the following categories:

  • kcl-lang: KCL language documentation (syntax, types, functions, etc.)

  • kcl-std-functions: Standard library function documentation

  • kcl-std-types: Standard library type documentation

  • kcl-std-consts: Standard library constants documentation

  • kcl-std-modules: Standard library module documentation

Each category contains a list of documentation file paths that can be retrieved using get_kcl_doc().

Returns: dict: Categories mapped to lists of available documentation paths.

Raises: ToolError: Documentation could not be fetched; the call can be retried.

Inputs: no named parameters. Returns: result

list_kcl_samplesA

List all available KCL sample projects.

Returns the public Aquarium projects from the Zoo API. Each sample demonstrates a CAD modeling technique or creates a particular 3D model.

Returns: list[dict]: List of sample information, each containing: - name: The public project ID (use with get_kcl_sample) - title: Human-readable title - description: Brief description of what the sample creates - multipleFiles: Whether the sample contains multiple KCL files. Best-effort hint only. The public listing doesn't expose file counts, so this is False for any sample that has not yet been fetched via get_kcl_sample. Call get_kcl_sample if you need a reliable answer.

Raises: ToolError: The sample index could not be fetched; the call can be retried.

Inputs: no named parameters. Returns: result

list_org_datasetsA

List the datasets available to the user's organization.

Only datasets the organization has enabled for lookup are listed; datasets excluded from lookup (for example while their conversions are still being worked on) are omitted and should not be searched.

Each dataset has a UUID id, a human-readable name, and an optional description. Use the id as the dataset_id argument to search_org_dataset_semantic.

Returns: A list of {"id": str, "name": str, "description": str | None} entries, or an error message if the operation fails.

Inputs: no named parameters. Returns: result

list_org_skillsB

List the skills available to the user's organization.

Each skill has a UUID id, a human-readable name, a description, and a markdown body containing the skill's full content.

Returns: A list of {"id": str, "name": str, "description": str, "markdown": str} entries, or an error message if the operation fails.

Inputs: no named parameters. Returns: result

lookup_kcl_docsA

Look up compact KCL reference sections. Prefer this for initial docs lookup.

Matches symbols, titles, headings, and keywords. Returns source paths and nonempty sections with complete examples and table rows when they fit. max_chars is a shared budget for Markdown content across all results (metadata is additional). Tables may omit rows within this budget. Truncated results can be expanded with get_kcl_doc(path). Both limits must be positive.

Inputs: query (required), max_chars, max_results. Returns: object

mock_execute_kclA

Mock execute KCL code given a string of KCL code or a path to a KCL project. Either kcl_code or kcl_path must be provided. If kcl_path is provided, it should point to a .kcl file or a directory containing a main.kcl file.

Args: kcl_code (str | None): The KCL code to mock execute. kcl_path (str | None): The path to a KCL file to mock execute. The path should point to a .kcl file or a directory containing a main.kcl file.

Returns: tuple(bool, str): Returns True if the KCL code executed successfully and a success message, False otherwise and the error message.

Inputs: kcl_code, kcl_path. Returns: result

project_accessB

Get current project access capabilities for an existing path.

Requires a cloud: project ID and the caller's Zoo credentials. Default total uncompressed project limit: 256 MiB.

Inputs: project_id (required), path, max_project_bytes.

project_cpA

Copy a file or directory within a cloud: project in one upload.

An existing destination directory receives the source basename. Existing files may be replaced, except main.kcl. Directory collisions are errors. Without expected_revision, conflicts refresh and reapply. Default total project limit: 256 MiB. Pass expected_revision from a read to reject stale edits, including changes during upload. A rejected write is not reapplied to a newer revision. This guards the project's content revision. Generated previews such as thumbnail.png can change within that revision.

Inputs: source (required), project_id (required), destination (required), expected_revision, +1 more.

project_mkdirA

Create a cloud project directory using a zero-byte .empty file.

The parent must exist and the target must not exist. The visible .empty marker may remain after files are added. Default project limit: 256 MiB. Pass expected_revision from a read to reject stale edits, including changes during upload. A rejected write is not reapplied to a newer revision. This guards the project's content revision. Generated previews such as thumbnail.png can change within that revision.

Inputs: path (required), project_id (required), expected_revision, max_project_bytes.

project_mvA

Move a file or directory within a cloud project in one replacement upload.

Uses project_cp destination rules. Cannot move or overwrite main.kcl or move the root. Without expected_revision, conflicts refresh and reapply against the latest contents. Default total uncompressed project limit: 256 MiB. Pass expected_revision from a read to reject stale edits, including changes during upload. A rejected write is not reapplied to a newer revision. This guards the project's content revision. Generated previews such as thumbnail.png can change within that revision.

Inputs: source (required), project_id (required), destination (required), expected_revision, +1 more.

project_readdirA

List immediate cloud directory children as {files: [metadata, ...]}.

Requires a cloud: project ID. Includes the project revision for a subsequent mutation's expected_revision. Default total uncompressed project limit: 256 MiB. The revision tracks project content; generated previews such as thumbnail.png can change within that revision.

Inputs: project_id (required), path, max_project_bytes.

project_read_fileB

Read a cloud project file as UTF-8 text or base64-encoded binary data.

Returns {contents: str, encoding: str, revision: str}. Downloads only the requested file from the current content revision. Generated previews such as thumbnail.png can change within that revision. Default total project limit: 256 MiB.

Inputs: path (required), project_id (required), encoding, max_project_bytes.

project_rmA

Remove a cloud project file or directory recursively, without globbing.

Cannot remove the project root or main.kcl. Without expected_revision, conflicts remove the latest contents beneath the path, including new files. Default total uncompressed project limit: 256 MiB. Pass expected_revision from a read to reject stale edits, including changes during upload. A rejected write is not reapplied to a newer revision. This guards the project's content revision. Generated previews such as thumbnail.png can change within that revision.

Inputs: path (required), project_id (required), expected_revision, max_project_bytes.

project_statA

Get cloud project file metadata or an inferred directory's kind and path.

Directory-specific IDs, timestamps, sizes, and hashes are null because the API stores files. Includes the project revision for a subsequent mutation's expected_revision. Default total uncompressed project limit: 256 MiB. The revision tracks project content; generated previews such as thumbnail.png can change within that revision.

Inputs: project_id (required), path, max_project_bytes.

project_write_fileA

Write a file in a cloud: project; its parent must exist.

Without encoding, bytes are written unchanged and strings use UTF-8. Explicit encoding applies to strings: utf-8 for text or base64 for binary data over JSON MCP transports. Replaces the file if present, including main.kcl. Without expected_revision, conflicts refresh and reapply this write. max_project_bytes bounds total uncompressed project bytes (default 256 MiB). Returns acknowledged project metadata plus the normalized path, contents, and encoding. Text uses UTF-8; raw bytes and base64 inputs return base64. Pass expected_revision from a read to reject stale edits, including changes during upload. A rejected write is not reapplied to a newer revision. This guards the project's content revision. Generated previews such as thumbnail.png can change within that revision.

Inputs: path (required), contents (required), project_id (required), encoding, +2 more.

read_job_execution_logsA

Read up to 64 KiB of archived stdout or stderr. Check available and continue at next_offset. data_base64 gives the original page bytes when text is lossy or a UTF-8 character crosses a page boundary.

Inputs: job_id (required), limit, offset, stream. Returns: text, offset, stream, complete, +7 more

search_cloud_projectsA
Read-only

Search project titles/descriptions/filenames in the caller's active organization.

Source contents and personal projects are not searched. library_id optionally restricts to one organization library. Search indexing is asynchronous. Results describe version_id at search time; filesystem tools read current files.

Inputs: query (required), limit, library_id.

search_kcl_samplesA

Search KCL samples by keyword.

Searches across all KCL sample titles and descriptions for the given query. Returns matching samples ranked by relevance.

Args: query (str): The search query (case-insensitive). max_results (int): Maximum number of results to return (default: 5).

Returns: list[dict]: List of search results, each containing: - name: The public project ID (use with get_kcl_sample) - title: Human-readable title - description: Brief description of the sample - multipleFiles: Whether the sample contains multiple KCL files. Best-effort hint only — see list_kcl_samples for the full caveat. Call get_kcl_sample if you need a reliable answer. - match_count: Number of times the query appears in title/description - excerpt: A relevant excerpt with the match in context

Raises: ToolError: The sample index could not be fetched; the call can be retried.

Inputs: query (required), max_results. Returns: result

search_org_dataset_semanticA

Semantic-search a dataset for samples relevant to the query.

Embeds the query with the org-dataset embedding model and returns the top chunk matches ranked by cosine similarity.

Args: dataset_id (str): The UUID of the dataset to search (from list_org_datasets). query (str): The natural-language query to embed and search with. limit (int | None): Optional max number of matches to return.

Returns: A list of match dicts (source_file_path, content, similarity, chunk_index, conversion_id), or an error message if the operation fails.

Inputs: query (required), dataset_id (required), limit. Returns: result

select_entitiesA

Replace the "selection set" with the given entities.

Takes UUIDs exactly as they appear in an artifact graph, and works for faces, edges, and solids alike.

Selected entities render with a distinct color tint and an outline, which is considerably more obvious in a snapshot than the subtler brightening that highlight_set_entities applies. For the strongest emphasis on a face, call both this and highlight_set_entities; for an edge use just one, as selection overrides the highlight. Follow with snapshot (passing zoom=False to keep the current camera) to see the result.

Selections draw through the solid. An entity facing away from the camera still renders tinted, seen through the body, so a tinted entity in a snapshot is not evidence that it faces the camera: an occluded edge shows up as an interior diagonal rather than on the silhouette, and an occluded face looks washed out rather than solid. Pick a camera on the same side as the entity to see it properly.

Args: entity_ids: Entity UUIDs to select; pass an empty list to clear the selection. session_id: An open modeling session, from start_modeling_session. Required: the selection is scene state and would be discarded without one.

Returns: SelectReplace: Confirmation that the selection was replaced.

Inputs: entity_ids (required), session_id (required). Returns: The response from the `SelectReplace` endpoint.

set_selection_filterB

Set which model entity types can be added to the "selection set".

Args: entity_types: Entity types permitted by the selection filter. session_id: An open modeling session, from start_modeling_session. Required: the filter is scene state and would be discarded without one.

Returns: SetSelectionFilter: Confirmation that the filter was set.

Inputs: session_id (required), entity_types (required). Returns: The response from the `SetSelectionFilter` endpoint.

snapshotA

Render an open modeling session as an image.

Populate the scene first by passing this session_id to execute_kcl. The camera always uses an orthographic projection, so measurements read off the image are not distorted by perspective.

Args: session_id: A modeling session populated by execute_kcl. camera_view: Which view or views to capture. Omit it for a single isometric view. Otherwise one of:

    1. A named view: 'front', 'back', 'left', 'right', 'top',
       'bottom', 'isometric', 'isometric_front_right',
       'isometric_front_left', 'isometric_back_right',
       'isometric_back_left'.

       A named view puts the camera on that axis looking back at the
       origin, matching the app's standard views: 'front' is -Y,
       'back' is +Y, 'left' is -X, 'right' is +X, 'top' is +Z and
       'bottom' is -Z.

       So 'front' shows the face whose outward normal is -Y. The four
       isometric views all look down from above, from (+X, -Y, +Z)
       for 'isometric_front_right', (-X, -Y, +Z) for
       'isometric_front_left', (+X, +Y, +Z) for
       'isometric_back_right' and (-X, +Y, +Z) for
       'isometric_back_left'. Plain 'isometric' is front-right.

    2. A dict with "up", "vantage" and "center" keys, each a list of 3
       floats in model space: "vantage" is the camera position and
       "center" the point it looks at. For example
       {"up": [0, 0, 1], "vantage": [0, -1, 0], "center": [0, 0, 0]}
       looks at the origin from the front, showing the -Y face.

       With zoom=True only the direction from "center" to "vantage"
       matters, because zooming to fit sets the distance: [0, -1, 0]
       and [0, -200, 0] frame identically. "up" must not be parallel
       to that direction.

    3. 'multiview' for a 2x2 collage of front (top left), right (top
       right), top (bottom left) and isometric (bottom right).

    4. 'multi_isometric' for a 2x2 collage of the front-right (top
       left), front-left (top right), back-right (bottom left) and
       back-left (bottom right) isometric views.

    5. A list of up to 4 names and/or dicts, tiled in the order given.

zoom: Zoom to fit before capturing each view. Leave True unless you
      have positioned the session's camera yourself; a freshly
      executed scene is not framed, so zoom=False renders the model
      only a few pixels wide.
highlight_edges: Whether rendered edges should be outlined. Default is
                 False so that entities highlighted with
                 highlight_set_entities are obvious in the image.
max_image_dimension: Maximum width or height of the returned JPEG.
padding: Fraction of the frame left as margin when zooming to fit.
output_path: If provided, the snapshot is written to disk and the
             absolute file path is returned instead of the image. May
             be a file path (e.g. '/path/to/image.jpg') or a directory
             (in which case the file is named 'image.jpg'). If
             omitted, the image is returned inline as an ImageContent.
             The file is always JPEG data whatever extension is given,
             so prefer '.jpg' to avoid writing a JPEG named '.png'.

Returns: ImageContent | str: The snapshot as an inline image when output_path is omitted; otherwise the absolute path to the saved file.

Inputs: session_id (required), zoom, padding, camera_view, +3 more.

start_modeling_sessionA

Open an empty CPU modeling session for subsequent tools.

Only one modeling session can be open at a time. Stop the current session before starting another. If one is already open, or is still connecting, this fails with an error naming that session's ID so it can be stopped.

The server does not expire sessions after an idle or lifetime timeout. Callers are responsible for tracking and enforcing their desired timeout.

Pass the returned session_id to execute_kcl to populate the scene, then reuse it with modeling query, selection, and highlight tools. Stop the session explicitly with stop_modeling_session when finished.

Returns: str: The session ID to pass to session-aware modeling tools.

Inputs: no named parameters. Returns: result

stop_modeling_sessionA

Close a persistent modeling websocket session.

Also accepts the ID of a session that is still connecting, which cancels that start and frees the slot for a new start_modeling_session call.

Args: session_id: The ID returned by start_modeling_session, or the one named by a "already open or starting" error.

Returns: None

Inputs: session_id (required). Returns: result

submit_job_executionA

Start a remote job with an argv command and workspace-relative inputs and outputs. If the response is lost, retry with the same key and uploaded IDs or list existing jobs.

Inputs: submission (required), idempotency_key (required). Returns: id, status, created_at, runtime_id, +6 more

upload_job_execution_inputA

Upload a file from the MCP server. Use the returned ID as an input to submit_job_execution.

Inputs: input_file (required). Returns: id, sha256, byte_length

use_job_execution_artifactA

Read a retained output as paged UTF-8 text or an inline image. To save any format, use download with a new file path on the MCP server. Only text reads accept a byte offset.

Inputs: job_id (required), artifact_id (required), action, offset, +1 more.

visualize_sketchA

Render a named 2D KCL sketch as a solver-debug PNG.

The image shows sketch geometry and solver freedom without requiring an existing modeling session. sketch_name is the sketch's variable name, such as profile in profile = sketch(on = XY) { ... }. Use get_sketch_constraint_status to discover sketch names when needed. A completed sketch may still be rendered after a later execution failure. A returned PNG does not mean the whole project executes successfully. If names repeat (for example, a function called twice), select an instance_index from a fresh constraint report for the same entrypoint.

Args: sketch_name: Variable name of the sketch to render. kcl_code: KCL source code containing the sketch. kcl_path: Path to a KCL file or project containing main.kcl. output_path: If provided, write the PNG to this file or directory and return its absolute path. A directory receives image.png. If omitted, return the PNG inline as ImageContent. instance_index: Zero-based creation order among sketches with this name. Omit for a unique name; refresh the report after edits.

Returns: The inline PNG, its saved absolute path, or an error message.

Inputs: sketch_name (required), kcl_code, kcl_path, output_path, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 61 tools

    Disambiguation3/5

    Tools are mostly grouped by domain, but there is real overlap: calculate_mass/volume/surface_area/center_of_mass/bounding_box duplicate calculate_cad_physical_properties, and execute_kcl/evaluate_kcl/mock_execute_kcl all execute KCL with different framing. Selection, highlight, and camera-centering tools are distinguishable, but the 61-tool surface makes misselection likely.

    Naming Consistency3/5

    Most names use snake_case, but verb placement is inconsistent: entity_get_parent_id, curve_get_end_points, and edge_get_length are noun-first, while get_face_info and get_modeling_sessions are verb-first. There are also awkward or abbreviated names such as calculate_bounding_box_cad and project_rm/project_cp/project_mv, so the pattern is readable but not uniform.

    Tool Count1/5

    At 61 tools, the server bundles CAD conversion, modeling sessions, entity queries, measurements, jobs, cloud projects, documentation, samples, and org data into one surface. Even if each subdomain has a purpose, the count is far beyond a practical single-server scope and creates severe selection overhead.

    Completeness4/5

    Coverage is broad: it includes modeling session lifecycle, KCL execution/evaluation, measurement, entity inspection, snapshots, cloud project file operations, job execution, docs, samples, and org datasets/skills. Minor gaps remain, such as no obvious cloud project creation/deletion or library management operations, but most core workflows are supported.

    Maintenance

    ActivityActive
    ResponsivenessMixed handling

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables users to control FreeCAD through natural language for creating, editing, and managing 3D objects and documents. It supports executing Python code, capturing screenshots of the workspace, and importing parts from the FreeCAD library.
      11
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to control FreeCAD 3D modeling software, allowing creation and manipulation of 3D objects, execution of Python code, and interaction with FreeCAD's parts library through natural language.
      10
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Controls JupyterCAD using natural language, enabling creation, modification, and boolean operations on 3D CAD models.
      19
      14 PyPI
      20
      Apache 2.0