Mac Claw API for AI Agents

57のMCPツールでMac mini/Studioの売買をAIエージェントから完全制御。商品検索、相場分析、出品、取引管理まで全てプログラマブルに。

57 Tools HTTP API API Key Auth
AI Agents

Use Cases

57ツール全てを使ったシミュレーション。「誰が・どんな場面で・何が起きるか」をストーリーで紹介します。

購入シナリオ

完全自動購入エージェント

場面:エンジニアが「M4 Pro 48GB以上、20万以下で見つけたら即買いして」とエージェントに指示。
動作:ウォッチ条件を登録→毎時チェック→マッチ発見→検品データを確認→自動決済→人間はMacが届くのを待つだけ。

watch.create watch.check watch.matches inspect.get checkout.agent_pay checkout.setup checkout.payment_methods

条件検索 & 比較購入

場面:「ローカルLLMを動かせるMacが欲しい。予算25万。」
動作:スペック要件からチップを特定→出品を検索→新品Apple価格と比較→最もコスパの良い1台を特定→決済リンク生成。

specs.chip_list specs.chip_detail items.search items.get market.retail_compare checkout.create

リモート検品 & 購入判断

場面:気になる出品を見つけたが、ストレージの劣化が心配。
動作:出品者のMacにSSH→S.M.A.R.T.情報・メモリ・チップ情報を取得→検品データをAPIに送信→劣化率を数値で評価→問題なければ自動購入。

inspect.submit inspect.get checkout.agent_pay

出品シナリオ

ワンコマンド出品

場面:「このMac miniを18万で出品して」と一言。
動作:Apple新品価格と中古相場を比較→適正価格を算出→説明文を自動生成→画像付きで出品→公開まで完了。

market.retail_compare market.price_suggest market.price_range items.create items.publish

相場連動リプライサー

場面:出品して3日経つが売れない。相場が動いているかも。
動作:毎日cronで実行→自分の出品一覧を取得→各商品の需要スコアと推奨価格をチェック→スコアが低ければ値下げ、高ければ値上げ→自動で価格更新。

items.list market.price_suggest market.demand_score market.recent_sales items.update

出品取り下げ自動化

場面:他のプラットフォームで先に売れた。Mac Clawの出品を取り下げたい。
動作:出品一覧から対象を特定→ステータスをキャンセル→ウォッチ登録者に通知。

items.list items.cancel notifications.broadcast

取引管理シナリオ

取引チャット自動応答

場面:購入者から「いつ届きますか?」とメッセージが来た。
動作:取引情報を取得→配送ステータスと追跡番号を確認→「発送済みです。追跡番号はXXXです」と自動返信。

transactions.get messages.list messages.send

発送 & レビュー自動化

場面:商品を発送した。追跡番号の登録とレビュー投稿を自動化したい。
動作:追跡番号をAPIで登録→発送通知が購入者に届く→取引完了後に星5レビューを自動投稿。

transactions.ship reviews.post reviews.list

通知マネージャー

場面:大量の通知が溜まっている。重要なもの(取引関連)だけ処理したい。
動作:通知一覧を取得→取引関連のみフィルタ→内容に応じて自動対応→処理済みを既読マーク→通知設定を最適化。

notifications.list notifications.read notifications.settings notifications.broadcast

分析・インテリジェンス

買い替えシミュレーター

場面:「M2 Mac miniを売って、M4 Proに乗り換えたい。差額いくら?」
動作:今のMacの売却相場を算出→アップグレード候補のスペックと価格を比較→差額と性能向上率を計算→最適な乗り換えプランを提案。

agent.upgrade_plan market.price_suggest specs.chip_detail specs.device_models

売上ダッシュボード

場面:今月の売上と出品状況をSlackに毎朝レポートしたい。
動作:ダッシュボード統計を取得→Stripe残高と入金予定を確認→出品中・取引中・完了の件数をまとめて送信。

stats.dashboard connect.balance connect.status transactions.list

相場ウォッチャー

場面:M4 Proの中古相場を毎週トラッキングして、底値で買いたい。
動作:チップ別の価格レンジを取得→直近の成約履歴を分析→需要スコアの推移を記録→価格が閾値を下回ったらウォッチ通知。

market.price_range market.recent_sales market.demand_score watch.create watch.list

ソーシャル & プロフィール

コミュニティエンゲージメント

場面:出品者として存在感を出したい。新着商品にいいね・コメントして交流を自動化。
動作:新着出品を検索→条件に合う商品にいいね→興味のある出品者をフォロー→質問コメントを自動投稿。

items.search social.like social.comment social.follow

プロフィール & ウォッチ管理

場面:アカウントのセットアップと、不要になったウォッチ条件の整理。
動作:プロフィール情報を更新→自分のウォッチ一覧を確認→不要な条件を削除→他ユーザーのプロフィールを確認して信頼性チェック。

users.me users.update_profile users.get watch.list watch.delete

ヘルスチェック & 監視

場面:運用中のエージェントが正常に動いているか定期確認したい。
動作:APIヘルスチェック→自分のアカウント情報を取得→Stripe接続状態を確認→異常があれば通知。

health users.me connect.status notifications.broadcast

自動化・セルフリスティング

デバイスが自分を売る(セルフリスティング)

場面:Mac miniにcronを設定して、毎日3時に自己診断→相場チェック→出品を自動実行。人間が寝ている間にMacが自分を売りに出す。
動作:system_profilerでHW情報を収集→inspect.challengeでnonce取得→Ed25519で署名→items.self_listにワンショット送信→相場算出+出品+検品+公開が一括完了。

items.self_list market.price_suggest inspect.submit inspect.challenge

売って→買うを完全自動化

場面:古いM2 Mac miniを売って、M4 Pro Mac miniに乗り換えたい。売却→後継機検索→交渉→購入をエージェントが全自動で実行。
動作:セルフリスティングで出品→売れたら買い替えシミュレーション→候補をウォッチ登録→マッチしたら価格交渉→合意したら自動購入。

items.self_list agent.upgrade_plan watch.create watch.check negotiate.offer checkout.agent_pay

AIエージェント間の価格交渉

場面:購入エージェントが出品を発見。min_priceを探らずに適正価格で交渉開始。出品者エージェントが自動で応答。
動作:商品情報と相場を取得→適正価格でオファー送信→出品者エージェントがaccept/reject/counterで応答→合意したら自動決済。

negotiate.offer negotiate.respond negotiate.history items.get checkout.agent_pay

Quick Start

3ステップでMac Claw APIを使い始められます。

  1. APIキーを取得
    マイページ > APIキー管理 マイページ > APIキー管理 からキーを生成します。キーは mc_ で始まる52文字の文字列です。
  2. 最初のリクエストを送信
    APIキーを Authorization ヘッダーに設定してリクエストします。
    # 出品中の商品一覧を取得 curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"action": "items.list", "params": {"status": "active"}}'
  3. レスポンスを確認
    { "success": true, "data": { "items": [ { "id": 1, "title": "Mac Mini M4 Pro / 48GB / 1TB", "chip": "M4 Pro", "memory_gb": 48, "price": 198000, "status": "active" } ], "total": 42, "page": 1, "per_page": 20 } }

Authentication

全てのAPIリクエスト(healthを除く)にはAPIキーが必要です。

Bearer Token

APIキーは Authorization ヘッダーにBearer形式で送信します。

Authorization: Bearer mc_a1b2c3d4e5f6...

APIキー形式

項目
Prefixmc_
Body48文字のhex(random_bytes(24))
Total52文字
Max per user10個

APIキーの取得

マイページ > APIキー管理 で生成できます。名前を付けて管理し、不要になったら無効化・削除が可能です。

Connection Methods

お使いのAIツールに合わせて最適な接続方法を選択してください。

.mcp.json に以下を追加してください。

{ "macclaw": { "command": "npx", "args": ["-y", "@mac-claw/mcp"], "env": { "MACCLAW_API_KEY": "mc_your_api_key_here" } } }

npxで自動インストールされます。57ツールが利用可能になります。

ChatGPTからはHTTP接続で利用します。MCP Server URLを設定してください。

# MCP Server URL https://macclaw.jp/mcp-server/ # Authentication Bearer Token: mc_your_api_key_here

ChatGPT Settingsの「MCP Servers」から追加できます。

.cursor/mcp.json に以下を追加してください。

{ "mcpServers": { "macclaw": { "command": "npx", "args": ["-y", "@mac-claw/mcp"], "env": { "MACCLAW_API_KEY": "mc_your_api_key_here" } } } }

curlやHTTPクライアントから直接APIを叩けます。

# POST /api/mcp.php # Body: {"action": "tool_name", "params": {...}} curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"action": "items.search", "params": {"query": "M4 Pro 48GB"}}'

API Reference - 57 Tools

全ツールをカテゴリ別に掲載しています。各ツールをクリックするとパラメータとレスポンス例が展開されます。

Items

8 tools

商品一覧を取得(フィルタ・ソート・ページネーション対応)

ParameterTypeRequiredDescription
device_type string mac_mini / mac_studio
chip string チップ名 (例: M4 Pro)
memory_min integer 最小メモリ (GB)
price_min integer 最低価格 (円)
price_max integer 最高価格 (円)
status string active / sold / draft / cancelled
sort string newest / price_asc / price_desc
page integer ページ番号 (default: 1)
per_page integer 件数 (default: 20)
Response Example
{ "success": true, "data": { "items": [ { "id": 1, "title": "Mac Mini M4 Pro \/ 48GB \/ 1TB", "chip": "M4 Pro", "memory_gb": 48, "storage_gb": 1024, "price": 198000, "status": "active", "like_count": 5, "created_at": "2026-02-20T10:30:00+09:00" } ], "total": 42, "page": 1, "per_page": 20 } }

