genai-toolbox

Activity, over time

Daily observations from the public event archive.

Attention

Daily stars & forks

Loading attention chart

Star accumulation

Cumulative stars

Loading star accumulation chart

Pull requests

Daily opens & merges

Loading pull requests chart

Conversations

Daily issues & comments

Loading conversations chart

Community

Daily accounts & reviews

Loading community chart

Releases

Daily releases

Loading releases chart

Mentions

3posts · 30d
Nov 30 posts
  1. X · · @YoDevp

    Advisory oficial (CVE-2026-93328 / GHSA-2gc9-c85v-5vwr): advisories/GHSA-2gc9-c85v-5vwr El fix en el repo de Google: mcp-toolbox#3454

    14 views
  2. Reddit · · r/bigquery · u/querylabio

    Google BigQuery MCP BigQuery is known for being potentially expensive, so you learn to be careful with it. At the same time, it’s 2026. Writing queries by hand with no AI involved feels like an anachronism. Most people I know can’t imagine their work without Claude or Codex anymore. The link between BigQuery and an AI agent is MCP. Google offers its own hosted server, there’s the Google's MCP Toolbox, and open-source alternatives keep appearing. Google’s own solutions seems like the obvious default. Then I found out you can’t set `maximumBytesBilled` using Google hosted server (this one docs.cloud.google.com) and in googleapis/mcp-toolbox maximumBytesBilled default is unlimited. I was surprised at first. Then I thought about it from Google’s perspective. Why would they limit how much you spend? :-) So we give an LLM access to a potentially expensive resource and hope it behaves. We all know how that goes (“You’re absolutely right!”). At best, we rely on a prompt or a skill that says “always dry-run” and “don’t spend more than X”. In a lot of companies I’ve seen, people build their own local MCP servers that sit between the agent and `bq`, the BigQuery CLI. That’s a reasonable solution. Vibe-coding one takes two prompts in Claude Code. The job is mostly hard cost limits and rejecting statements containing `DROP`, `DELETE` or `UPDATE` words. Primitive, but it works. We make Querylab.io, a free BigQuery IDE, so we went a bit further and put a local MCP server in our desktop app. Everything the app already does to keep your BigQuery work under control is available to the agent too: Cost limits -> maximum GB per query, plus daily, weekly and monthly budgets. Billing model routing -> automatically selects on-demand or reservations, whatever is cheaper. SQL-aware guardrails -> our parser understands what a statement actually does, so write restrictions and rules like “don’t touch this dataset” don’t have to rely on regexp. Limits the agent can inspect -> it can check its own limits before writing SQL and ask you to lift a limit for a single query, rather than inventing workarounds when all it needs is your approval. And you can take over in app, review before run etc. Because it’s local there’s nothing to host. It authenticates through the app, and the way we’d recommend is your existing gcloud default credentials. How do you connect BigQuery to your Claude Code, or Codex, or whatever you use?

    10 comments
  3. Zenn · · @web_benriya

    BigQuery MCPサーバーをつなぐ — エージェントからBigQueryを操作する AIエージェントとBigQueryの間にある壁 BigQueryのAI機能(K-01〜K-24で解説したAI関数群)はSQL内でGeminiを呼び出す方向だが、逆向きの連携もある。ClaudeやGPTなどのAIエージェントをクライアント側に置き、エージェントがBigQueryを操作するパターンだ。 この逆向き連携を実現するのがMCP(Model Context Protocol)だ。MCPを使うと、AIエージェントはBigQueryに対してクエリ実行・スキーマ確認・テーブル一覧取得などを直接行える。 本記事ではBigQuery MCPサーバーのセットアップと、Claude Codeからの基本操作を解説する。 MCPとは何か MCP(Model Context Protocol)はAnthropicが策定したオープンプロトコルで、AIアシスタントと外部ツール・データソースを接続するための標準仕様だ。 MCPの基本構造は以下のとおりだ。 役割 説明 MCPホスト AIエージェントを動かすアプリ(Claude Code、Claude Desktopなど) MCPクライアント ホストに組み込まれたプロトコル処理層 MCPサーバー 特定のツール・データソースを外部に公開するサービス BigQuery MCPサーバーはBigQueryの操作をMCPプロトコルで公開するサーバーだ。Claude Codeなどのホストがこのサーバーを経由してBigQueryへのクエリ実行やメタデータ取得を行える。 BigQuery MCPサーバーの種類 BigQueryをMCPで操作する方法は複数ある。 1. MCP Toolbox for Databases(推奨) GoogleがOSSとして提供するMCPサーバー群で、BigQueryを含む複数のデータベースに対応する。エンタープライズ利用を想定した設計で、接続管理・認証・リソース制御が充実している。 googleapis/genai-toolbox 2. コミュニティ製BigQuery MCPサーバー 軽量な実装が多く、個人利用や検証目的に向く。GitHubで複数の実装が公開されている。 3. Claude Code内蔵MCP Claude Code(バージョン1.0以降)はBigQueryへの直接接続機能を持つ。MCP Toolboxとの組み合わせが公式推奨構成だ。 本記事ではMCP Toolbox for Databasesを使った構成を解説する。 事前準備 必要な権限 エージェントがBigQueryを操作するには以下のIAMロールが必要だ。 roles/bigquery.dataViewer(テーブル・スキーマの参照) roles/bigquery.jobUser(クエリ実行) roles/bigquery.dataEditor(テーブルへの書き込みが必要な場合) 最小権限の原則に従い、参照のみの用途ならdataViewerとjobUserだけで十分だ。 サービスアカウントの作成 MCPサーバーが使用するサービスアカウントをGCPで作成する。 サービスアカウントの作成 gcloud iam service-accounts create bigquery-mcp-agent \ --display-name="BigQuery MCP Agent" 権限の付与 gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \ --member="serviceAccount:bigquery-mcp-agent@YOUR_PROJECT_ID.iam.gserviceaccount.com" \ --role="roles/bigquery.dataViewer" gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \ --member="serviceAccount:bigquery-mcp-agent@YOUR_PROJECT_ID.iam.gserviceaccount.com" \ --role="roles/bigquery.jobUser" キーファイルの発行 gcloud iam service-accounts keys create bigquery-mcp-key.json \ --iam-account=bigquery-mcp-agent@YOUR_PROJECT_ID.iam.gserviceaccount.com ! キーファイルは.gitignoreへの追記を忘れずに。誤ってリポジトリにコミットしないよう注意が必要だ。 MCP Toolboxのセットアップ インストール Go 1.21以上が必要 go install github.com/googleapis/genai-toolbox@latest または公式ドキュメントに従ってDockerイメージを使う方法もある。 設定ファイルの作成 toolbox.yamlを作成してBigQueryへの接続情報を定義する。 sources: - name: bigquery-prod type: bigquery project: your-gcp-project-id credentials_file: /path/to/bigquery-mcp-key.json tools: - name: run_query description: BigQueryでSQLクエリを実行して結果を返す source: bigquery-prod kind: bigquery-query parameters: - name: sql type: string description: 実行するSQLクエリ - name: list_datasets description: プロジェクト内のデータセット一覧を取得する source: bigquery-prod kind: bigquery-list-datasets - name: list_tables description: 指定データセット内のテーブル一覧を取得する source: bigquery-prod kind: bigquery-list-tables parameters: - name: dataset_id type: string description: データセットID - name: get_table_schema description: テーブルのスキーマ(カラム定義)を取得する source: bigquery-prod kind: bigquery-get-table parameters: - name: dataset_id type: string description: データセットID - name: table_id type: string description: テーブルID サーバーの起動 toolbox --config toolbox.yaml --port 5000 起動後、http://localhost:5000でMCPサーバーが待ち受ける。 Claude CodeへのMCP設定 .claude/settings.jsonの編集 Claude Codeのプロジェクト設定ファイルにMCPサーバーの接続情報を追加する。 { "mcpServers": { "bigquery": { "url": "localhost" } } } グローバル設定(~/.claude/settings.json)に書くと全プロジェクトで使える。プロジェクト固有の接続先は.claude/settings.jsonに書く。 接続の確認 Claude Codeを起動し、以下のように話しかけると接続確認ができる。 BigQueryに接続できていますか?データセット一覧を教えてください。 MCPサーバーが正常に起動していれば、Claude CodeはBigQueryのデータセット一覧を取得して返答する。 基本操作 テーブル構造の確認 analyticsデータセットにどんなテーブルがありますか? ga_sessionsテーブルのスキーマを確認してください。 Claude Codeはlist_tablesとget_table_schemaツールを呼び出し、テーブル定義を取得する。 クエリの実行 ga_sessionsテーブルから昨日のセッション数をデバイス別に集計してください。 Claude Codeは適切なSQLを生成し、run_queryツールで実行して結果を返す。 生成されるSQLの例: SELECT device.category AS device_category, COUNT(DISTINCT CONCAT( user_pseudo_id, CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING) )) AS sessions FROM your-project.analytics.ga_sessions WHERE DATE(TIMESTAMP_MICROS(event_timestamp)) = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) GROUP BY 1 ORDER BY 2 DESC ! ga_session_idの取得はUNNEST経由でevent_paramsから取り出す必要がある。直接カラムとして存在しないため、UNNEST処理が必須だ。 分析の反復 MCPを使うとエージェントが結果を確認しながら次のクエリを自動生成できる。 セッション数が先週比で20%以上減っているデバイスはありますか? 原因として考えられるトラフィックソースを調べてください。 エージェントは複数のクエリを順次実行し、集計→比較→原因探索を自律的に行う。 コスト管理の設定 エージェントが自律的にクエリを実行するため、クエリコストが意図せず膨らむリスクがある。以下の設定でコストを制御する。 バイトスキャン上限の設定 toolbox.yamlにクエリのバイトスキャン上限を追加できる。 tools: - name: run_query kind: bigquery-query source: bigquery-prod config: maximum_bytes_billed: 10737418240 # 10GB上限 書き込み操作の制限 参照専用の用途では、テーブルへの書き込みツールをtoolbox.yamlに定義しないことで操作を制限できる。 クエリ実行ログの確認 BigQueryのINFORMATION_SCHEMAでエージェントが実行したクエリ履歴を定期確認する。 SELECT creation_time, total_bytes_billed, query FROM region-asia-northeast1.INFORMATION_SCHEMA.JOBS WHERE DATE(creation_time) = CURRENT_DATE() AND user_email = 'bigquery-mcp-agent@your-project.iam.gserviceaccount.com' ORDER BY creation_time DESC LIMIT 50 セキュリティの注意点 データセットへのアクセス範囲を絞る サービスアカウントにはプロジェクト全体の権限を与えず、必要なデータセットのみに権限を付与する。 プロジェクト全体ではなくデータセット単位で権限付与 bq add-iam-policy-binding \ --member="serviceAccount:bigquery-mcp-agent@YOUR_PROJECT_ID.iam.gserviceaccount.com" \ --role="roles/bigquery.dataViewer" \ your-project:analytics キーファイルの管理 本番環境ではcredentials_fileよりもWorkload Identity FederationやApplication Default Credentialsを使う方が安全だ。クラウド環境(Cloud Run、GKEなど)ではキーファイルを使わずに運用できる。 MCPサーバーへのアクセス制限 toolbox.yamlでAllowlistを設定してアクセスを制限する。社内ネットワークや特定のIPからのみ接続を受け付ける設定が推奨だ。 まとめ BigQuery MCPサーバーをセットアップすると、Claude Codeなどのエージェントから以下の操作ができるようになる。 データセット・テーブル一覧の取得 スキーマの確認 SQLクエリの実行と結果取得 複数クエリを連続させた自律的な分析 エージェント側がBigQueryの構造を理解した上でSQLを生成・実行できるため、自然言語での分析指示がより正確に動く。次のK-26ではClaude Code × BigQuery MCPでGA4分析を任せる具体的な活用例を解説する。 BigQueryへのMCP接続設定・エージェント活用について、実務レベルのサポートを提供しています。ご相談はこちらからどうぞ。 coconala.com

Latest stargazers

The last 10 distinct accounts we observed this year.

Most active participants

PR, issue, comment & review events in the past year.

Packages

11
PackageVersionDownloads · 30dTrend · 30d
adkv0.0.7
v0.0.7
≥79
genaiv0.0.9
v0.0.9
≥1.7K
genkitv1.9.1-rc.0
v1.9.1-rc.0
≥467.3K
langchainv2.0.0-dev-1765937705265
v2.0.0-dev-1765937705265
≥7.3M
v1.9.0
≥148.2K
v1.9.0
≥14.3K
v1.9.0
≥1.4K
v1.9.0
≥153.1K
v1.9.0
≥618
v1.9.0
≥10.7K
v1.15.0
≥722

README badges

Embed a badge in your README or website.

Live mentions · last 30 days
googleapis/genai-toolbox mentions in the last 30 days