HO

hedless/onshape-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

163 stars 74 forks 品質 69 トレンド 25

hedless/onshape-mcpは、https://github.com/hedless/onshape-mcp.からインポートされたMCPサーバー候補です。

概要

hedless/onshape-mcpは、https://github.com/hedless/onshape-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

Onshapeを用いたプログラムCADモデリングのための強化モデルコンテキストプロトコル(MCP)サーバー。

特徴

このMCPサーバーはOnshapeのREST APIへの包括的なプログラムアクセスを提供し、以下を可能にします:

コア機能(45のツール)

  • ドキュメント発見 - プロジェクトの検索・リスト、Part Studiosの検索、ワークスペースのナビゲーション
  • パラメトリックスケッチ - 標準平面上の長方形、円、線、弧
  • 特徴管理 - 押し出し、回転、厚み付け、フィレット、面取り、ブール、パターン特徴
  • アセンブリ管理 - アセンブリの作成、インスタンスの追加、部品の配置、メイトの作成(固定、スライダー、回転、円筒形)
  • アセンブリ解析 - 干渉チェック、位置検証、面座標系、ボディ詳細
  • 変数テーブル - パラメトリック設計用のOnshape変数テーブルの読み書き
  • FeatureScript - FeatureScript 式の評価、境界ボックスの取得
  • エクスポート - パーツスタジオやアセンブリをSTL、STEP、PARASOLID、GLTF、OBJにエクスポート
  • Part Studio Management - プログラム的にPart Studiosを作成・管理

設置

前提条件

  • Python 3.10以降
  • APIアクセス権を持つOnshapeアカウント

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Onshape MCP Server

Enhanced Model Context Protocol (MCP) server for programmatic CAD modeling with Onshape.

Features

This MCP server provides comprehensive programmatic access to Onshape’s REST API, enabling:

Core Capabilities (45 tools)

  • Document Discovery - Search and list projects, find Part Studios, navigate workspaces
  • Parametric Sketches - Rectangles, circles, lines, and arcs on standard planes
  • Feature Management - Extrude, revolve, thicken, fillet, chamfer, boolean, and pattern features
  • Assembly Management - Create assemblies, add instances, position parts, create mates (fastened, slider, revolute, cylindrical)
  • Assembly Analysis - Interference checking, position verification, face coordinate systems, body details
  • Variable Tables - Read and write Onshape variable tables for parametric designs
  • FeatureScript - Evaluate FeatureScript expressions, get bounding boxes
  • Export - Export Part Studios and Assemblies to STL, STEP, PARASOLID, GLTF, OBJ
  • Part Studio Management - Create and manage Part Studios programmatically

Installation

Prerequisites

  • Python 3.10 or higher
  • Onshape account with API access
  • Onshape API keys (access key and secret key)

Setup

  1. Clone the repository:
git clone https://github.com/hedless/onshape-mcp.git
cd onshape-mcp
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -e .
  1. Set up environment variables:
export ONSHAPE_ACCESS_KEY="your_access_key"
export ONSHAPE_SECRET_KEY="your_secret_key"

Or create a .env file:

ONSHAPE_ACCESS_KEY=your_access_key
ONSHAPE_SECRET_KEY=your_secret_key

Getting Onshape API Keys

  1. Go to Onshape Developer Portal
  2. Sign in with your Onshape account
  3. Create a new API key
  4. Copy the Access Key and Secret Key

Usage

Running the Server

onshape-mcp

Or directly with Python:

python -m onshape_mcp.server

Configuring with Claude Code

Add to your ~/.claude/mcp.json:

{
  "mcpServers": {
    "onshape": {
      "command": "/absolute/path/to/onshape-mcp/venv/bin/python",
      "args": ["-m", "onshape_mcp.server"],
      "env": {
        "ONSHAPE_ACCESS_KEY": "your_access_key_here",
        "ONSHAPE_SECRET_KEY": "your_secret_key_here"
      }
    }
  }
}

Important Notes:

  • Use the absolute path to your virtual environment’s Python executable
  • Find your path: cd onshape-mcp && pwd to get the directory path
  • On Windows: Use C:/path/to/onshape-mcp/venv/Scripts/python.exe
  • Replace the API keys with your actual keys from Onshape Developer Portal
  • Restart Claude Code after editing mcp.json

Verify it works: Ask Claude Code: “Can you list my Onshape documents?”

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "onshape": { "command": "/absolute/path/to/onshape-mcp/venv/bin/python", "args": ["-m", "onshape_mcp.server"], "env": { "ONSHAPE_ACCESS_KEY": "your_access_key_here", "ONSHAPE_SECRET_KEY": "your_secret_key_here" } } } }