0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

**`Antigravity CLI`** 設定チートシート

0
Last updated at Posted at 2026-09-09

概要

自分の開発環境で、Antigravity CLI を使用する際に設定した方法をメモとして残す

フォルダ構成

.
├── .agents/
│   ├── mcp_config.json # MCPサーバの設定ファイル

エージェントの定義

プロジェクト内で動作するエージェントを定義する。

<project folder>/.agents/agents/{agent_name}/agent.md
---
name: {agent_name}
description: **エージェントの説明**
model: **使用モデル**
tools: **使用ツール**
    - view_file
    - write_to_file
    - replace_file_content
    - list_dir
    - find_by_name
    - grep_search
    - run_command
    - manage_task
    - schedule
    - invoke_subagent
    - define_subagent
    - manage_subagents
    - send_message
    - ask_question
    - search_web
    - read_url_content
    - generate_image
    - mcp:<server_name>:<tool_name>
temperature: 0.2 **ランダム性**
---

# 役割と振る舞い

**エージェントの役割を定義**

## 主なタスク
1. **実行するタスク1**
2. **実行するタスク2**
    .
    .

## 制約事項

**エージェントの制約事項を定義**

MCPサーバの確認

Antigravity CLI 内で /mcp コマンドを実行し、プロジェクト内で使用できるMCPサーバーの情報を表示する

agy
~~~
以降、Antigravity CLI内で実行
~~~
/mcp

------------------------------------
MCP Servers

Plugins (~\.gemini\config\plugins)
>  ✓ fusion360  Tools: get_scene_info, get_object_info, get_bounding_box, create_sketch,
                draw_rectangle, +84 more

Keyboard: ↑/↓ Navigate  enter Actions

プロジェクト内実行権限の設定

Antigravity CLI 内で /permissions コマンドを実行し、プロジェクト内の実行権限を設定する

agy
~~~
以降、Antigravity CLI内で実行
~~~
/permissions

------------------------------------
# [Project] を選択し、Enterを押す
Permission Config Editor

Select a config scope to edit:

> Project                
  Shared with Antigravity
  Global

  Rules that apply only to this project (highest priority)

Keyboard: ↑/↓ Navigate  enter Save  esc Close

------------------------------------
# [allow list] を選択し、`a`: ルール追加を押す
Permissions — Project
 allowlist (1)    denylist (0)    asklist (0)   (←/→ to switch)

no rules

Keyboard: ↑/↓ Navigate  ←/→ Switch View  a Add rule  e Edit rule  d/⌫ Delete rule  esc C

------------------------------------
# 許可したい内容を追加