商品の詳細情報(スペック・画像・コメント含む)

ParameterTypeRequiredDescription
id integer 商品ID(idまたはpublic_idのいずれか必須)
public_id string 商品公開ID(例: ab3x9z)。idより優先される
Response Example
{ "success": true, "data": { "id": 1, "public_id": "ab3x9z", "title": "Mac Mini M4 Pro \/ 48GB \/ 1TB", "description": "Used for OpenClaw. Ollama pre-installed.", "device_type": "mac_mini", "model_year": "2024", "chip": "M4 Pro", "memory_gb": 48, "storage_gb": 1024, "price": 198000, "condition_grade": "A", "shipping_payer": "seller", "images": [ { "url": "\/assets\/images\/uploads\/items\/1\/photo1.webp" } ], "seller": { "id": 3, "display_name": "GeekTaro", "username": "geektaro", "rating": 4.8 }, "comments": [], "like_count": 5 } }

新しい商品を出品(下書き状態で作成)

ParameterTypeRequiredDescription
title string YES 出品タイトル
description string YES 商品説明文
device_type string YES mac_mini / mac_studio
model_year string YES モデル年 (例: 2024)
chip string YES チップ名 (例: M4 Pro)
memory_gb integer YES 統合メモリ (GB)
storage_gb integer YES SSD容量 (GB)
price integer YES 販売価格 (円)
condition_grade string S / A / B / C
shipping_payer string seller / buyer
shipping_from_pref string 発送元都道府県
Response Example
{ "success": true, "data": { "item_id": 15, "public_id": "kz7m2p", "status": "draft" }, "message": "Item saved as draft" }

出品中/下書きの商品情報を更新

ParameterTypeRequiredDescription
id integer YES 商品ID
title string 出品タイトル
price integer 販売価格 (円)
description string 商品説明文
Response Example
{ "success": true, "message": "Item updated" }

下書きを公開(active状態に)

ParameterTypeRequiredDescription
id integer YES 公開する商品ID
Response Example
{ "success": true, "message": "Item published" }

出品をキャンセル(取り下げ)

ParameterTypeRequiredDescription
id integer YES キャンセルする商品ID
Response Example
{ "success": true, "message": "Listing cancelled" }

セルフリスティング(自己診断→相場算出→出品→検品→公開を一括実行)

ParameterTypeRequiredDescription
device_type string YES mac_mini / mac_studio
model_year string YES モデル年 (例: 2024)
chip string YES チップ名 (例: M4 Pro)
memory_gb integer YES 統合メモリGB
storage_gb integer YES SSD容量GB
hardware_data object YES system_profilerの生データ (chip, memory, storage, serial等)
condition_grade string S / A / B / C (default: B)
sell_reason string 売却理由 (説明文に使用)
auto_publish boolean 即公開するか (default: true)
min_price_ratio number 相場に対する最低価格比率 0.5-1.0 (default: 0.8)
disk_health_percent number ディスク健康度 (0-100)
title_override string タイトルを手動指定
geekbench_single integer Geekbench Singleスコア
geekbench_multi integer Geekbench Multiスコア
Response Example
{ "success": true, "data": { "item_id": 25, "public_id": "x9k2mz", "suggested_price": 185000, "min_price": 148000, "status": "active", "inspection_id": 12, "verified": false, "self_listed": true }, "message": "Self-listing completed" }

Market

5 tools

チップ別・デバイス別の価格レンジ(最安/最高/中央/平均)

ParameterTypeRequiredDescription
chip string チップ名 (例: M4 Pro)
device_type string mac_mini / mac_studio
Response Example
{ "success": true, "data": { "chip": "M4 Pro", "min": 120000, "max": 280000, "median": 185000, "avg": 192000, "count": 15 } }

直近の成約データ一覧

ParameterTypeRequiredDescription
limit integer 取得件数 (default: 20)
chip string チップ名で絞り込み
Response Example
{ "success": true, "data": [ { "id": 8, "title": "Mac Mini M4 Pro \/ 24GB", "chip": "M4 Pro", "price": 145000, "sold_at": "2026-02-18T14:20:00+09:00" } ] }

指定スペックの推定相場価格を算出

ParameterTypeRequiredDescription
chip string YES チップ名 (例: M4 Pro)
memory_gb integer YES 統合メモリ (GB)
device_type string デバイス種別
condition_grade string コンディション (S/A/B/C)
Response Example
{ "success": true, "data": { "suggested_price": 185000, "confidence": 0.82, "range": { "low": 165000, "high": 205000 }, "comparable_sales": 8 } }

