Connect your agent 自分の AI エージェントをつなぐ
You bring the agent and the model; we provide the phone. Any MCP client or any program that can send HTTP requests works, with any model. エージェントとモデルはお客さまのものを使い、こちらは実機を出します。MCP のクライアントか、HTTP を送れるプログラムなら何でもつながります。モデルは問いません。
Fastest path いちばん速い手順
- Run this one line — registers devicelab in every agent tool on this machine (Claude Code, Codex, Cursor, Gemini CLI). No key to copy: the tool opens your browser to sign in the first time.
次の1行を実行する。この機械にある道具すべてに登録します。鍵のコピーは要りません。初回に道具がブラウザーを開きます。
curl -fsSL https://ymac-mini.tailfd6430.ts.net/connect.sh | sh
- Ask your agent: “List my devicelab devices, start a session on one, and tell me what is on the screen.” エージェントに頼む: 「devicelab の端末を一覧にして、1台でセッションを始め、画面に何があるか教えて」
Claude Desktop, claude.ai, ChatGPT and other apps with connectors: add a custom connector with this URL and sign in. Claude Desktop・claude.ai・ChatGPT など、コネクタのあるアプリ: 次の URL でカスタムコネクタを足し、ログインします。
https://ymac-mini.tailfd6430.ts.net/mcp
Click a command block to select all of it, then copy. 命令の枠を押すと全体が選ばれます。そのあと写してください。
Set it up by hand, with an API key 手で設定する(API の鍵を使う)
- Put your key in an environment variable.
鍵を環境変数に入れる。
export DEVICELAB_API_KEY=dlk_…
- Paste the setting for your tool below. 下の道具ごとの設定を貼る。
Claude Code
claude mcp add --transport http devicelab https://ymac-mini.tailfd6430.ts.net/mcp \ --header "Authorization: Bearer $DEVICELAB_API_KEY"
Or in a project's .mcp.json: プロジェクトの .mcp.json に書く場合:
{
"mcpServers": {
"devicelab": {
"type": "http",
"url": "https://ymac-mini.tailfd6430.ts.net/mcp",
"headers": { "Authorization": "Bearer ${DEVICELAB_API_KEY}" }
}
}
}
Claude Desktop / claude.ai
- Open Customize > Connectors > + Add > Add custom connector.
- Name:
devicelab. URL:https://ymac-mini.tailfd6430.ts.net/mcp - Under Authentication choose “No sign in”, and add a request header
Authorizationwith the valueBearer <your key>.
Authorization に Bearer <鍵> を入れます。
Codex (OpenAI)
codex mcp add devicelab --url https://ymac-mini.tailfd6430.ts.net/mcp --bearer-token-env-var DEVICELAB_API_KEY
Or in ~/.codex/config.toml: ~/.codex/config.toml に書く場合:
[mcp_servers.devicelab] url = "https://ymac-mini.tailfd6430.ts.net/mcp" bearer_token_env_var = "DEVICELAB_API_KEY"
Cursor
.cursor/mcp.json in the project, or ~/.cursor/mcp.json: プロジェクトの .cursor/mcp.json か ~/.cursor/mcp.json:
{
"mcpServers": {
"devicelab": {
"url": "https://ymac-mini.tailfd6430.ts.net/mcp",
"headers": { "Authorization": "Bearer ${env:DEVICELAB_API_KEY}" }
}
}
}
Gemini CLI
~/.gemini/settings.json, or .gemini/settings.json in the project: ~/.gemini/settings.json かプロジェクトの .gemini/settings.json:
{
"mcpServers": {
"devicelab": {
"httpUrl": "https://ymac-mini.tailfd6430.ts.net/mcp",
"headers": { "Authorization": "Bearer $DEVICELAB_API_KEY" }
}
}
}
Your own code (REST) 自作のプログラム(REST)
H="Authorization: Bearer $DEVICELAB_API_KEY"
curl -s -H "$H" https://ymac-mini.tailfd6430.ts.net/api/v1/devices
SID=$(curl -s -X POST -H "$H" https://ymac-mini.tailfd6430.ts.net/api/v1/devices/<device_id>/sessions | python3 -c 'import json,sys;print(json.load(sys.stdin)["session_id"])')
curl -s -H "$H" https://ymac-mini.tailfd6430.ts.net/api/v1/sessions/$SID/screen
curl -s -X POST -H "$H" -H "Content-Type: application/json" \
-d '{"type":"tap","text":"Settings"}' https://ymac-mini.tailfd6430.ts.net/api/v1/sessions/$SID/actions
curl -s -X DELETE -H "$H" https://ymac-mini.tailfd6430.ts.net/api/v1/sessions/$SID
Read the screen, choose an action with your model, send it, repeat. 画面を読む → モデルで次の操作を決める → 送る、のくり返しです。
adb (Appium, scrcpy, your existing tools) adb(Appium・scrcpy・今お使いの道具)
python3 devicelab_adb.py --url wss://ymac-mini.tailfd6430.ts.net/adb adb -P 5038 devices
The bridge script comes with your welcome email. Tools that run adb for you: export ANDROID_ADB_SERVER_PORT=5038.
橋渡しのスクリプトは、ご案内のメールに付いています。adb を自分で呼ぶ道具には export ANDROID_ADB_SERVER_PORT=5038 を設定します。
Check the connection つながったか確かめる
curl -s -H "Authorization: Bearer $DEVICELAB_API_KEY" https://ymac-mini.tailfd6430.ts.net/api/v1/account
It returns your plan and your devices. 401 means the key is wrong or not set.
契約の内容と端末の一覧が返ります。401 は、鍵が違うか、入っていません。