Zoo Mcp

io.github.KittyCADPublished by GitHub account KittyCADv0.34.3Updated Nov 7, 2026

An MCP server that provides access to the Zoo API for various CAD operations and tools.

VerifiedSTDIODesktop onlyDeveloper ToolsMedia & Design

Overview

AI-generated overview

Zoo MCP gives an assistant access to the Zoo CAD API: run KCL code, manage modeling sessions, import CAD files, snapshot and export geometry.

What you can do
  • Execute KCL code, with mock preflight and real execution results, and run standalone mock checks
  • Manage persistent modeling sessions: start, list, reuse by session ID and stop
  • Import CAD files and take snapshots, selections, highlights and camera views of a model
  • Export models, take measurements and query geometry
  • List and search public Aquarium KCL sample projects and download their sources
When to use it
Useful when you want an assistant to write and run Zoo KCL scripts, iterate on parametric CAD models, or pull public sample projects as starting points, without leaving the chat.
Requirements
Runs locally as a Python package (uvx zoo-mcp or uv run -m zoo_mcp); uv is needed, or use the prebuilt binaries. A Zoo account is required for most tools: either run the auth login command once (saved in the system credential store) or set an API token via ZOO_API_TOKEN (also KITTYCAD_API_TOKEN, or the ZOO_TOKEN alias). Public sample tools work without a token. Network access to the Zoo API is required.
Before you install
The API token is a credential: keep it out of shared configs and transcripts, and note that an explicit environment token overrides saved logins. Executing KCL runs code against Zoo's engine and can consume account resources; exports and file imports read local files, though dependencies outside the entrypoint directory are rejected. Prebuilt binaries are not code-signed, so macOS and Windows may warn on first run.

Installation

In SourceWeft

  1. Open Zoo Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

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:

bash
export ZOO_API_TOKEN="your_api_key_here"

Installation

  1. Ensure uv has been installed

  2. Create a uv environment

    bash
    uv venv
  3. Activate your uv environment (Optional)

  4. Install the package from GitHub

    bash
    uv pip install git+ssh://[email protected]/KittyCAD/mcp.git

Running the Server

The server can be started by using uvx

bash
uvx zoo-mcp

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

bash
uv run -m zoo_mcp

Manage device login explicitly:

bash
uvx zoo-mcp auth loginuvx zoo-mcp auth login --no-browseruvx zoo-mcp auth statusuvx 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

bash
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:

bash
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:

python
from zoo_mcp.client_config import ZooClientConfig, use_client_configfrom 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.

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.:

bash
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.

python
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.

python
from mcp.server.mcpserver import MCPServerfrom 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

bash
uv run mcp install src/zoo_mcp/server.py

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

bash
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

bash
uv run mcp dev src/zoo_mcp/server.py

For running with codex-cli

bash
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:

bash
./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.

bash
uvx ruff checkuvx ruff format

ty is used for type checking.

bash
uvx ty check

Testing

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

bash
uv run pytest -n auto

Source: README.md at commit 2aac766

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

20
  1. v0.34.3LatestNov 7, 2026
  2. v0.34.1Nov 6, 2026
  3. v0.34.0Nov 5, 2026
  4. v0.33.0Oct 30, 2026
  5. v0.29.0Oct 30, 2026
  6. v0.28.16Oct 29, 2026
  7. v0.28.14Oct 26, 2026
  8. v0.28.13Oct 25, 2026
  9. v0.28.12Oct 16, 2026
  10. v0.28.11Oct 15, 2026
  11. v0.28.9Oct 7, 2026
  12. v0.28.8Oct 7, 2026
  13. v0.28.7Oct 5, 2026
  14. v0.28.6Oct 1, 2026
  15. v0.28.5Oct 1, 2026
  16. v0.28.3Sep 29, 2026
  17. v0.28.2Sep 28, 2026
  18. v0.28.1Sep 22, 2026
  19. v0.28.0Sep 19, 2026
  20. v0.27.0Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts