Logo Onshape MCP

Onshape MCP

Cộng đồng
altendky

AI-assisted access to your Onshape CAD documents

Nhà phát hànhaltendky
Kho mãonshape-mcp
Ngôn ngữRust
Bản fork
4
Sao
18
Công cụ có sẵn
7
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Onshape MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 7 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    18 sao và 4 bản fork từ kho mã được liên kết.

Onshape MCP

AI-assisted access to your Onshape CAD documents.

What This Is

Onshape MCP connects your AI assistant to Onshape. You describe what you want in Onshape terms — create a sketch, extrude a part, export an STL — and the AI handles the API calls. This is a helper for people who already know Onshape, not a replacement for CAD skills.

Status

Early development. This is offered for people to try if they're interested — things may not always work as expected, and feedback is appreciated.

This project does not provide a public hosted MCP server or a public OAuth proxy. Run it locally, self-host it, or connect to a server operated by someone you independently trust.

Getting Started

Local Setup (Claude Desktop, OpenCode, or any MCP client)

This is the recommended path. A local server can read and write files on your machine directly — screenshots, exports, and FeatureScript — instead of passing content through the conversation.

Step 1: Create an Onshape OAuth application

Create your own OAuth application in Onshape with http://localhost:18338/callback as a redirect URL. Keep its client ID and client secret available for onshape-mcp auth login. Direct OAuth with these user-owned credentials is the default. API access and secret keys are also supported as an alternative; see Authentication.

Step 2: Get the server binary

Pick whichever is easier for you:

  • npx (requires Node.js): No separate install needed — your MCP client runs npx --yes onshape-mcp and it downloads automatically.
  • Pre-built binary: Download from GitHub Releases and save it somewhere convenient.

Step 3: Configure your MCP client

Tell your MCP client how to launch the server.

Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

Using npx:

json
{
  "mcpServers": {
    "onshape": {
      "command": "npx",
      "args": ["--yes", "onshape-mcp"]
    }
  }
}

Using the downloaded binary:

json
{
  "mcpServers": {
    "onshape": {
      "command": "/path/to/onshape-mcp"
    }
  }
}

OpenCode

Add to your opencode.json:

Using npx:

json
{
  "mcp": {
    "onshape": {
      "type": "local",
      "command": ["npx", "--yes", "onshape-mcp"]
    }
  }
}

Using the downloaded binary:

json
{
  "mcp": {
    "onshape": {
      "type": "local",
      "command": ["/path/to/onshape-mcp"]
    }
  }
}

Other MCP clients

Any MCP client that supports stdio transport can launch this server. The command is either npx --yes onshape-mcp or the path to the downloaded binary.

Step 4: Authenticate and try it

Configure your OAuth client ID and secret, then run npx --yes onshape-mcp auth login when using the npm package, or onshape-mcp auth login when using the downloaded binary. Prefer configuration or ONSHAPE_MCP_AUTH__CLIENT_ID and ONSHAPE_MCP_AUTH__CLIENT_SECRET environment variables. The supported --client-id and --client-secret flags may expose secrets in shell history or process listings. Restart or start your MCP client, then ask your AI assistant to create a new Onshape document with a simple shape.

Experimental Remote Setup

Streamable HTTP remains available for self-hosting, but it is experimental and has not been broadly verified. This project offers no publicly operated endpoint. If an independent operator gives you access, add a placeholder URL such as https://mcp.example.com/mcp to your web MCP client and confirm the operator's trust, access, and retention policies first. ChatGPT connectivity is currently known to fail; see #546.

HTTP transport deliberately disables MCP file reads and writes. File-reference arguments and local output paths therefore cannot access your computer; provide supported request content inline and retrieve remote results through the tool response instead.

Tips

  • Share document URLs. Paste an Onshape document URL into the conversation to give the AI context about what you're working with.
  • Use Onshape vocabulary. Say "extrude," "fillet," "sketch on the top face," etc. The AI has built-in knowledge about Onshape operations.
  • Multiple steps are normal. The AI discovers API endpoints dynamically, so a single request may involve several steps behind the scenes.
  • Be specific when things go wrong. If the AI takes a wrong turn, try describing the Onshape operation more precisely.

What You Can Do

  • Browse and explore your Onshape documents
  • Create new documents and parts
  • Build features: sketches, extrudes, revolves, sweeps, fillets, construction planes
  • Take screenshots of Part Studios from different angles
  • Export parts (STL, STEP, and other formats)
  • Work with FeatureScript — write custom features and debug existing ones

The AI has access to the full Onshape REST API, so anything available through the API is potentially reachable. Results will vary — some operations work more reliably than others at this stage.

Supported Platforms

PlatformArchitecture
Linuxx86_64, aarch64
macOSx86_64, aarch64 (Apple Silicon)
Windowsx86_64

Project Documentation

For development, architecture, and contribution details, see docs/src/project/.

License

Licensed under either of:

at your option.

Cài đặt

TypingMind
{
  "mcpServers": {
    "onshape-mcp": {
      "command": "npx",
      "args": [
        "--yes",
        "onshape-mcp"
      ]
    }
  }
}

Công cụ có sẵn

  • onshape_mcp_auth_status

    Returns authentication status (valid/invalid/expired/not_configured), last check time, and a human-readable message

  • onshape_mcp_auth_login

    Start an OAuth authorization flow. Returns a URL to open in your browser. After authorizing, the server automatically detects the new tokens.

  • onshape_api_search

    Find Onshape API endpoints by keyword or filter. Returns brief summaries (endpoint ID, method, path template, one-line description). Use this to discover available endpoints before calling onshape_api_explain for details.

  • onshape_api_explain

    Get full details for a specific Onshape API endpoint. Returns parameter schemas, types, required/optional flags, request/response schemas. Use the endpoint's operationId from onshape_api_search results.

  • onshape_api_call

    Invoke an Onshape API endpoint. Provide the operationId and structured parameters (path_params, query_params, body). Path parameters are named fields (e.g., {"did": "abc123"}), not baked into a URL string. Returns the API response.

  • onshape_list_resources

    List available resource documents with practical Onshape API guidance. Returns URIs, titles, and descriptions. Use onshape_read_resource to read a specific resource by URI.

  • onshape_read_resource

    Read a specific resource document by URI. Returns the full markdown content with practical guidance for Onshape API usage. Use onshape_list_resources to discover available URIs.

Dùng MCP Onshape MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Onshape MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Onshape MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Onshape MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "onshape-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "onshape-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Onshape MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Onshape MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Onshape MCP giúp tôi làm việc này không?
Onshape MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Onshape MCP.

Câu hỏi thường gặp

Máy chủ MCP Onshape MCP dùng để làm gì?

Onshape MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Onshape MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Onshape MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Onshape MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Onshape MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Onshape MCP với TypingMind?

Onshape MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Onshape MCP cung cấp những công cụ nào trong TypingMind?

Onshape MCP cung cấp 7 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Onshape MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Onshape MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

shaded-views

Rendering Part Studio images via the API, critical `pixelSize` parameter

sketch-constraints

How constraints reference entities, correct JSON format

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