KM

kittycad/mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

11 stars 1 forks 품질 71 트렌드 38MIT

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

  1. An API key for Zoo, get one here
  2. An environment variable ZOO_API_TOKEN set to your API key
    export ZOO_API_TOKEN="your_api_key_here"
    

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://[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

GitHub에서 전체 README 보기

설치

uvx zoo-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →