1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ClaudeCodeCLIからSupabase MCPのクラウドサーバーに接続する方法

1
Posted at

Claude Code CLI から Supabase のクラウド MCP サーバーに接続する方法

はじめに

Claude Code CLI からローカルの Supabase MCP サーバーに接続する手順は多くの記事で紹介されていますが、クラウドサーバーへの接続方法については情報が少なかったため、備忘録としてまとめます。

前提条件

  • Claude Code CLI がインストール済み
  • Supabase プロジェクトが作成済み
  • Supabase のアカウントとアクセス権限がある

接続手順

1. アクセストークンの取得

Supabaseのプロフィール画面からアクセストークンを取得します。

  • Supabase にログイン
  • 右上のプロフィールアイコンをクリック
  • Account PreferencesAccess Tokens へ移動
  • Generate New Token をクリックしてトークンを生成・コピー

2. MCP サーバー URL の取得

プロジェクトのダッシュボードからMCPサーバーのURLを取得します。

  • 対象のプロジェクトを開く
  • 画面上部の connect から MCP タブに遷移
  • Server URL をコピー

3. Claude Code CLI で接続

以下のコマンドで接続を追加します。

claude mcp add --transport http <mcp-name> <サーバーURL> --header "Authorization: Bearer <アクセストークン>"

4. 接続確認

コマンド実行後、ブラウザで認証画面が開くので承認します。

Claude Code CLI から接続確認

無事接続できていることを確認しました

image.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?