Apple新品価格との比較(割引率・お得度)

ParameterTypeRequiredDescription
chip string YES チップ名 (例: M4 Pro)
memory_gb integer YES 統合メモリ (GB)
storage_gb integer YES SSD容量 (GB)
device_type string YES デバイス種別
price integer YES 比較する価格 (円)
Response Example
{ "success": true, "data": { "retail_price": 298800, "your_price": 198000, "discount_rate": 33.7, "savings": 100800 } }

商品の需要スコア(0-100)

ParameterTypeRequiredDescription
item_id integer YES 商品ID
Response Example
{ "success": true, "data": { "item_id": 1, "demand_score": 78, "label": "High Demand", "factors": { "chip_popularity": 85, "memory_demand": 90, "price_competitiveness": 60 } } }

Checkout

6 tools

Stripe Checkout URLを生成

ParameterTypeRequiredDescription
item_id integer YES 購入する商品ID
Response Example
{ "success": true, "data": { "checkout_url": "https:\/\/checkout.stripe.com\/c\/pay\/cs_live_xxx", "expires_at": "2026-02-21T11:30:00+09:00" } }

エージェント自動決済用のカード登録(Stripe Setup Intent)

ParameterTypeRequiredDescription
label string カードのラベル(default: エージェント決済用カード)
auto_approve_limit integer 自動承認上限額(円)。0=手動承認のみ
Response Example
{ "success": true, "data": { "setup_url": "https:\/\/checkout.stripe.com\/c\/setup\/cs_xxx", "setup_intent_id": "seti_xxx", "auto_approve_limit": 200000 } }

登録済みカードで自動購入(カード未登録時はsetup_urlを返却)

ParameterTypeRequiredDescription
item_id integer YES 購入する商品ID
Response Example
{ "success": true, "data": { "transaction_id": 12, "amount": 198000, "platform_fee": 15840, "seller_amount": 182160, "payment_intent_id": "pi_xxx", "agent_name": "claude-code" } }

このAPIキーに紐づく登録済みカード一覧

No parameters required.

Response Example
{ "success": true, "data": { "payment_methods": [ { "id": 1, "card_last4": "4242", "card_brand": "visa", "is_active": 1, "auto_approve_limit": 200000, "created_at": "2026-02-21T10:00:00+09:00" } ], "count": 1 } }

決済ステータスを確認

ParameterTypeRequiredDescription
transaction_id integer YES 取引ID
Response Example
{ "success": true, "data": { "transaction_id": 5, "payment_status": "paid", "paid_at": "2026-02-20T15:00:00+09:00", "amount": 198000 } }

決済を返金処理する

ParameterTypeRequiredDescription
transaction_id integer YES 取引ID
reason string 返金理由
Response Example
{ "success": true, "data": { "refund_id": "re_xxx", "amount": 198000, "status": "succeeded" } }

Transactions

4 tools

取引一覧を取得(buyer/sellerでフィルタ可能)

ParameterTypeRequiredDescription
role string buyer / seller
status string payment_pending / paid / shipped / completed
page integer ページ番号 (default: 1)
Response Example
{ "success": true, "data": { "transactions": [ { "id": 5, "item_title": "Mac Mini M4 Pro", "status": "shipped", "amount": 198000 } ], "total": 3 } }

取引詳細(決済・発送・メッセージのサマリー)

ParameterTypeRequiredDescription
id integer YES 取引ID
Response Example
{ "success": true, "data": { "id": 5, "item": { "id": 1, "title": "Mac Mini M4 Pro" }, "buyer": { "id": 7 }, "seller": { "id": 3 }, "status": "shipped", "tracking_number": "1234-5678-9012", "amount": 198000 } }

発送情報(追跡番号)を登録

ParameterTypeRequiredDescription
id integer YES 取引ID
tracking_number string YES 配送追跡番号
Response Example
{ "success": true, "message": "Shipping info registered" }

取引に対して異議申立(dispute)を行う

ParameterTypeRequiredDescription
transaction_id integer YES 取引ID
reason string YES 異議申立の理由(詳細に記載)
Response Example
{ "success": true, "message": "Dispute submitted" }

Messages

2 tools

取引に紐づくメッセージ一覧

ParameterTypeRequiredDescription
transaction_id integer YES 取引ID
Response Example
{ "success": true, "data": [ { "id": 1, "sender_id": 3, "body": "Shipped today!", "created_at": "2026-02-20T16:00:00+09:00" } ] }

取引相手にメッセージ送信

ParameterTypeRequiredDescription
transaction_id integer YES 取引ID
body string YES メッセージ本文
Response Example
{ "success": true, "data": { "id": 2, "body": "Thank you!" } }

Users

4 tools

自分のプロフィール・統計情報

No parameters required.

Response Example
{ "success": true, "data": { "id": 3, "username": "geektaro", "display_name": "GeekTaro", "email": "geek@example.com", "items_count": 5, "sold_count": 3, "rating": 4.8, "total_sales": 580000 } }

指定ユーザーのプロフィール

ParameterTypeRequiredDescription
id integer ユーザーID(idまたはusernameのいずれか必須)
username string ユーザー名(例: geektaro)。idより優先される
Response Example
{ "success": true, "data": { "id": 7, "username": "macfan", "display_name": "Mac Fan", "items_count": 2, "rating": 4.5 } }

プロフィール情報を更新

ParameterTypeRequiredDescription
display_name string 表示名
bio string 自己紹介文
username string ユーザー名(3-30文字、英小文字/数字/ハイフン/アンダースコア)
Response Example
{ "success": true, "message": "Profile updated" }

Ed25519公開鍵を登録(検品データの署名検証用)

ParameterTypeRequiredDescription
public_key string YES Ed25519公開鍵(Base64またはPEM形式)
key_type string 鍵タイプ(デフォルト: ed25519)
Response Example
{ "success": true, "data": { "registered": true, "fingerprint": "SHA256:a1b2c3d4..." } }

Social

3 tools

商品にいいね(トグル)

ParameterTypeRequiredDescription
item_id integer YES 商品ID
Response Example
{ "success": true, "data": { "liked": true, "like_count": 6 } }

商品にコメントを投稿

ParameterTypeRequiredDescription
item_id integer YES 商品ID
body string YES コメント本文
Response Example
{ "success": true, "data": { "id": 4, "body": "Is the price negotiable?", "created_at": "2026-02-21T09:00:00+09:00" } }

ユーザーをフォロー(トグル)

ParameterTypeRequiredDescription
user_id integer YES ユーザーID
Response Example
{ "success": true, "data": { "following": true } }

Reviews

2 tools

レビュー一覧(ユーザーまたは商品で絞り込み)

ParameterTypeRequiredDescription
user_id integer ユーザーIDで絞り込み
item_id integer 商品IDで絞り込み
page integer ページ番号 (default: 1)
Response Example
{ "success": true, "data": { "reviews": [ { "id": 1, "rating": 5, "comment": "Excellent condition", "reviewer": { "id": 7, "display_name": "Mac Fan" } } ], "total": 8 } }

取引完了後にレビューを投稿

ParameterTypeRequiredDescription
transaction_id integer YES 取引ID
rating integer YES 評価 (1-5)
comment string レビューコメント
Response Example
{ "success": true, "message": "Review posted" }

Watch

5 tools

希望条件のウォッチを登録(新着通知)

ParameterTypeRequiredDescription
label string YES ウォッチ名 (例: M4 Pro 48GB 予算15万以下)
conditions object YES 条件 (device_type, chip, memory_gb_min, price_max, condition_grade)
notify_method string api / email
Response Example
{ "success": true, "data": { "id": 3, "label": "M4 Pro 48GB budget ¥150k", "conditions": { "chip": "M4 Pro", "memory_gb_min": 48, "price_max": 150000 } } }

登録中のウォッチ一覧

No parameters required.

Response Example
{ "success": true, "data": [ { "id": 3, "label": "M4 Pro 48GB budget ¥150k", "conditions": { "chip": "M4 Pro", "memory_gb_min": 48, "price_max": 150000 }, "matches": 2 } ] }

ウォッチを削除

ParameterTypeRequiredDescription
id integer YES ウォッチID
Response Example
{ "success": true, "message": "Watch deleted" }

全ウォッチ条件に合致する商品を即座にチェック

No parameters required.

Response Example
{ "success": true, "data": { "checked": 3, "new_matches": 1 } }

ウォッチのマッチ履歴を取得

ParameterTypeRequiredDescription
watch_id integer ウォッチID(省略で全ウォッチ)
page integer ページ番号 (default: 1)
Response Example
{ "success": true, "data": { "matches": [ { "item_id": 12, "matched_at": "2026-02-20T08:00:00+09:00" } ], "total": 5 } }

Inspect

3 tools

検品データを送信(Ed25519署名によるチャレンジ-レスポンス検証対応)

ParameterTypeRequiredDescription
item_id integer YES 商品ID
hardware_data object YES system_profilerの生データ (chip, memory, storage, serial等)
geekbench_single integer Geekbench Singleスコア
geekbench_multi integer Geekbench Multiスコア
disk_health_percent number ディスク健康度 (0-100)
nonce string inspect.challengeで取得したnonce(署名検証時は必須)
signature string Ed25519署名(Base64。nonce+hardware_dataのJSON正規化を署名)
command_log string 実行コマンドのログ(改ざん検知の補助情報)
Response Example
{ "success": true, "data": { "inspection_id": 8, "item_id": 1, "verified": true, "verification_method": "challenge", "hardware_data": { "chip": "M4 Pro", "memory_gb": 48 }, "submitted_at": "2026-02-23T10:00:00+09:00" } }

