{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["platform-badges","img","admonition"]},"type":"markdown"},"seo":{"title":"Treasure AI Studio - OAuth 方式の MCP エンドポイント","description":"OAuth 方式の MCP エンドポイントを作成し、各利用者が自分のログイン・権限・クレジットで MCP クライアントを Treasure AI Studio に接続できるようにする手順と、共通 MCP URL の管理、アクセスの止め方を解説します。","siteUrl":"https://docs.treasure.ai","image":"/assets/treasure-ai-social-preview.e6fefb35676f6da91c2d1bc783bd39e618e7af2b1ad3aa52a96ae69d72e700fe.b1bff462.png","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"oauth-方式の-mcp-エンドポイント","__idx":0},"children":["OAuth 方式の MCP エンドポイント"]},{"$$mdtype":"Tag","name":"PlatformBadges","attributes":{"platforms":["Web","Desktop"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth 方式の MCP エンドポイントは、各利用者が本人として接続する種類の ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/mcp-endpoints"},"children":["MCP エンドポイント"]},"です。1つのトークンと1人の実行者を共有する代わりに、利用者がそれぞれ自分の MCP クライアントから Treasure AI Studio にログインし、アクセスを許可します。以降、クライアントは本人がすでに使える作業フォルダで、本人の認証情報・権限・クレジットを使ってアクションやチャットを実行します。シークレットを共有する必要はなく、誰かの権限がほかの人に貸し出されることもありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このページでは、OAuth エンドポイントの作成、共通 MCP URL、利用者が接続するときに目にする画面、アクセスの止め方を扱います。ツールとその結果はどちらの接続方式でも同じで、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/mcp-clients"},"children":["MCP クライアントを接続する"]},"で説明しています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アカウントの多くのメンバーが普段使っている MCP クライアントから Studio を使いたい場合で、それぞれが Studio で届く範囲にだけ届けばよいときに作成してください。呼び出す側が1つのエージェントやサービスで、1つの共有作業フォルダを1人の指定した実行者として扱わせたい場合は、代わりに",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/mcp-endpoints"},"children":["静的トークン方式のエンドポイント"]},"を使ってください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"静的トークン方式との違い","__idx":1},"children":["静的トークン方式との違い"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"24%","data-label":"観点"},"children":["観点 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"38%","data-label":"静的トークン方式"},"children":["静的トークン方式 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"38%","data-label":"OAuth 方式"},"children":["OAuth 方式 "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["実行される権限"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エンドポイントの実行者"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アクセスを許可した本人"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["届く作業フォルダ"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["作成時に選んだ共有作業フォルダ1つ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["本人の私的な作業フォルダと、本人が Studio に追加済みで利用権限のある共有作業フォルダ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["チャットが変更できるもの"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["フォルダ内のものは何も変更できません。フォルダを読み取り、書き込めるのはチャットとともに破棄される一時作業領域だけです"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["本人が Studio で開始したチャットと同じように、本人の権限の範囲で本人の作業フォルダを変更できます"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["クライアントに渡すもの"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["接続 URL と、固定の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," ヘッダーに入れる ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tasgwt_"]}," トークン"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["接続 URL か共通 MCP URL だけ。クライアントが利用者のログインを処理し、自分で認証情報を取得します"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["作成できる人"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アカウントの作成ポリシーで許可された人のうち、そのフォルダを管理している人"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["作成ポリシーにかかわらず、アカウント管理者だけ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["管理する人"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["実行者とフォルダの管理者。アカウント管理者は無効化と有効化だけができます"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アカウント管理者"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アクセスの止め方"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["トークンの失効、エンドポイントの無効化、または削除"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エンドポイントの無効化または削除。Studio には、利用者ごと・クライアントごとに失効させる手段はありません。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%82%92%E6%AD%A2%E3%82%81%E3%82%8B"},"children":["アクセスを止める"]},"を参照してください"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["どちらの方式でも、6つのツール、ツールの結果、ブラウザからのリクエストの拒否は共通です。OAuth 方式ではこれに加えて、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," でログインが求められることと、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," で ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["insufficient_scope"]}," が返る場合があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":2},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アカウント管理者"]},"であること。それ以外の人には、ウィザードの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth（接続した利用者本人）"]}," は選択できず、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「OAuth エンドポイントを作成できるのはアカウント管理者のみです。」"]}," と表示されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["エージェントチャネルの作成と管理は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Web 版または Desktop 版"]},"の Treasure AI Studio で行います。Mobile アプリからは設定できません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["接続する利用者が、リモート MCP サーバー向けの OAuth ログインに対応した MCP クライアントを使っていること。具体的には、クライアントがサーバーに自身を登録でき（動的クライアント登録）、S256 による PKCE を使い、アクセスしたいリソースとして MCP URL を指定し、ログインのためにブラウザを開いて、結果をブラウザ経由のコールバックで受け取れる必要があります。クライアントを事前に登録しておくことはできず、認可コードを利用者が手でクライアントに貼り戻す方式のクライアントには対応していません。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["共有作業フォルダも実行者も選ばないので、作成にフォルダの管理権限は必要ありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"oauth-エンドポイントを作成する","__idx":3},"children":["OAuth エンドポイントを作成する"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["設定 → エージェントチャネル"]},"を開き、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MCP エンドポイント"]}," セクションの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["新規 MCP エンドポイント"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接続方式"]}," で ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth（接続した利用者本人）"]}," を選びます。接続方式を切り替えても、入力した名前とコメントは保持されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイント名"]}," に名前を入力します。たとえば ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「MCP クライアント用 Studio」"]}," のような形です。255文字まで。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["必要に応じて、同僚向けの",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["コメント"]},"を追加します。1,000文字まで。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["共通 MCP URL を利用する"]}," で、このエンドポイントにアカウントの共通 MCP URL を割り当てるかどうかを決めます（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#%E5%85%B1%E9%80%9A-mcp-url"},"children":["共通 MCP URL"]},"を参照）。アカウント内でほかに共通 URL を持つエンドポイントがない場合は、最初からチェックが入っています。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイントを作成"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-agent-channels-mcp-oauth-wizard.8cc72ccd1581833c19a35efe9aebfec9e0b3f6cb75f204733f148d35cb593ec3.679d8dbd.webp","alt":"新規 MCP エンドポイントウィザード。接続方式で OAuth（接続した利用者本人）が選ばれ、エンドポイント名が入力され、コメント欄は空で、共通 MCP URL を利用するにチェックが入り、エンドポイントを作成ボタンがある","framed":false,"withLightbox":true,"width":"640px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["フォルダの選択も、実行者の引き受けも、保管するトークンもありません。完了画面 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth エンドポイントを作成しました"]}," には、クライアントに設定する URL が表示されます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接続 URL"]}," と、このエンドポイントが共通 URL を持つ場合は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["共通 MCP URL"]}," もあわせて表示されます。どちらもエンドポイントの詳細ページで再確認できます。"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-agent-channels-mcp-oauth-created.61002b34d20cc61b59a3611f4e6947c91acfcad6eadb05941eb326e7621f2cf2.679d8dbd.webp","alt":"OAuth エンドポイントの作成完了画面。接続 URL と共通 MCP URL がそれぞれコピーボタン付きで表示され、共通 URL は認可時に選んだアカウントで割り当てられたエンドポイントにつながるという説明がある","framed":false,"withLightbox":true,"width":"640px"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"共通-mcp-url","__idx":4},"children":["共通 MCP URL"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth エンドポイントには、静的トークン方式と同じく、それぞれ専用の ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接続 URL"]},"（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://<アカウントの Agent Gateway>/v1/mcp/<エンドポイント ID>"]},"）があります。これに加えて、アカウントごとに1つの OAuth エンドポイントが ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["共通 MCP URL"]}," を持てます。共通 MCP URL は、同じサイトのすべてのアカウントで共通の短い URL です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"https://<Agent Gateway>/v1/mcp\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["共通 URL はアカウントもエンドポイントも指しておらず、どこにつながるかはログインした人で決まります。利用者が共通 URL からログインした場合、Studio で所属しているアカウントのうち、今のログイン方法で利用でき、共通 MCP URL を割り当てた OAuth エンドポイントがあるアカウントが候補になります。候補が複数あれば同意画面で選び、1つなら自動で選ばれます。接続は、そのアカウントで共通 URL を持つエンドポイントにつながります。エンドポイント専用の接続 URL の場合、候補はそのエンドポイントのアカウントだけです。エンドポイント専用の接続 URL は、共通 URL と並行して引き続き使えます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["共通 URL を持てるのはアカウントで1つだけです。"]}," ほかのエンドポイントが持っている場合、ウィザードと ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["編集"]}," ダイアログに ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「共通 URL は「（エンドポイント名）」に割り当てられています。」"]}," と表示され、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["割り当て済みのエンドポイントを管理"]}," からそのエンドポイントを開けます。先にそちらで割り当てを外してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["無効にしても割り当ては残ります。"]}," 共通 URL を持つエンドポイントを無効にすると、共通 URL 経由の接続は止まりますが、共通 URL がほかのエンドポイントに空くことはありません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["設定を変更すると、共通 URL 経由の既存の接続が切れます。"]}," エンドポイントでこの設定をオンまたはオフにすると、アカウントの利用者が共通 URL 経由で取得した認証情報がすべて失効し、それらのクライアントはもう一度認可する必要があります。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["編集"]}," ダイアログでは、保存前にこのことへの確認が求められます。エンドポイント専用の接続 URL 経由で取得した認証情報には影響しません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["続きの指示は、チャットを開始したエンドポイントに残ります。"]}," 共通 URL が別のエンドポイントに移ると、以前に共通 URL を持っていたエンドポイントで開始したチャットは、共通 URL 経由では続けられなくなります。そのエンドポイントが有効な間は、その接続 URL に対してクライアントを認可すれば、接続 URL 経由で続けられます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"oauth-エンドポイントをいくつ作るか","__idx":5},"children":["OAuth エンドポイントをいくつ作るか"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth エンドポイントはどれも同じツールを提供し、接続は接続した本人の権限で動くため、エンドポイントを増やしても誰かのアクセス範囲が変わることはありません。接続できる人を絞ることもできず、アカウントのメンバーであれば、どの OAuth エンドポイントに対してもクライアントを認可できます。多くのアカウントでは、共通 MCP URL を割り当てた OAuth エンドポイントが1つあれば足ります。無効化や削除を別々に行いたい場合、たとえば展開の一部だけを止めたい場合にだけ、追加で作成してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"利用者が接続するときの流れ","__idx":6},"children":["利用者が接続するときの流れ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["利用者は、自分の MCP クライアントに URL をリモートサーバーとして追加します。ヘッダーやトークンは入力しません。クライアントが初めて接続すると、ブラウザで Treasure AI Studio が開きます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ログインします。"]}," まだログインしていない場合は、いつもの方法で Studio にログインします。ログインの間も認可の要求は保持されるので、ログイン後はそのまま要求の画面に戻ります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["「MCP アクセスを許可」画面で要求の内容を確認します。"]}," 画面には、結果を送り返す先のホストが太字で表示され、クライアントが名乗っている名前も表示されます。この名前はクライアントの開発者が申告したもので検証されていないため、画面ではアクセスを許可する前にコールバック先のホストを確認するよう求めています。要求された MCP リソースと、要求された権限も表示されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アカウントを選びます。"]}," 候補になるのは、Studio で所属しているアカウントのうち、今のログイン方法で利用でき、要求された URL に対応する OAuth エンドポイントがあるアカウントで、それぞれにエンドポイントの名前が添えられます。候補が1つだけなら、最初から選択されています。エンドポイント専用の接続 URL の場合、候補はそのエンドポイントのアカウントだけです。無効になっているエンドポイントは選べません。別の ID プロバイダーでのログインが必要なアカウントは選択肢に含まれず、一覧の下にアカウント名と ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ログイン"]}," ボタンが表示されます。そのボタンから該当する ID プロバイダーでログインすると、要求の画面に戻れます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アクセスを許可"]}," を選択します。拒否する場合は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["拒否"]}," を選択します。ブラウザがクライアントに戻り、クライアントはツールを呼び出せるようになります。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-agent-channels-mcp-oauth-consent.b3f0eac9b72d34f2997a9cd32f89a5d529873f53a8cdd4fc2bb6cb03d1e5fdec.679d8dbd.webp","alt":"MCP アクセスを許可する同意画面。コールバック先ホスト localhost:57647 とクライアント名 Claude Code、アプリケーション名は開発者の申告である旨の注意、要求された MCP リソースの URL、要求された権限（作業フォルダの参照、アクションの一覧、実行結果の参照、アクションの実行、チャットの開始・継続（mcp））、アカウント acme-inc とエンドポイント名 New MCP、拒否とアクセスを許可のボタンが表示されている","framed":false,"withLightbox":true,"width":"480px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続は、その利用者・そのアカウント・ログインに使った URL に結びつきます。2つのアカウントに所属していて両方を使いたい場合は2回認可します。クライアントの接続先を共通 URL とエンドポイント専用の URL の間で切り替える場合も、同じく認可し直します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クライアントは認証情報を自分で更新していくため、利用者が使うたびにログインする必要はありません。もう一度認可が必要になるのは、アクセスが止められたときと、クライアントに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," が付与されていないときです。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mcp-の権限","__idx":7},"children":["MCP の権限"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth では、6つすべてのツールに単一のスコープ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," を使います。作業フォルダ・アクション一覧・実行結果の参照、アクションの実行、チャットの開始・継続が許可されます。読み取り専用の OAuth スコープはありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アクセスを許可すると、クライアントは接続した本人の権限の範囲で、これらのツールを継続的に利用できます。OAuth の同意は実行のたびには求められません。すでに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," を付与した接続でも、再同意なしでアクションやチャットを実行できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["トークンに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," が含まれていない場合、リクエストは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["insufficient_scope"]}," で拒否されます。クライアントをもう一度認可し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," を許可してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"接続で届く作業フォルダ","__idx":8},"children":["接続で届く作業フォルダ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list_work_folders"]}," は、そのアカウントにおける利用者本人の作業フォルダを返します。本人の私的な作業フォルダと、本人が Studio に追加済みで利用権限のある共有作業フォルダです。Studio に追加していない共有作業フォルダは含まれません。権限はアクセスを許可したときだけでなく、ツールを使うたびに確認されます。そのため、Studio でフォルダへのアクセスを失えば、そのフォルダは接続からも外れます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"チャットは本人の通常の-studio-チャット","__idx":9},"children":["チャットは本人の通常の Studio チャット"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth エンドポイントから開始したチャットは、接続した本人の通常のチャットで、ツールで指定した作業フォルダで動きます。SDK App や静的トークン方式のエンドポイントが作る、制限付きでチャットごとに破棄されるチャットではありません。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ファイルを変更できます。"]}," エージェントは本人の私的な作業フォルダに書き込み、共有作業フォルダにも本人のワークモードが許す範囲で書き込みます。本人が Studio で開始したチャットとまったく同じです。書き込んだ内容は残ります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["本人が持つものをすべて使います。"]}," 本人のほかの作業フォルダ、保存されたメモリや設定、プラグイン、コネクション、認証情報を、本人のチャットと同じように使えます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["本人のチャット一覧に表示されます。"]}," チャットが動いた作業フォルダの名前が表示され、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MCP"]}," のラベルは付きません。アイコンは吹き出しが2つ重なったもので、ツールチップは ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「MCP 経由で作成」"]}," です。本人はこのチャットを開いて、Studio でそのまま続けられます。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-agent-channels-mcp-oauth-chat.600aad7ef30f5808dde34d76c94035b26fa162d754f89df186f3663e3e2838fa.679d8dbd.webp","alt":"OAuth エンドポイント経由で開始したチャットのチャット一覧の行。タイトルの上に作業フォルダ名、2つの吹き出しのアイコンがあり、Created through MCP のツールチップが出ている","framed":false,"withLightbox":true,"width":"300px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クライアントにアクセスを許可することは、そのクライアントに自分として Studio へ入力させることと同じだと考えてください。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue_chat"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get_chat_result"]}," が届くのは、同じエンドポイントから開始した本人自身のチャットだけです。ほかの種類との比較は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/channel-chats"},"children":["エージェントチャネルのチャットが到達できる範囲"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"oauth-エンドポイントを管理する","__idx":10},"children":["OAuth エンドポイントを管理する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth エンドポイントを変更できるのは、アカウント管理者だけです。編集、無効化と有効化、削除が該当します。ほかのメンバーにも同じ詳細ページが表示されますが、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["編集"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["有効 / 無効"]}," のトグル、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイントを削除"]}," はありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細ページの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["概要"]}," には、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接続方式"]}," として ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth（接続した利用者本人）"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["作業フォルダ"]}," として ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アクセス可能な作業フォルダ"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["実行者"]}," として ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接続した利用者"]},"、そして ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["コメント"]}," が表示されます。その下に、接続に許可される操作と、使えるツールの固定の一覧が続きます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["トークン"]}," セクションはなく、引き受けたり降りたりする実行者のロールもありません。"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-agent-channels-mcp-oauth-detail.e293eaeb16a11845d1ed54d33f18e7165e90a85a329dc1f34d56768211b33359.679d8dbd.webp","alt":"OAuth 方式の MCP エンドポイントの詳細ページ。有効のステータスとトグル、コピーボタン付きの接続 URL と共通 MCP URL、接続方式・作業フォルダ・実行者・コメントを示す概要、アクセス範囲の説明、使えるツール、危険な操作の領域のエンドポイントを削除が表示されている","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth エンドポイントのステータスは ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["有効"]}," か ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["無効"]}," のどちらかです。実行者がいないため、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["停止中（実行者が必要）"]}," になることはありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"無効化と有効化","__idx":11},"children":["無効化と有効化"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["有効 / 無効"]}," のトグルをオフにすると、何も失効させずに、エンドポイントへのすべての接続が直ちに止まります。接続中のクライアントは、エンドポイントが再び有効になるまで ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp_disabled"]}," で拒否されます。有効に戻すと、手元の認証情報が期限切れや失効になっていない限り、クライアントはそのまま使い続けられます。エンドポイントが無効の間は、同意画面でそのエンドポイントを選ぶことはできません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"編集","__idx":12},"children":["編集"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["編集"]}," では、名前、コメント、エンドポイントが共通 MCP URL を持つかどうかを変更できます。共通 URL の設定を変更すると、アカウントの共通 URL 経由の接続が切れるため、確認が求められます。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#%E5%85%B1%E9%80%9A-mcp-url"},"children":["共通 MCP URL"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-agent-channels-mcp-oauth-edit-dialog.f5f09b4cf0c326409be5f1888d4c0c360dca8d9474beecbe641118391545e1c4.679d8dbd.webp","alt":"MCP エンドポイントの編集ダイアログ。名前欄、共通 MCP URL を利用するのチェックボックスと説明、設定を変更すると共通 URL 向けの認証情報が失効するという警告、確認のチェックボックス、任意のコメント欄、キャンセルと保存のボタンがある","framed":false,"withLightbox":true,"width":"480px"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"エンドポイントを削除する","__idx":13},"children":["エンドポイントを削除する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイントを削除"]}," は、エンドポイントを恒久的に削除します。同じ操作で、そのエンドポイントの URL 向けに発行されたすべての認証情報が使えなくなります。このエンドポイントが共通 URL を持っていた場合は、共通 URL 経由で発行されたものも含みます。エンドポイントが作ったチャットは、各利用者のチャット一覧に残ります。削除は取り消せません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"アクセスを止める","__idx":14},"children":["アクセスを止める"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"34%","data-label":"操作"},"children":["操作 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"66%","data-label":"効果"},"children":["効果 "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイントを無効にする"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["再び有効にするまで、エンドポイントへのすべての接続が拒否されます。何も失効しません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイントで共通 MCP URL の設定をオンまたはオフにする"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アカウントの利用者が共通 URL 経由で行ったすべての接続が失効し、それらのクライアントはもう一度認可する必要があります。エンドポイント専用の URL 経由の接続には影響しません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["エンドポイントを削除する"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エンドポイントへのすべての接続が失効します。元に戻せません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["利用者をアカウントから外す"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["そのアカウントでの本人の接続が使えなくなります"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストのたびにエンドポイントと利用者の認証情報が確認されるため、どの操作も次のツール呼び出しから反映されます。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"特定の利用者の接続だけを止める手段はありません"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI Studio には、利用者が接続したクライアントの一覧はなく、利用者本人もアカウント管理者も、アプリから個々の接続を失効させることはできません。特定の利用者だけを止めるには、その人をアカウントから外すか、該当するフォルダへのアクセスを外してください。全員をまとめて止めるには、エンドポイントを無効にするか削除します。利用者が自分のクライアントの接続を切りたい場合は、そのクライアントからサーバーを削除します。これでクライアントは認証情報を使わなくなりますが、Studio 側で認証情報が失効するわけではありません。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"トラブルシューティング","__idx":15},"children":["トラブルシューティング"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"38%","data-label":"症状"},"children":["症状 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"62%","data-label":"原因と対処"},"children":["原因と対処 "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ウィザードで ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth（接続した利用者本人）"]}," を選べない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["自分がアカウント管理者ではありません。アカウント管理者にエンドポイントの作成を依頼してください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["共通 MCP URL を利用する"]}," にチェックを入れられない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アカウント内の別のエンドポイントが共通 URL を持っています。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["割り当て済みのエンドポイントを管理"]}," からそのエンドポイントを開き、先に割り当てを外してください。割り当ての確認中も、チェックボックスは操作できません。確認に失敗した場合は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["再試行"]}," を選択してください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["同意画面に ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「要求された MCP リソースに対応する OAuth エンドポイントを持つ、利用可能なアカウントがありません。」"]}," と表示される"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["利用者のどのアカウントも、その URL に対して選択肢に出せません。原因は、本人のアカウントで共通 URL が割り当てられていない、エンドポイントのアカウントのメンバーではない、エンドポイントが削除された、またはエンドポイントのあるアカウントが別の ID プロバイダーを必要としている（その ID プロバイダーでログインする）のいずれかです。アカウント管理者に相談してください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["同意画面に ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「このエンドポイントは停止中、または利用できない状態のため、アクセスを許可できません。」"]}," と表示される"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エンドポイントが無効です。アカウント管理者が有効にしてください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["同意画面で、別の ID プロバイダーでのログインを求められる"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["そのアカウントでは別の ID プロバイダーが必要です。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ログイン"]}," を選択し、その ID プロバイダーでログインしてください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["同意画面に ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["「このクライアントは認可コードを手動で受け取る方式を要求しています。」"]}," と表示される"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["そのクライアントは、Studio が必要とするブラウザ経由のコールバックで結果を受け取れません。別のクライアントを使ってください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クライアントが ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["insufficient_scope"]}," で拒否される"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クライアントのトークンに、すべての MCP ツールに必要なスコープ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," が含まれていません。クライアントをもう一度認可し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp"]}," を許可してください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クライアントが ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp_disabled"]}," で拒否される"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エンドポイントが無効です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クライアントが ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," で拒否される、または利用者にもう一度ログインを求める"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["接続が失効しています。共通 URL の設定が変更された場合は、もう一度認可してください。エンドポイントが削除された場合や、利用者がアカウントから外れた場合は、そのエンドポイント経由のアクセスは元に戻せません"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"次のステップ","__idx":16},"children":["次のステップ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/mcp-clients"},"children":["MCP クライアントを接続する"]}," — クライアントの設定と、使えるツールと結果"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/mcp-endpoints"},"children":["静的トークン方式の MCP エンドポイント"]}," — 1つの共有作業フォルダと1人の実行者で動く静的トークン方式"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/agent-channels/channel-chats"},"children":["エージェントチャネルのチャットが到達できる範囲"]}," — チャットができること・できないこと"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/skills/actions"},"children":["アクション"]}," — クライアントが実行するアクションを作成する"]}]}]},"headings":[{"value":"OAuth 方式の MCP エンドポイント","id":"oauth-方式の-mcp-エンドポイント","depth":1},{"value":"静的トークン方式との違い","id":"静的トークン方式との違い","depth":2},{"value":"前提条件","id":"前提条件","depth":2},{"value":"OAuth エンドポイントを作成する","id":"oauth-エンドポイントを作成する","depth":2},{"value":"共通 MCP URL","id":"共通-mcp-url","depth":2},{"value":"OAuth エンドポイントをいくつ作るか","id":"oauth-エンドポイントをいくつ作るか","depth":3},{"value":"利用者が接続するときの流れ","id":"利用者が接続するときの流れ","depth":2},{"value":"MCP の権限","id":"mcp-の権限","depth":3},{"value":"接続で届く作業フォルダ","id":"接続で届く作業フォルダ","depth":3},{"value":"チャットは本人の通常の Studio チャット","id":"チャットは本人の通常の-studio-チャット","depth":3},{"value":"OAuth エンドポイントを管理する","id":"oauth-エンドポイントを管理する","depth":2},{"value":"無効化と有効化","id":"無効化と有効化","depth":3},{"value":"編集","id":"編集","depth":3},{"value":"エンドポイントを削除する","id":"エンドポイントを削除する","depth":3},{"value":"アクセスを止める","id":"アクセスを止める","depth":2},{"value":"トラブルシューティング","id":"トラブルシューティング","depth":2},{"value":"次のステップ","id":"次のステップ","depth":2}],"frontmatter":{"seo":{"title":"Treasure AI Studio - OAuth 方式の MCP エンドポイント","description":"OAuth 方式の MCP エンドポイントを作成し、各利用者が自分のログイン・権限・クレジットで MCP クライアントを Treasure AI Studio に接続できるようにする手順と、共通 MCP URL の管理、アクセスの止め方を解説します。"},"platforms":["Web","Desktop"]},"lastModified":"2026-11-09T05:01:02.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/ai-studio/agent-channels/mcp-oauth","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}