プロトコルと標準
SOPがどのプロトコルと標準を使い、それぞれどこまで対応しているか。
現況は項目ごとに異なります。下の表をご覧ください。
手順
- エージェント → SOP:MCPのtools/list、またはREST /api/v1
- SOP → エージェント:ツールと予約エンドポイントを返す
- エージェント → SOP:request_booking
- SOP → エージェント:UCP形式のpayment_handlers(com.stripe.payments)
- エージェント → SOP:Shared Payment Tokenでcomplete_booking
- エージェント → SOP:またはMPP・x402で支払いリンクに支払う(テストネット)
- SOP → エージェント:/openapi.jsonが支払いリンクを記述
対応表
| プロトコルまたは標準 | 用途 | 現況 |
|---|---|---|
| MCP(Model Context Protocol) | エージェントがツールを呼び出す | 公開中(Streamable HTTP、9つのツール) |
| REST API | MCPと同じ中核処理を共有 | 公開中 |
OpenAPIディスカバリー文書/openapi.json | 支払いリンク(支払いできる操作)を記述する | 公開中(支払い情報はテストネットのみ) |
UCPの支払いハンドラー(com.stripe.payments) | 使える支払いハンドラーをエージェントに伝える | 公開中(予約のレスポンスでこの形式を使用) |
UCPのその他の部分(チェックアウト、IDの連携、注文、ディスカバリーファイル/.well-known/ucp) | プラットフォームをまたぐ商取引の全体の流れ | 計画中(未実装) |
| MPPとx402 | HTTP 402でエージェントが直接支払う | テストネット |
| ACPとAP2 | その他のエージェントコマース向けプロトコル | 計画中(未実装) |
MCPとREST
どちらも同じ予約の中核処理を共有しており、動作は同じです。ツール一覧とエンドポイントは予約サービスに接続するをご覧ください。
UCP
Universal Commerce Protocol(UCP)は、チェックアウト、ID連携、注文の追跡、支払い認証情報の交換を扱うオープンな標準(ucp.dev)です。SOPの予約レスポンスは、UCPの支払いハンドラー形式で支払い方法を示します。UCPの完全なチェックアウトと/.well-known/ucpディスカバリーファイル(計画中)は実装していません。
MPPとx402
どちらも、HTTP 402でエージェントが直接支払うためのオープンなプロトコルです。SOPでは現在テストネットのみで提供しています。マシンペイメントをご覧ください。
ディスカバリー文書
/openapi.jsonは、現在唯一の機械可読なディスカバリー文書で、支払いできる操作にx-payment-infoを付けています。
ディスカバリー文書の取得:/openapi.json
curl
curl -sS "https://mcp.srct.tw/openapi.json" \
-H "User-Agent: my-agent/1.0"
Python
import json
import urllib.error
import urllib.request
BASE = "https://mcp.srct.tw"
def call(method, path, body=None, headers=None):
req = urllib.request.Request(
BASE + path,
data=None if body is None else json.dumps(body).encode(),
method=method,
headers={"User-Agent": "my-agent/1.0", "Content-Type": "application/json", **(headers or {})},
)
try:
with urllib.request.urlopen(req) as res:
return res.status, json.loads(res.read())
except urllib.error.HTTPError as err: # 4xx and 5xx responses still carry a JSON body
return err.code, json.loads(err.read())
def show(status, body):
print("HTTP", status)
print(json.dumps(body, ensure_ascii=False, indent=2))
show(*call("GET", "/openapi.json"))
Node.js
const BASE = "https://mcp.srct.tw";
async function call(method, path, body, headers = {}) {
const res = await fetch(BASE + path, {
method,
headers: { "User-Agent": "my-agent/1.0", "Content-Type": "application/json", ...headers },
body: body === undefined ? undefined : JSON.stringify(body),
});
return { status: res.status, body: await res.json() };
}
function show({ status, body }) {
console.log("HTTP", status);
console.log(JSON.stringify(body, null, 2));
}
(async () => {
show(await call("GET", "/openapi.json"));
})();
レスポンス例
HTTP 200
{
"openapi": "3.1.0",
"info": {
"title": "… booking payments",
"version": "1.0.0",
"description": "Pay for … bookings with x402 or MPP. Create the booking first with the MCP tool request_booking or POST /api/v1/businesses/{business_id}/bookings; use the payment_link it returns."
},
"servers": [
{
"url": "https://mcp.srct.tw"
}
],
"x-service-info": {
"categories": [
"booking",
"fitness",
"services"
],
"docs": {
"homepage": "https://mcp.srct.tw/",
"apiReference": "https://mcp.srct.tw/docs"
}
},
"paths": {
"/pay/{business_id}/{booking_id}": {
"post": {
"summary": "Pay for a booking (x402 or MPP)",
"parameters": [
{
"name": "business_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "booking_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "t",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "pay token from the booking's payment_link"
}
],
"x-payment-info": {
"offers": [
{
"intent": "charge",
"method": "evm",
"amount": null,
"currency": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"description": "USDC on Base Sepolia (test network); also accepted as x402 exact"
},
{
"intent": "charge",
"method": "tempo",
"amount": null,
"currency": "0x20c0000000000000000000000000000000000000",
"description": "pathUSD on Tempo test network (Moderato)"
}
]
},
"responses": {
"200": {
"description": "Paid: booking and payment result"
},
"402": {
"description": "Payment Required: x402 PAYMENT-REQUIRED and MPP WWW-Authenticate challenges"
},
"409": {
"description": "Booking not payable"
},
"410": {
"description": "Payment window passed"
}
}
},
"get": {
"summary": "Pay for a booking (x402 or MPP)",
"parameters": [
{
"name": "business_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "booking_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "t",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "pay token from the booking's payment_link"
}
],
"x-payment-info": {
"offers": [
{
"intent": "charge",
"method": "evm",
"amount": null,
"currency": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"description": "USDC on Base Sepolia (test network); also accepted as x402 exact"
},
{
"intent": "charge",
"method": "tempo",
"amount": null,
"currency": "0x20c0000000000000000000000000000000000000",
"description": "pathUSD on Tempo test network (Moderato)"
}
]
},
"responses": {
"200": {
"description": "Paid: booking and payment result"
},
"402": {
"description": "Payment Required: x402 PAYMENT-REQUIRED and MPP WWW-Authenticate challenges"
},
"409": {
"description": "Booking not payable"
},
"410": {
"description": "Payment window passed"
}
}
}
}
}
}本番サービスで実行済み(読み取りのみ)
支払いハンドラーのフィールド
| フィールド | 値 |
|---|---|
id | stripe_payments |
type | com.stripe.payments |
version | 2026-06-25 |
available_instruments | card、およびconfig.network_id付きのlink |
config.environment | 本番はlivemode、テストはtestmode |
config.business_profile | 認証情報の発行先となるStripeプロファイル |
Apple PayとGoogle Payは、現在は提供していません。
セキュリティ
- 認証情報には範囲があります:1つの金額、1つの期間、1つの受け取り先。
- SOPはカード番号そのものを扱いません。
- 予約ごとに
status_tokenがあり、その予約にしかアクセスできません。 - 書き込みにはレート制限があり、StripeからSOPへのWebhookは署名を検証しています。
関連ページ
- 予約サービスに接続する:事業者の検索、空き枠の確認、予約の作成と管理
- マシンペイメント(MPPとx402、テストネット):MPPとx402。現在はテストネットのみ
- 支払い認証情報:Shared Payment Tokenと、事業者・エージェント・プラットフォームの3つの役割