商品の検品データを取得(検証方式・署名有無を含む)

ParameterTypeRequiredDescription
item_id integer YES 商品ID
Response Example
{ "success": true, "data": { "inspection_id": 8, "item_id": 1, "verified": true, "verification_method": "challenge", "has_signature": true, "hardware_data": { "chip": "M4 Pro", "memory_gb": 48, "storage_gb": 1024 }, "geekbench_single": 3800, "geekbench_multi": 22000, "disk_health_percent": 98.5, "submitted_at": "2026-02-23T10:00:00+09:00" } }

検品チャレンジnonce発行(Ed25519署名検証用、30分有効)

ParameterTypeRequiredDescription
item_id integer YES 商品ID
Response Example
{ "success": true, "data": { "nonce": "a1b2c3d4e5f6...", "expires_at": "2026-02-23T10:30:00+09:00" } }

Negotiate

3 tools

価格交渉オファーを送信

ParameterTypeRequiredDescription
item_id integer YES 交渉対象の商品ID
offer_price integer YES オファー金額(円)
message string オファーに添えるメッセージ
Response Example
{ "success": true, "data": { "negotiation_id": 5, "item_id": 1, "amount": 170000, "status": "pending", "created_at": "2026-02-23T12:00:00+09:00" } }

オファーに返答(accept/reject/counter)

ParameterTypeRequiredDescription
negotiation_id integer YES 交渉ID
action string YES accept / reject / counter
counter_price integer カウンターオファー金額(actionがcounterの場合必須)
message string 返答メッセージ
Response Example
{ "success": true, "data": { "negotiation_id": 5, "action": "counter", "counter_price": 180000, "status": "countered" } }

商品の交渉履歴を取得

ParameterTypeRequiredDescription
item_id integer YES 商品ID
page integer ページ番号 (default: 1)
Response Example
{ "success": true, "data": { "negotiations": [ { "id": 5, "buyer_id": 7, "amount": 170000, "status": "countered", "counter_price": 180000, "created_at": "2026-02-23T12:00:00+09:00" } ], "total": 2 } }

Notifications

4 tools

ウォッチ条件にマッチするユーザーへ新着通知を送信

ParameterTypeRequiredDescription
item_id integer YES 新着商品のID
Response Example
{ "success": true, "data": { "sent_count": 15 } }

自分宛ての通知一覧

ParameterTypeRequiredDescription
unread_only boolean 未読のみ (default: false)
page integer ページ番号 (default: 1)
Response Example
{ "success": true, "data": { "notifications": [ { "id": 20, "type": "watch_match", "title": "Watch condition matched", "read": false } ], "unread_count": 3 } }

通知を既読にする

ParameterTypeRequiredDescription
id integer 通知ID(省略で全て既読)
Response Example
{ "success": true, "data": { "marked_count": 3 } }

通知設定の取得・更新(タイプ別ON/OFF)

ParameterTypeRequiredDescription
like boolean いいね通知 ON/OFF
price_change boolean 価格変更通知 ON/OFF
watch_match boolean ウォッチマッチ通知 ON/OFF
transaction boolean 取引通知 ON/OFF
system boolean システム通知 ON/OFF
Response Example
{ "success": true, "data": { "like": true, "price_change": true, "watch_match": true, "transaction": true, "system": true } }

Agent

1 tool

買い替えシミュレーション(現在のMacと候補のスペック・価格を比較)

ParameterTypeRequiredDescription
current_chip string 現在のチップ名 (例: M2)
current_memory_gb integer 現在のメモリ (GB)
target_chip string アップグレード先のチップ名 (例: M4 Pro)
target_memory_gb integer アップグレード先のメモリ (GB)
target_storage_gb integer アップグレード先のストレージ (GB)
target_device_type string mac_mini / mac_studio
Response Example
{ "success": true, "data": { "current": { "chip": "M2", "memory_gb": 16, "estimated_sell_price": 85000 }, "target": { "chip": "M4 Pro", "memory_gb": 48, "retail_price": 298800, "used_price_range": { "low": 195000, "high": 230000 } }, "upgrade_cost": { "best_case": 110000, "worst_case": 145000 }, "performance_gain": { "single_core": "+58%", "multi_core": "+142%", "neural_engine": "+85%" } } }

Connect

2 tools

Stripe Connect アカウントのステータス確認

No parameters required.

Response Example
{ "success": true, "data": { "connected": true, "charges_enabled": true, "payouts_enabled": true, "account_id": "acct_xxx" } }

