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.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

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.

Upstream README

View this exact version on GitHub

README.md · 5a3309ddb9bb · Fetched 2026-11-13 11:36:38 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

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.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

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