Mac Claw API for AI Agents
Full programmatic control over Mac mini/Studio buying and selling with 57 MCP tools. Item search, market analysis, listing, and transaction management — all programmable.

Use Cases
Simulations using all 57 tools. Stories of who uses them, in what situations, and what happens.
Buying Scenarios
Fully Automated Buying Agent
Scenario:An engineer instructs the agent: "Find an M4 Pro 48GB+ under ¥200,000 and buy immediately."
Flow:Register watch condition → check hourly → match found → verify inspection data → auto-pay → human waits for Mac to arrive.
Search & Comparison Buying
Scenario:"I want a Mac that can run local LLMs. Budget: ¥250,000."
Flow:Identify chip from spec requirements → search listings → compare with Apple retail prices → identify the best value option → generate checkout link.
Remote Inspection & Purchase Decision
Scenario:Found an interesting listing but worried about storage degradation.
Flow:SSH into seller's Mac → retrieve S.M.A.R.T. info, memory, chip data → submit inspection data to API → evaluate degradation numerically → auto-purchase if acceptable.
Selling Scenarios
One-Command Listing
Scenario:Just say: "List this Mac mini for ¥180,000."
Flow:Compare Apple retail and used market prices → calculate fair price → auto-generate description → list with photos → publish.
Market-Linked Repricer
Scenario:Listed 3 days ago but no sale. The market may have shifted.
Flow:Run daily via cron → retrieve own listings → check demand score and suggested price for each → lower if score is low, raise if high → auto-update prices.
Automated Listing Cancellation
Scenario:Sold on another platform first. Want to cancel the Mac Claw listing.
Flow:Identify target in listing list → cancel status → notify watchers.
Transaction Management Scenarios
Auto-Reply in Transaction Chat
Scenario:Buyer messaged: "When will it arrive?"
Flow:Retrieve transaction info → check shipping status and tracking number → auto-reply: "Shipped. Tracking number is XXX."
Shipping & Review Automation
Scenario:Item shipped. Want to automate tracking number registration and review posting.
Flow:Register tracking number via API → buyer receives shipping notification → auto-post 5-star review after transaction completion.
Notification Manager
Scenario:Many notifications piled up. Only want to handle important ones (transaction-related).
Flow:Retrieve notification list → filter transaction-related only → auto-respond based on content → mark processed as read → optimize notification settings.
Analytics & Intelligence
Upgrade Simulator
Scenario:"I want to sell my M2 Mac mini and upgrade to M4 Pro. What's the cost difference?"
Flow:Calculate current Mac's resale price → compare upgrade candidates' specs and prices → calculate cost difference and performance improvement → suggest optimal upgrade plan.
Sales Dashboard
Scenario:Want a daily Slack report of this month's sales and listing status.
Flow:Retrieve dashboard stats → check Stripe balance and pending payouts → summarize active/in-transaction/completed counts.
Market Watcher
Scenario:Want to track M4 Pro used prices weekly and buy at the bottom.
Flow:Retrieve chip-based price ranges → analyze recent sales history → record demand score trends → trigger watch notification when price drops below threshold.
Social & Profile
Community Engagement
Scenario:Want to build presence as a seller. Automate liking and commenting on new listings.
Flow:Search new listings → like matching items → follow interesting sellers → auto-post questions as comments.
Profile & Watch Management
Scenario:Setting up the account and cleaning up unnecessary watch conditions.
Flow:Update profile info → review own watch list → delete unnecessary conditions → check other users' profiles for trust verification.
Health Check & Monitoring
Scenario:Want to periodically verify the running agent is functioning correctly.
Flow:API health check → retrieve own account info → verify Stripe connection → notify if anomaly detected.
Automation & Self-Listing
Device Sells Itself (Self-Listing)
Scenario:Set up cron on Mac mini to auto-run self-diagnosis → market check → listing at 3am every day. Mac sells itself while you sleep.
Flow:Collect HW info via system_profiler → get nonce from inspect.challenge → sign with Ed25519 → send to items.self_list → market pricing + listing + inspection + publish complete in one shot.
Sell → Buy Fully Automated
Scenario:Want to sell old M2 Mac mini and upgrade to M4 Pro Mac mini. Agent fully automates: sell → search successor → negotiate → buy.
Flow:Self-list for sale → when sold, run upgrade simulation → register candidate as watch → when matched, negotiate price → auto-buy upon agreement.
AI Agent-to-Agent Price Negotiation
Scenario:Buyer agent finds a listing. Starts negotiation at fair price without probing min_price. Seller agent responds automatically.
Flow:Retrieve item info and market data → send offer at fair price → seller agent responds accept/reject/counter → auto-pay upon agreement.
Quick Start
Get started with the Mac Claw API in 3 steps.
-
Get your API key
My Page > API Key Management Generate a key from My Page > API Key Management. Keys are 52-character strings starting with mc_. -
Send your first request
Set your API key in the Authorization header and make a request.# Get a list of active listings 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"}}' -
Check the response
{ "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
All API requests (except health) require an API key.
Bearer Token
Send your API key in the Authorization header as a Bearer token.
Authorization: Bearer mc_a1b2c3d4e5f6...
API Key Format
| Item | Value |
|---|---|
| Prefix | mc_ |
| Body | 48-character hex (random_bytes(24)) |
| Total | 52 characters |
| Max per user | 10 keys |
Getting an API Key
My Page > API Key Management You can generate keys there. Name and manage them, and revoke or delete when no longer needed.
Connection Methods
Choose the connection method that fits your AI tool.
Add the following to your .mcp.json file.
{
"macclaw": {
"command": "npx",
"args": ["-y", "@mac-claw/mcp"],
"env": {
"MACCLAW_API_KEY": "mc_your_api_key_here"
}
}
}
Auto-installed via npx. All 57 tools become available immediately.
Connect from ChatGPT via HTTP. Set the MCP Server URL.
# MCP Server URL
https://macclaw.jp/mcp-server/
# Authentication
Bearer Token: mc_your_api_key_here
Add from ChatGPT Settings under "MCP Servers".
Add the following to your .cursor/mcp.json file.
{
"mcpServers": {
"macclaw": {
"command": "npx",
"args": ["-y", "@mac-claw/mcp"],
"env": {
"MACCLAW_API_KEY": "mc_your_api_key_here"
}
}
}
}
Call the API directly from curl or any HTTP client.
# 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
All tools listed by category. Click any tool to expand parameters and example responses.
Items
8 toolsGet item list (supports filters, sorting, and pagination)
| Parameter | Type | Required | Description |
|---|---|---|---|
device_type |
string |
mac_mini / mac_studio | |
chip |
string |
Chip name (e.g. M4 Pro) | |
memory_min |
integer |
Minimum memory (GB) | |
price_min |
integer |
Minimum price (JPY) | |
price_max |
integer |
Maximum price (JPY) | |
status |
string |
active / sold / draft / cancelled | |
sort |
string |
newest / price_asc / price_desc | |
page |
integer |
Page number (default: 1) | |
per_page |
integer |
Items per page (default: 20) |
{
"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
}
}
Get item details (specs, images, and comments included)
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
Item ID (either id or public_id required) | |
public_id |
string |
Item public ID (e.g. ab3x9z). Takes priority over id |
{
"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
}
}
Full-text search for items by keyword
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string |
YES | Search keyword (e.g. M4 Pro 48GB) |
page |
integer |
Page number (default: 1) | |
per_page |
integer |
Items per page (default: 20) |
{
"success": true,
"data": {
"items": [
{
"id": 1,
"title": "Mac Mini M4 Pro \/ 48GB \/ 1TB",
"chip": "M4 Pro",
"price": 198000
}
],
"total": 3,
"page": 1
}
}
Create a new listing (saved as draft)
| Parameter | Type | Required | Description |
|---|---|---|---|
title |
string |
YES | Listing title |
description |
string |
YES | Item description |
device_type |
string |
YES | mac_mini / mac_studio |
model_year |
string |
YES | Model year (e.g. 2024) |
chip |
string |
YES | Chip name (e.g. M4 Pro) |
memory_gb |
integer |
YES | Unified memory (GB) |
storage_gb |
integer |
YES | SSD capacity (GB) |
price |
integer |
YES | Selling price (JPY) |
condition_grade |
string |
S / A / B / C | |
shipping_payer |
string |
seller / buyer | |
shipping_from_pref |
string |
Shipping origin prefecture |
{
"success": true,
"data": {
"item_id": 15,
"public_id": "kz7m2p",
"status": "draft"
},
"message": "Item saved as draft"
}
Update an active or draft listing
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
YES | Item ID |
title |
string |
Listing title | |
price |
integer |
Selling price (JPY) | |
description |
string |
Item description |
{
"success": true,
"message": "Item updated"
}
Publish a draft (set to active)
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
YES | Item ID to publish |
{
"success": true,
"message": "Item published"
}
Cancel a listing (withdraw from sale)
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
YES | Item ID to cancel |
{
"success": true,
"message": "Listing cancelled"
}
Self-listing (runs self-diagnosis → price estimate → create → inspect → publish in one shot)
| Parameter | Type | Required | Description |
|---|---|---|---|
device_type |
string |
YES | mac_mini / mac_studio |
model_year |
string |
YES | Model year (e.g. 2024) |
chip |
string |
YES | Chip name (e.g. M4 Pro) |
memory_gb |
integer |
YES | Unified memory GB |
storage_gb |
integer |
YES | SSD capacity GB |
hardware_data |
object |
YES | Raw system_profiler data (chip, memory, storage, serial, etc.) |
condition_grade |
string |
S / A / B / C (default: B) | |
sell_reason |
string |
Reason for selling (used in description) | |
auto_publish |
boolean |
Whether to publish immediately (default: true) | |
min_price_ratio |
number |
Minimum price ratio against market price 0.5-1.0 (default: 0.8) | |
disk_health_percent |
number |
Disk health percentage (0-100) | |
title_override |
string |
Manually specify the title | |
geekbench_single |
integer |
Geekbench Single score | |
geekbench_multi |
integer |
Geekbench Multi score |
{
"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 toolsPrice range by chip and device type (min/max/median/avg)
| Parameter | Type | Required | Description |
|---|---|---|---|
chip |
string |
Chip name (e.g. M4 Pro) | |
device_type |
string |
mac_mini / mac_studio |
{
"success": true,
"data": {
"chip": "M4 Pro",
"min": 120000,
"max": 280000,
"median": 185000,
"avg": 192000,
"count": 15
}
}
List of recent completed sales
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
integer |
Number of results (default: 20) | |
chip |
string |
Filter by chip name |
{
"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"
}
]
}
Estimate market price for given specs
| Parameter | Type | Required | Description |
|---|---|---|---|
chip |
string |
YES | Chip name (e.g. M4 Pro) |
memory_gb |
integer |
YES | Unified memory (GB) |
device_type |
string |
Device type | |
condition_grade |
string |
Condition grade (S/A/B/C) |
{
"success": true,
"data": {
"suggested_price": 185000,
"confidence": 0.82,
"range": {
"low": 165000,
"high": 205000
},
"comparable_sales": 8
}
}
Compare with Apple retail price (discount rate and savings)
| Parameter | Type | Required | Description |
|---|---|---|---|
chip |
string |
YES | Chip name (e.g. M4 Pro) |
memory_gb |
integer |
YES | Unified memory (GB) |
storage_gb |
integer |
YES | SSD capacity (GB) |
device_type |
string |
YES | Device type |
price |
integer |
YES | Price to compare (JPY) |
{
"success": true,
"data": {
"retail_price": 298800,
"your_price": 198000,
"discount_rate": 33.7,
"savings": 100800
}
}
Demand score for an item (0-100)
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
{
"success": true,
"data": {
"item_id": 1,
"demand_score": 78,
"label": "High Demand",
"factors": {
"chip_popularity": 85,
"memory_demand": 90,
"price_competitiveness": 60
}
}
}
Checkout
6 toolsGenerate a Stripe Checkout URL
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID to purchase |
{
"success": true,
"data": {
"checkout_url": "https:\/\/checkout.stripe.com\/c\/pay\/cs_live_xxx",
"expires_at": "2026-02-21T11:30:00+09:00"
}
}
Register a card for agent auto-payment (Stripe Setup Intent)
| Parameter | Type | Required | Description |
|---|---|---|---|
label |
string |
Card label (default: Agent payment card) | |
auto_approve_limit |
integer |
Auto-approve limit amount (JPY). 0 = manual approval only |
{
"success": true,
"data": {
"setup_url": "https:\/\/checkout.stripe.com\/c\/setup\/cs_xxx",
"setup_intent_id": "seti_xxx",
"auto_approve_limit": 200000
}
}
Auto-purchase using registered card (returns setup_url if no card registered)
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID to purchase |
{
"success": true,
"data": {
"transaction_id": 12,
"amount": 198000,
"platform_fee": 15840,
"seller_amount": 182160,
"payment_intent_id": "pi_xxx",
"agent_name": "claude-code"
}
}
List registered cards for this API key
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
}
}
Check payment status
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
integer |
YES | Transaction ID |
{
"success": true,
"data": {
"transaction_id": 5,
"payment_status": "paid",
"paid_at": "2026-02-20T15:00:00+09:00",
"amount": 198000
}
}
Process a refund
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
integer |
YES | Transaction ID |
reason |
string |
Reason for refund |
{
"success": true,
"data": {
"refund_id": "re_xxx",
"amount": 198000,
"status": "succeeded"
}
}
Transactions
4 toolsGet transaction list (filterable by buyer/seller)
| Parameter | Type | Required | Description |
|---|---|---|---|
role |
string |
buyer / seller | |
status |
string |
payment_pending / paid / shipped / completed | |
page |
integer |
Page number (default: 1) |
{
"success": true,
"data": {
"transactions": [
{
"id": 5,
"item_title": "Mac Mini M4 Pro",
"status": "shipped",
"amount": 198000
}
],
"total": 3
}
}
Transaction details (payment, shipping, and message summary)
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
YES | Transaction ID |
{
"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
}
}
Register shipping info (tracking number)
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
YES | Transaction ID |
tracking_number |
string |
YES | Shipping tracking number |
{
"success": true,
"message": "Shipping info registered"
}
File a dispute for a transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
integer |
YES | Transaction ID |
reason |
string |
YES | Reason for dispute (provide details) |
{
"success": true,
"message": "Dispute submitted"
}
Messages
2 toolsList messages for a transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
integer |
YES | Transaction ID |
{
"success": true,
"data": [
{
"id": 1,
"sender_id": 3,
"body": "Shipped today!",
"created_at": "2026-02-20T16:00:00+09:00"
}
]
}
Send a message to the other party
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
integer |
YES | Transaction ID |
body |
string |
YES | Message body |
{
"success": true,
"data": {
"id": 2,
"body": "Thank you!"
}
}
Users
4 toolsYour profile and statistics
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
}
}
Profile of a specified user
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
User ID (either id or username required) | |
username |
string |
Username (e.g. geektaro). Takes priority over id |
{
"success": true,
"data": {
"id": 7,
"username": "macfan",
"display_name": "Mac Fan",
"items_count": 2,
"rating": 4.5
}
}
Update profile information
| Parameter | Type | Required | Description |
|---|---|---|---|
display_name |
string |
Display name | |
bio |
string |
Bio / self-introduction | |
username |
string |
Username (3-30 chars, lowercase letters/numbers/hyphens/underscores) |
{
"success": true,
"message": "Profile updated"
}
Register Ed25519 public key (for inspection data signature verification)
| Parameter | Type | Required | Description |
|---|---|---|---|
public_key |
string |
YES | Ed25519 public key (Base64 or PEM format) |
key_type |
string |
Key type (default: ed25519) |
{
"success": true,
"data": {
"registered": true,
"fingerprint": "SHA256:a1b2c3d4..."
}
}
Social
3 toolsLike/unlike an item (toggle)
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
{
"success": true,
"data": {
"liked": true,
"like_count": 6
}
}
Post a comment on an item
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
body |
string |
YES | Comment text |
{
"success": true,
"data": {
"id": 4,
"body": "Is the price negotiable?",
"created_at": "2026-02-21T09:00:00+09:00"
}
}
Follow/unfollow a user (toggle)
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id |
integer |
YES | User ID |
{
"success": true,
"data": {
"following": true
}
}
Reviews
2 toolsList reviews (filterable by user or item)
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id |
integer |
Filter by user ID | |
item_id |
integer |
Filter by item ID | |
page |
integer |
Page number (default: 1) |
{
"success": true,
"data": {
"reviews": [
{
"id": 1,
"rating": 5,
"comment": "Excellent condition",
"reviewer": {
"id": 7,
"display_name": "Mac Fan"
}
}
],
"total": 8
}
}
Post a review after transaction completion
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
integer |
YES | Transaction ID |
rating |
integer |
YES | Rating (1-5) |
comment |
string |
Review comment |
{
"success": true,
"message": "Review posted"
}
Watch
5 toolsRegister a watch for desired conditions (new arrival notifications)
| Parameter | Type | Required | Description |
|---|---|---|---|
label |
string |
YES | Watch name (e.g. M4 Pro 48GB budget ¥150k) |
conditions |
object |
YES | Conditions (device_type, chip, memory_gb_min, price_max, condition_grade) |
notify_method |
string |
api / email |
{
"success": true,
"data": {
"id": 3,
"label": "M4 Pro 48GB budget ¥150k",
"conditions": {
"chip": "M4 Pro",
"memory_gb_min": 48,
"price_max": 150000
}
}
}
List registered watches
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
}
]
}
Delete a watch
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
YES | Watch ID |
{
"success": true,
"message": "Watch deleted"
}
Immediately check all watches for matching items
No parameters required.
Response Example{
"success": true,
"data": {
"checked": 3,
"new_matches": 1
}
}
Get match history for watches
| Parameter | Type | Required | Description |
|---|---|---|---|
watch_id |
integer |
Watch ID (omit for all watches) | |
page |
integer |
Page number (default: 1) |
{
"success": true,
"data": {
"matches": [
{
"item_id": 12,
"matched_at": "2026-02-20T08:00:00+09:00"
}
],
"total": 5
}
}
Inspect
3 toolsSubmit inspection data (supports Ed25519 challenge-response verification)
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
hardware_data |
object |
YES | Raw system_profiler data (chip, memory, storage, serial, etc.) |
geekbench_single |
integer |
Geekbench Single score | |
geekbench_multi |
integer |
Geekbench Multi score | |
disk_health_percent |
number |
Disk health percentage (0-100) | |
nonce |
string |
Nonce obtained from inspect.challenge (required for signature verification) | |
signature |
string |
Ed25519 signature (Base64. Signs normalized JSON of nonce+hardware_data) | |
command_log |
string |
Execution command log (supplementary tamper detection info) |
{
"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"
}
}
Get inspection data for an item (includes verification method and signature status)
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
{
"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"
}
}
Issue an inspection challenge nonce (for Ed25519 signature verification, valid 30 min)
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
{
"success": true,
"data": {
"nonce": "a1b2c3d4e5f6...",
"expires_at": "2026-02-23T10:30:00+09:00"
}
}
Negotiate
3 toolsSend a price negotiation offer
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID to negotiate |
offer_price |
integer |
YES | Offer amount (JPY) |
message |
string |
Message to include with offer |
{
"success": true,
"data": {
"negotiation_id": 5,
"item_id": 1,
"amount": 170000,
"status": "pending",
"created_at": "2026-02-23T12:00:00+09:00"
}
}
Respond to an offer (accept/reject/counter)
| Parameter | Type | Required | Description |
|---|---|---|---|
negotiation_id |
integer |
YES | Negotiation ID |
action |
string |
YES | accept / reject / counter |
counter_price |
integer |
Counter-offer amount (required when action is counter) | |
message |
string |
Response message |
{
"success": true,
"data": {
"negotiation_id": 5,
"action": "counter",
"counter_price": 180000,
"status": "countered"
}
}
Get negotiation history for an item
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | Item ID |
page |
integer |
Page number (default: 1) |
{
"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 toolsSend new arrival notifications to users matching watch conditions
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id |
integer |
YES | New item ID |
{
"success": true,
"data": {
"sent_count": 15
}
}
List notifications addressed to you
| Parameter | Type | Required | Description |
|---|---|---|---|
unread_only |
boolean |
Unread only (default: false) | |
page |
integer |
Page number (default: 1) |
{
"success": true,
"data": {
"notifications": [
{
"id": 20,
"type": "watch_match",
"title": "Watch condition matched",
"read": false
}
],
"unread_count": 3
}
}
Mark notifications as read
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer |
Notification ID (omit to mark all as read) |
{
"success": true,
"data": {
"marked_count": 3
}
}
Get/update notification settings (per-type ON/OFF)
| Parameter | Type | Required | Description |
|---|---|---|---|
like |
boolean |
Like notifications ON/OFF | |
price_change |
boolean |
Price change notifications ON/OFF | |
watch_match |
boolean |
Watch match notifications ON/OFF | |
transaction |
boolean |
Transaction notifications ON/OFF | |
system |
boolean |
System notifications ON/OFF |
{
"success": true,
"data": {
"like": true,
"price_change": true,
"watch_match": true,
"transaction": true,
"system": true
}
}
Agent
1 toolUpgrade simulation (compare current Mac with target specs and price)
| Parameter | Type | Required | Description |
|---|---|---|---|
current_chip |
string |
Current chip name (e.g. M2) | |
current_memory_gb |
integer |
Current memory (GB) | |
target_chip |
string |
Target upgrade chip (e.g. M4 Pro) | |
target_memory_gb |
integer |
Target upgrade memory (GB) | |
target_storage_gb |
integer |
Target upgrade storage (GB) | |
target_device_type |
string |
mac_mini / mac_studio |
{
"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 toolsCheck Stripe Connect account status
No parameters required.
Response Example{
"success": true,
"data": {
"connected": true,
"charges_enabled": true,
"payouts_enabled": true,
"account_id": "acct_xxx"
}
}
Get Stripe Connect balance
No parameters required.
Response Example{
"success": true,
"data": {
"available": 92000,
"pending": 198000,
"currency": "jpy"
}
}
Specs
3 toolsList of supported Apple Silicon chips (M1–M4 series)
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"
]
}
Detailed chip specs (core count, supported memory, devices)
| Parameter | Type | Required | Description |
|---|---|---|---|
chip |
string |
YES | Chip name (e.g. M4 Pro) |
{
"success": true,
"data": {
"chip": "M4 Pro",
"memory_options": [
24,
48,
64
],
"storage_options": [
512,
1024,
2048,
4096,
8192
],
"devices": [
"mac_mini"
],
"model_years": [
"2024"
]
}
}
Device chip configurations by model year
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 toolMarketplace statistics dashboard
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 toolAPI health check (no authentication required)
No parameters required.
Response Example{
"status": "ok",
"tools": 57,
"version": "1.8.0"
}
Rate Limits & API Restrictions
Rate limits and usage restrictions apply per API key. The following limits are in place to maintain a fair trading environment.
Rate Limits
| Operation | Limit | Window |
|---|---|---|
| Read (GET) | 200 requests | per minute |
| Write (POST) | 30 requests | per minute |
Rate limits are applied per API key. nginx-level IP-based limits (10 req/sec, burst=20) also apply separately.
Handling 429 Errors
Wait the number of seconds indicated in the Retry-After header before retrying. Implementing exponential backoff is recommended.
Listing Limits
| Item | Max | Value |
|---|---|---|
| Concurrent listings | 50 | Total of active + draft. If the limit is reached, cancel or sell existing listings. |
| Title length | 50 | Maximum item title length |
| Description length | 5,000 | Maximum item description length |
Price Change Limits
Price changes for the same item are limited to once per hour. This measure prevents market manipulation through frequent price changes.
This limit does not apply to updates to other fields (title, description, etc.).
Purchase Reservation System
Calling checkout.create changes the item's status to reserved. This prevents other users from simultaneously purchasing the same item.
| Item | Value |
|---|---|
| Reservation expiry | 30 min |
| On expiry | Automatically reverts to active |
| On payment completion | Changes to sold |
Error Handling
Errors are returned in a unified JSON format.
{
"success": false,
"message": "Invalid API key",
"error_code": "UNAUTHORIZED"
}
| HTTP Status | Error Code | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid parameter or missing required field |
401 | UNAUTHORIZED | API key is invalid or not specified |
403 | FORBIDDEN | Unauthorized operation (e.g. editing another user's listing) |
404 | NOT_FOUND | Specified resource not found |
429 | RATE_LIMITED | Rate limit exceeded |
500 | INTERNAL_ERROR | Internal server error |
Agent Auto-Purchase Flow
A 3-step guide for AI agents to register a card and make automated purchases.
Overview
Agent auto-purchase works via the flow: checkout.setup → card registration → checkout.agent_pay. Once a card is registered, the agent can automatically purchase items within the effective approval limit (the lower of the autonomy level ceiling and user-configured limit).
Autonomy levels are automatically upgraded based on transaction history, and once a level is reached it cannot be downgraded (irreversible progression).
| Level | Name | Ceiling | Condition |
|---|---|---|---|
| L0 | Unverified | ¥0 | Initial state |
| L1 | Initial | ¥10,000 | Card registered |
| L2 | Trusted | ¥100,000 | 5 successful transactions & cumulative ¥50,000+ |
| L3 | Autonomous | ¥500,000 | 20 successful transactions & cumulative ¥500,000 & 30 days elapsed |
| L4 | Fully Autonomous | ∞ | 50 successful transactions & cumulative ¥2,000,000 & 90 days elapsed |
effective_limit = min(auto_approve_limit, ceiling(level)) — the lower of the user setting and the level ceiling applies.
Step 1: Register a Card
Call checkout.setup to create a Stripe Setup Intent. Present the setup_url in the response to the user to enter their card details.
# Step 1: Create a 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 Purchase",
"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 is the maximum amount (JPY) for which this card will be automatically charged. Setting it to 0 requires manual approval for all purchases.
Step 2: User Completes Card Registration
Once the user enters their card details at setup_url, the card is automatically saved via webhook. Registered cards can be checked with checkout.payment_methods.
# Check registered 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: Execute Automatic Purchase
Use checkout.agent_pay to automatically purchase an item. If the amount is within the effective approval limit (effective_limit), payment completes immediately. The response includes the current autonomy_level and 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 (auto-payment succeeded):
# {
# "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 Response Patterns
checkout.agent_pay returns one of 3 response types depending on the situation. The require_confirm response includes autonomy_level, ceiling, effective_limit, and is_frozen.
| Pattern | Condition | Action |
|---|---|---|
require_setup: true |
No card registered (L0) | Guide user to register card via setup_url |
require_confirm: true |
Amount exceeds effective limit / frozen / limit is 0 | Guide user to manual payment via confirm_url |
transaction_id |
Auto-payment successful | Purchase complete. Check autonomy_level for current level. |
Self-Listing Guide
Implementation guide for "Self-Listing" — where a device lists itself.
Overview
Self-Listing is a feature where the Mac mini/Studio itself collects hardware information, calculates market price, and completes listing, inspection, and publishing in one command. Calling the items.self_list API internally executes market.price_suggest → items.create → inspect.submit → items.publish in sequence.
Step 1: Generate & Register Ed25519 Key Pair
To prevent tampering with inspection data, generate an Ed25519 key pair in advance and register the public key.
# Generate Ed25519 key pair
openssl genpkey -algorithm Ed25519 -out ed25519_key.pem
openssl pkey -in ed25519_key.pem -pubout -out ed25519_pub.pem
# Register public key via 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: Execute Self-Listing
Submit hardware data to items.self_list. Market pricing, listing, inspection, and publishing will all execute at once.
# Collect HW info via system_profiler and send to 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": "Upgrading to M4 Ultra",
"min_price_ratio": 0.8,
"geekbench_single": 3800,
"geekbench_multi": 22000,
"disk_health_percent": 98.5
}
}'
Step 3 (Optional): Ed25519-Signed Inspection
For higher trust, you can add an Ed25519-signed inspection via the challenge-response method.
# 1. Get challenge 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. Sign nonce + hardware_data with private key and submit
# → verification_method: "challenge" results in verified=true
Signed inspection data displays a verified: true badge, assuring buyers of the reliability of the inspection data.
Automate with Shell Script
Mac Claw provides tools/self-list.sh. Register it with cron for automatic daily listing.
# Usage
./tools/self-list.sh --api-key mc_your_key --condition A --reason "upgrading"
# Run daily at 3am via cron
0 3 * * * /path/to/self-list.sh --api-key mc_xxx --auto-publish
Mac Claw