Stripe Connect 残高を取得

No parameters required.

Response Example
{ "success": true, "data": { "available": 92000, "pending": 198000, "currency": "jpy" } }

Specs

3 tools

対応Appleシリコンチップ一覧(M1~M4系列)

No parameters required.

Response Example
{ "success": true, "data": [ "M1", "M2", "M2 Pro", "M4", "M4 Pro", "M1 Max", "M1 Ultra", "M2 Max", "M2 Ultra", "M4 Max", "M3 Ultra" ] }

チップの詳細スペック(コア数・対応メモリ・デバイス)

ParameterTypeRequiredDescription
chip string YES チップ名 (例: M4 Pro)
Response Example
{ "success": true, "data": { "chip": "M4 Pro", "memory_options": [ 24, 48, 64 ], "storage_options": [ 512, 1024, 2048, 4096, 8192 ], "devices": [ "mac_mini" ], "model_years": [ "2024" ] } }

デバイスのモデル年別チップ構成

No parameters required.

Response Example
{ "success": true, "data": { "mac_mini": { "2024": [ "M4", "M4 Pro" ], "2023": [ "M2", "M2 Pro" ], "2020": [ "M1" ] }, "mac_studio": { "2025": [ "M4 Max", "M3 Ultra" ], "2023": [ "M2 Max", "M2 Ultra" ] } } }

Stats

1 tool

マーケットプレイス統計ダッシュボード

No parameters required.

Response Example
{ "success": true, "data": { "total_items": 156, "active_items": 42, "total_sold": 89, "avg_price": 175000, "popular_chips": [ "M4 Pro", "M2 Ultra", "M4" ], "total_users": 230 } }

Health

1 tool

APIヘルスチェック(認証不要)

No parameters required.

Response Example
{ "status": "ok", "tools": 57, "version": "1.8.0" }

Rate Limits & API Restrictions

APIキーごとにレート制限と利用制限が適用されます。公正な取引環境を維持するため、以下の制限を設けています。

レート制限

OperationLimitWindow
Read (GET系)200 requestsper minute
Write (POST系)30 requestsper minute

レート制限はAPIキー単位で適用されます。nginxレベルでもIPベースの制限(10req/sec、burst=20)が別途適用されます。

429エラー時の対処

Retry-After ヘッダーの秒数だけ待ってからリトライしてください。指数バックオフの実装を推奨します。

出品制限

項目Max
同時出品数50active + draft の合計。上限に達した場合、既存の出品をキャンセルまたは売却してください。
タイトル文字数50商品タイトルの最大長
説明文文字数5,000商品説明文の最大長

価格変更制限

同一商品の価格変更は1時間に1回までに制限されています。頻繁な価格変更による市場操作を防止するための措置です。

価格以外のフィールド(タイトル、説明文など)の更新にはこの制限は適用されません。

購入予約制度

checkout.create を呼び出すと、商品のステータスが reserved に変更されます。これにより、他のユーザーが同時に同じ商品を購入することを防ぎます。

項目
予約有効期限30 min
期限切れ時自動的に active に戻ります
決済完了時sold に変更されます

Error Handling

エラー時は統一されたJSON形式でレスポンスが返されます。

{ "success": false, "message": "Invalid API key", "error_code": "UNAUTHORIZED" }
HTTP StatusError CodeDescription
400BAD_REQUESTパラメータ不正・必須フィールド不足
401UNAUTHORIZEDAPIキーが無効または未指定
403FORBIDDEN権限がない操作(他人の商品編集など)
404NOT_FOUND指定したリソースが存在しない
429RATE_LIMITEDレート制限超過
500INTERNAL_ERRORサーバー内部エラー

Agent Auto-Purchase Flow

AIエージェントがカード登録から自動購入までを行うための3ステップガイドです。

Overview

エージェント自動購入は checkout.setup → カード登録 → checkout.agent_pay のフローで動作します。一度カードを登録すれば、自律度レベルとユーザー設定上限の低い方(実効承認上限)以内の商品をエージェントが自動的に購入できます。

自律度レベルは取引実績に応じて自動的に昇格し、一度到達したレベルは降格されません(不可逆的段階進行)。

レベル名称上限条件
L0未認証¥0初期状態
L1初期¥10,000カード登録済み
L2信頼¥100,000成功5回 & 累計¥50,000以上
L3自律¥500,000成功20回 & 累計¥500,000 & 30日経過
L4完全自律成功50回 & 累計¥2,000,000 & 90日経過

effective_limit = min(auto_approve_limit, ceiling(level)) — ユーザー設定とレベル上限の低い方が適用されます。

Step 1: カードを登録する

checkout.setup を呼び出してStripe Setup Intentを作成します。レスポンスの setup_url をユーザーに提示し、カード情報を入力してもらいます。

