An MCP server for Google Cloud Spanner

An MCP server for Google Cloud Spanner

mcp-server-spanner•byk65miyazakiy

An open-source Model Context Protocol server that lets AI assistants interact with a Google Cloud Spanner database through SQL query and schema tools.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Runs SELECT queries against the Spanner database.
  • •Runs INSERT, UPDATE and DELETE statements.
  • •Executes DDL statements such as creating or altering tables.
  • •Lists database tables and shows the structure of a given table.

BEST FOR

  • •Letting AI assistants query and inspect a local Spanner emulator database.
  • •Read-only data exploration through the read_query and describe_table tools.

ABOUT MCP-SERVER-SPANNER

An MCP server for Google Cloud Spanner is cataloged as an MCP server attributed to k65miyazakiy. An open-source Model Context Protocol server that lets AI assistants interact with a Google Cloud Spanner database through SQL query and schema tools. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for An MCP server for Google Cloud Spanner are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What types of SQL statements can the server run?

The server supports SELECT queries, INSERT/UPDATE/DELETE statements, and DDL statements such as CREATE TABLE and ALTER TABLE.

Can it connect to a production Spanner instance?

No, currently the tool only supports connecting to a Spanner emulator.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 5a3309ddb9bb · 采集于 2026-11-13 11:36:38 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Server for Spanner

MCP Server for Spanner は、Google Cloud Spanner データベースに接続し、SQL クエリを実行するための Model Context Protocol (MCP) サーバーです。主に AI アシスタントなどが Spanner データベースとの対話を行うためのツールとして機能します。

機能

  • SELECT クエリの実行
  • データ更新 (INSERT, UPDATE, DELETE) クエリの実行
  • DDL (CREATE TABLE, ALTER TABLE など) クエリの実行
  • テーブル一覧の取得
  • テーブル構造の詳細表示

インストール

前提条件

  • Node.js 22 以上
  • Spanner エミュレータ もしくは devcontainer を利用可能な環境

セットアップ

# リポジトリのクローン
git clone <repository-url>
cd mcp-server-spanner

# 依存関係のインストール
npm install

# TypeScriptのビルド
npm run build

注: 現在のところ、このツールは Spanner エミュレータへの接続のみをサポートしています。

使用方法

MCP サーバーの一般的な起動方法に準じます。 ここでは、具体的な利用例として Claude Desktop での利用方法と、開発用の MCP Inspector を利用した方法を記載します。

Claude Desktop での設定方法(Mac/Linux)

Claude Desktop の設定より、次の設定の Spanner エミュレータの接続情報部分を編集し、追加します。

    "spanner": {
      "command": "bash",
      "args": [
        "YOUR_LOCAL_REPOSITORY_ROOT/bin/mcp-server-spanner",
        "--project-id=YOUR_PROJECT_ID",
        "--instance-id=YOUR_INSTANCE_ID",
        "--database-id=YOUR_DATABASE_ID",
        "--api-endpoint=localhost:9010"
      ],
    }

その後、Claude Desktop を再起動してください。

提供されるツール

MCP サーバーとして以下のツールを提供します:

  1. read_query: SELECT クエリを実行
  2. list_tables: データベースのテーブル一覧を取得
  3. describe_table: 指定されたテーブルの構造を表示
  4. execute_ddl: DDL クエリを実行
  5. execute_write: 更新系 (INSERT, UPDATE, DELETE) クエリを実行

環境変数

環境変数説明デフォルト値
PROJECT_IDGoogle Cloud Project IDdev-project
INSTANCE_IDSpanner Instance IDdev-instance
DATABASE_IDSpanner Database IDdev-database
API_ENDPOINTSpanner API エンドポイント (エミュレータ用)spanner-emulator:9010
SPANNER_EMULATOR_HOSTSpanner エミュレータのホスト(API_ENDPOINT から自動設定)

開発者向け情報

devcontainer での環境構築

本リポジトリは devcontainer での開発に対応しています。 VSCode で本リポジトリをクローン後、コンテナで開いてください。

devcontainer コンテナおよび Spanner エミュレータ、インスタンスおよびデータベースを自動で設定します。

インスペクタの使用

シェルから次のコマンドを実行します。

# MCPプロトコル形式でサーバーを起動
npm run inspect

使用する Spanner エミュレータのエンドポイントは環境変数で指定できます:

# 環境変数で接続情報を指定する例
export PROJECT_ID=your-project-id
export INSTANCE_ID=your-instance-id
export DATABASE_ID=your-database-id
export API_ENDPOINT=localhost:9010
npm run inspect

ライセンス

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for An MCP server for Google Cloud Spanner from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-spanner)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage