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 のガイドから始めましょう →