## MCPの場合
mcp(*)  # 全許可
mcp(fusion360/*) # 特定のサーバーへのコマンドを全許可
mcp(fusion360/get_scene_info) # 特定のコマンドを許可

MCPサーバ参考

Fusion 360 MCP

Fusion 360 Addon を入手する

# Githubからリポジトリを入手する
git clone https://github.com/faust-machines/fusion360-mcp-server
cd fusion360-mcp-server

# Windows (PowerShell)のFusion360にアドオンを追加する
Copy-Item -Recurse addon "$env:APPDATA\Autodesk\Autodesk Fusion 360\API\AddIns\Fusion360MCP"

Fusion MCPサーバー を入手する

# ツールとしてfusion360-mcp-serverをインストールする
# 2026/08/31時点ではPyPI内のパッケージは依存関係が壊れているのでGitHubからインストールする
uv tool install --force --with "mcp>=1.2.0,<2.0.0" git+https://github.com/faust-machines/fusion360-mcp-server.git

mcp_config.jsonに設定を追加する
※Fusion360はWindowsで起動しているのでIPアドレスの引数と追記

# .agents/mcp_config.json
{
    "mcpServers": {
        "fusion360": {
            "command": "uvx",
            "args": [
                "fusion360-mcp-server",
                "--host", "<ip address>"
            ]
        }
    }
}

Blender MCP

Blener MCPサーバーを入手する

uv tool install blender-mcp

mcp_config.jsonに設定を追加する

{
    "mcpServers": {
        "blender": {
            "command": "uvx",
            "args": [
                "blender-mcp"
            ]
        }
    }
}

JLCPCB Parts MCP

jlcpcb-pats-mcp をインストール

mkdir -p ~/.local/share
cd ~/.local/share
git clone https://github.com/nvsofts/jlcpcb-parts-mcp.git
cd jlcpcb-parts-mcp

# 仮想環境の作成と依存関係のインストール
uv venv .venv
uv pip install -r requirements.txt

実行時に以下のエラーが出る場合はスクリプトを修正する必要がある

ImportError: cannot import name 'Image' from 'fastmcp'

server.py の 16 行目を書き換え、fastmcp.utilities.types からインポートするように修正します。

sed -i 's/from fastmcp import FastMCP, Image/from fastmcp import FastMCP\nfrom fastmcp.utilities.types import Image/' server.py

データベースを入手する

mkdir -p ~/.local/share/jlcpcb-parts-mcp/data
cd ~/.local/share/jlcpcb-parts-mcp/data

# 解凍ツールのインストール(未導入の場合)
sudo apt install -y p7zip-full

# GitHub Pages から全分割パーツをダウンロード
DATAURL="https://yaqwsx.github.io/jlcparts/data"

echo "Downloading cache.zip..."
wget -q --show-progress "${DATAURL}/cache.zip"

part=1
while true; do
  if [ "$part" -le 99 ]; then
    suffix=$(printf "%02d" "$part")
  else
    suffix="$part"
  fi
  name="cache.z${suffix}"
  echo "Checking ${name}..."
  if wget -q --show-progress "${DATAURL}/${name}"; then
    part=$((part + 1))
  else
    rm -f "${name}"
    echo "All parts downloaded (${part} total)."
    break
  fi
done

# 7z で解凍(分割アーカイブが自動的に結合され cache.sqlite3 が生成されます)
7z x cache.zip

# 不要になった圧縮ファイルを削除して容量を確保
rm -f cache.zip cache.z*

実行するスクリプトを作成する

mkdir -p ~/.local/bin

cat << 'EOF' > ~/.local/bin/jlcpcb-parts-mcp
#!/usr/bin/env bash
set -e

BASE_DIR="$HOME/.local/share/jlcpcb-parts-mcp"

# JLCPCB 部品データベースのフルパス
export JLCPCB_DB_PATH="${JLCPCB_DB_PATH:-$BASE_DIR/data/cache.sqlite3}"

exec "$BASE_DIR/.venv/bin/python" "$BASE_DIR/server.py" "$@"
EOF

chmod +x ~/.local/bin/jlcpcb-parts-mcp

mcp_config.jsonに設定を追加する

{
  "mcpServers": {
    "jlcpcb-parts": {
      "command": "jlcpcb-parts-mcp",
      "args": []
    }
  }
}

Digikey MCP

digikey_mcpを入手する

mkdir -p ~/.local/share
cd ~/.local/share
git clone https://github.com/bengineer19/digikey_mcp.git
cd digikey_mcp

# 仮想環境作成と依存関係の同期
uv venv .venv
uv sync

APIキーを設定する
Digikey APIを入手するにはDigikeyのサイトから作成する

cat << 'EOF' > ~/.local/share/digikey_mcp/.env
DIGIKEY_CLIENT_ID="your_client_id_here"
DIGIKEY_CLIENT_SECRET="your_client_secret_here"
# 必要に応じて sandbox / production 等のフラグ
EOF

実行スクリプトを作成する

mkdir -p ~/.local/bin

cat << 'EOF' > ~/.local/bin/digikey-mcp
#!/usr/bin/env bash
set -e

BASE_DIR="$HOME/.local/share/digikey_mcp"

# .env があれば環境変数として読み込む
if [ -f "$BASE_DIR/.env" ]; then
  set -a
  source "$BASE_DIR/.env"
  set +a
fi

exec "$BASE_DIR/.venv/bin/python" "$BASE_DIR/digikey_mcp_server.py" "$@"
EOF

chmod +x ~/.local/bin/digikey-mcp

mcp_config.jsonへ追記する

{
  "mcpServers": {
    "digikey": {
      "command": "digikey-mcp",
      "args": []
    }
  }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?