macOS: BigQuery MCP `browse_table` blocked in Read-Only Safe Mode

オープン 初心者向け
#4,385 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
google-cloud, sql, swift
領域
database

調査の方向性

apple/TablePro/Core/MCP/Protocol/Tools/DataTools.swift の BrowseTableTool(93-119 行)と BigQueryQueryBuilder.swift の BigQuery ビルダー(110-166 行)から始め、タグ付きの BIGQUERY_BROWSE: リクエストに注目してください。次に DefaultExecutionGate.swift の DefaultExecutionGate(60-85 行)と BigQueryPluginDriver+Execution.swift の SELECT レンダリング(281-287 行)を読んでください。issue のオフライン statement-scanner チェックで再現し、タグ付きリクエストとレンダリングされた SQL の層を比較してください。読み取り専用のブラウズが 1 行を返し、書き込みブロックが変わらない状態になったら完了です。

索引モデルが issue の本文から書いたものです。

説明

What happened?

With Safe Mode set to Read-Only on a BigQuery connection, MCP browse_table returned:

Cannot execute write queries: TablePro's Safe Mode is set to read-only for this connection

list_databases, list_schemas, and describe_table succeeded on the same BigQuery connection.

Steps to reproduce
  1. Connect TablePro to a BigQuery test dataset, such as sample_dataset, with a table sample_rows(id INT64) containing one row. Set the connection’s Safe Mode to Read-Only.

  2. From an approved MCP client, call browse_table with the following arguments, replacing the placeholder with the test connection’s UUID:

    {"connection_id":"<test connection UUID>","schema":"sample_dataset","table":"sample_rows","limit":1}
    
Expected behavior

The browse returns up to one row, and Read-Only Safe Mode continues to block writes.

Environment
  • TablePro: 0.87.0 (870099)
  • Platform: macOS 27.2.1, Apple Silicon
  • Database: Google BigQuery (managed service; no server version reported)
Source and offline reproduction

BrowseTableTool submits a .readQuery operation, but the BigQuery builder returns a tagged request (BIGQUERY_BROWSE: or BIGQUERY_FILTER:). DefaultExecutionGate classifies that text before the driver renders the SELECT.

The offline check generated plain and filtered browse requests with the upstream builder, normalized them with the statement scanner, and used SQLStatementClassifier.classify to grade the requests and the SQL they render. The results matched on v0.87.0 and main at c422096:

Input Statement tier
Plain or filtered BigQuery browse request .write
SELECT rendered from either request .safe

The offline check did not run the application or contact BigQuery.

主要言語
Swift
スター
6.2k
フォーク
412
平均マージ
7時間 38分
マージ済み PR(30日)
536

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TableProApp/TablePro のほかの issue

TableProApp/TablePro の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。