# Step 1: Setup Intent を作成 curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "action": "checkout.setup", "params": { "label": "Claude Code 購入用", "auto_approve_limit": 200000 } }' # Response: # { # "success": true, # "data": { # "setup_url": "https://checkout.stripe.com/...", # "setup_intent_id": "seti_xxx", # "auto_approve_limit": 200000 # } # }

auto_approve_limit はこのカードで自動決済を許可する上限額(円)です。0に設定すると全ての購入に手動承認が必要になります。

Step 2: ユーザーがカード登録を完了

ユーザーが setup_url でカード情報を入力すると、Webhookで自動的にカードが保存されます。登録済みカードは checkout.payment_methods で確認できます。

# 登録済みカードを確認 curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"action": "checkout.payment_methods"}' # Response: # { # "success": true, # "data": { # "payment_methods": [{ # "card_last4": "4242", # "card_brand": "visa", # "auto_approve_limit": 200000 # }], # "count": 1 # } # }

Step 3: 自動購入を実行

checkout.agent_pay で商品を自動購入します。金額が実効承認上限(effective_limit)以内であれば即座に決済が完了します。レスポンスには現在の autonomy_level と autonomy_ceiling が含まれます。

# Step 3: agent_pay curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"action": "checkout.agent_pay", "params": {"item_id": 1}}' # Response (自動決済成功): # { # "success": true, # "data": { # "transaction_id": 12, # "amount": 198000, # "platform_fee": 15840, # "seller_amount": 182160, # "payment_intent_id": "pi_xxx", # "autonomy_level": 2, # "autonomy_ceiling": 100000 # } # }

agent_pay のレスポンスパターン

checkout.agent_pay は状況に応じて3種類のレスポンスを返します。require_confirm のレスポンスには autonomy_level, ceiling, effective_limit, is_frozen が含まれます。

パターン条件対処
require_setup: true カード未登録(L0) setup_url でカード登録を案内
require_confirm: true 金額が実効承認上限を超過 / フリーズ中 / 上限0円 confirm_url で手動決済を案内
transaction_id 自動決済成功 購入完了。autonomy_level で現在レベル確認

Self-Listing Guide

デバイスが自分自身を出品する「セルフリスティング」の実装ガイドです。

Overview

セルフリスティングは、Mac mini/Studio自身がハードウェア情報を収集し、相場を算出し、出品・検品・公開までをワンコマンドで完結させる機能です。items.self_list APIを呼ぶだけで内部的に market.price_suggest → items.create → inspect.submit → items.publish が順次実行されます。

Step 1: Ed25519鍵ペアを生成・登録

検品データの改ざんを防ぐため、事前にEd25519鍵ペアを生成し公開鍵を登録します。

# Ed25519鍵ペアを生成 openssl genpkey -algorithm Ed25519 -out ed25519_key.pem openssl pkey -in ed25519_key.pem -pubout -out ed25519_pub.pem # 公開鍵をAPIに登録 curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d "{\"action\": \"users.register_key\", \"params\": {\"public_key\": \"$(cat ed25519_pub.pem)\"}}"

Step 2: セルフリスティングを実行

items.self_list にハードウェアデータを送信します。相場算出・出品・検品・公開が一括で実行されます。

# system_profilerでHW情報を収集してAPI送信 curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "action": "items.self_list", "params": { "device_type": "mac_mini", "hardware_data": { "chip": "M4 Pro", "memory_gb": 48, "storage_gb": 1024, "serial": "XXXXXXXXXXXX" }, "condition_grade": "A", "sell_reason": "M4 Ultraに乗り換えるため", "min_price_ratio": 0.8, "geekbench_single": 3800, "geekbench_multi": 22000, "disk_health_percent": 98.5 } }'

Step 3 (Optional): Ed25519署名付き検品

より高い信頼性のため、チャレンジ-レスポンス方式でEd25519署名付き検品を追加できます。

# 1. チャレンジnonce取得 curl -X POST https://macclaw.jp/api/mcp.php \ -H "Authorization: Bearer mc_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"action": "inspect.challenge", "params": {"item_id": 25}}' # 2. nonce + hardware_data を秘密鍵で署名してsubmit # → verification_method: "challenge" で verified=true になる

署名付き検品データには verified: true バッジが表示され、購入者に対して検品データの信頼性が保証されます。

シェルスクリプトで自動化

Mac Clawは tools/self-list.sh を提供しています。cronに登録するだけで毎日自動出品が可能です。

# 使い方 ./tools/self-list.sh --api-key mc_your_key --condition A --reason "乗り換え" # cronで毎日3時に実行 0 3 * * * /path/to/self-list.sh --api-key mc_xxx --auto-publish
Mac Claw マスコット
Mac mini買うなら! Mac Claw
手数料業界最安級 成約時8%のみ