An MCP server housing various Zoo built utilities
概览
An MCP server housing various Zoo built utilities 1. An API key for Zoo, get one here 2. An environment variable ZOO_API_TOKEN set to your API key 3. Activate your uv environment (Optional) The server can be started locally by using uv and the zoo_mcp module The server can also be run with the mcp package The server uses stdio by default. To serve the same tools over 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. Local entry points capture credentials when Zoo MCP is imported at startup. They accept ZOO_API_TOKEN, KITTYCAD_API_TOKEN, or the registry's ZOO_TOKEN alias, and ZOO_HOST or KITTYCAD_HOST for the API origin.
README
以下为原文 README 节选,完整内容请查看原文。
Zoo Model Context Protocol (MCP) Server
An MCP server housing various Zoo built utilities
Prerequisites
- An API key for Zoo, get one here
- An environment variable
ZOO_API_TOKENset to your API keyexport ZOO_API_TOKEN="your_api_key_here"
Installation
-
uv venv -
Install the package from GitHub
uv pip install git+ssh://[email protected]/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
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 credentials from Python
Local entry points capture credentials when Zoo MCP is imported at startup.
They accept ZOO_API_TOKEN, KITTYCAD_API_TOKEN, or the registry’s ZOO_TOKEN
alias, and ZOO_HOST or KITTYCAD_HOST for the API origin.
Applications can supply credentials explicitly without changing the process environment or adding authentication arguments to MCP tools:
from zoo_mcp.credentials import ZooCredentials, use_credentials
from zoo_mcp.server import mcp
with use_credentials(ZooCredentials(token=api_token, base_url=api_origin)):
result = await mcp.call_tool("list_org_datasets", {})
The context supplies the same token and origin to the KittyCAD SDK and KCL session constructors and restores the previous configuration on exit. New calls can use refreshed credentials. Finish child tasks before leaving their credential context.
Credential contexts configure downstream calls. Applications serving different owners must also isolate their process-wide modeling sessions and workspaces.
Prebuilt binaries
安装
uvx zoo-mcp