GCP MCP Server
これは準備完了のMCPサーバーではありません
GCP MCP サーバー
Google Cloud Platform (GCP) サービス向けの包括的な Model Context Protocol (MCP) サーバー実装。これにより、AI アシスタントは標準化されたインターフェースを通じて GCP リソースと対話し、管理できるようになります。
概要
GCP MCP サーバーは、AI アシスタントに次の機能を提供します。
GCP リソースのクエリ: クラウド インフラストラクチャに関する情報を取得します
クラウド リソースの管理: GCP サービスの作成、構成、管理
サポートを受ける: GCP の構成とベスト プラクティスに関する AI ガイド付きのサポートを受ける
この実装は MCP 仕様に準拠しており、AI システムが安全かつ制御された方法で GCP サービスと対話できるようにします。
Related MCP server: gcloud MCP Cloud Run
サポートされている GCP サービス
この実装には、次の GCP サービスのサポートが含まれます。
Artifact Registry : コンテナとパッケージの管理
BigQuery : データウェアハウスと分析
クラウド監査ログ: ログ記録と監査証跡の分析
Cloud Build : CI/CD パイプライン管理
Cloud Compute Engine : 仮想マシンインスタンス
クラウド モニタリング: メトリクス、アラート、ダッシュボード
Cloud Run : サーバーレスコンテナのデプロイメント
クラウドストレージ:オブジェクトストレージ管理
建築
プロジェクトは次のように構成されています。
gcp-mcp-server/
├── core/ # Core MCP server functionality auth context logging_handler security
├── prompts/ # AI assistant prompts for GCP operations
├── services/ # GCP service implementations
│ ├── README.md # Service implementation details
│ └── ... # Individual service modules
├── main.py # Main server entry point
└── ...主なコンポーネント:
サービスモジュール: 各 GCP サービスには、リソース、ツール、プロンプトを含む独自のモジュールがあります。
クライアントインスタンス: 認証とリソースアクセスのための集中クライアント管理
コアコンポーネント: MCP サーバー実装の基本機能
はじめる
前提条件
Python 3.10以上
使用したいサービス用の API が有効になっている GCP プロジェクト
認証済みの GCP 認証情報(アプリケーションのデフォルト認証情報を推奨)
インストール
リポジトリをクローンします。
git clone https://github.com/yourusername/gcp-mcp-server.git cd gcp-mcp-server仮想環境をセットアップします。
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate依存関係をインストールします:
pip install -r requirements.txtGCP 資格情報を設定します。
# Using gcloud gcloud auth application-default login # Or set GOOGLE_APPLICATION_CREDENTIALS export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"環境変数を設定します。
cp .env.example .env # Edit .env with your configuration
サーバーの実行
MCP サーバーを起動します。
python main.py開発とテストの場合:
# Development mode with auto-reload
python main.py --dev
# Run with specific configuration
python main.py --config config.yamlDocker デプロイメント
Docker でビルドして実行します。
# Build the image
docker build -t gcp-mcp-server .
# Run the container
docker run -p 8080:8080 -v ~/.config/gcloud:/root/.config/gcloud gcp-mcp-server構成
サーバーは環境変数または構成ファイルを通じて構成できます。
環境変数 | 説明 | デフォルト |
| デフォルトの GCP プロジェクト ID | なし(必須) |
| デフォルトの地域/ゾーン |
|
| サーバーポート |
|
| ログレベル |
|
設定オプションの完全なリストについては、 .env.example参照してください。
発達
新しい GCP サービスの追加
services/ディレクトリに新しいファイルを作成する既存のサービスのパターンに従ってサービスを実装する
main.pyでサービスを登録する
詳細な実装ガイダンスについては、サービスの README を参照してください。
セキュリティに関する考慮事項
サーバーは認証にアプリケーションのデフォルト認証情報を使用します
承認は認証されたIDの権限によって決定されます
サービス実装に資格情報がハードコードされていない
適切な権限を持つサービス アカウントで実行することを検討してください
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
謝辞
包括的なAPIを提供するGoogle Cloud Platformチーム
AIがサービスと対話するための標準化された方法を提供するモデルコンテキストプロトコル
サーバーの使用
このサーバーを使用するには:
GCPサービスアカウントキーファイルを
service-account.jsonとして同じディレクトリに配置します。MCP パッケージをインストールします:
pip install "mcp[cli]"必要な GCP パッケージをインストールします:
pip install google-cloud-run実行:
mcp dev gcp_cloudrun_server.py
または、Claude Desktop にインストールします。
mcp install gcp_cloudrun_server.py --name "GCP Cloud Run Manager"MCP サーバーの構成
GCP Cloud Tools の構成ファイルに次の構成を追加できます。
"mcpServers": {
"GCP Cloud Tools": {
"command": "uv",
"args": [
"run",
"--with",
"google-cloud-artifact-registry>=1.10.0",
"--with",
"google-cloud-bigquery>=3.27.0",
"--with",
"google-cloud-build>=3.0.0",
"--with",
"google-cloud-compute>=1.0.0",
"--with",
"google-cloud-logging>=3.5.0",
"--with",
"google-cloud-monitoring>=2.0.0",
"--with",
"google-cloud-run>=0.9.0",
"--with",
"google-cloud-storage>=2.10.0",
"--with",
"mcp[cli]",
"--with",
"python-dotenv>=1.0.0",
"mcp",
"run",
"C:\\Users\\enes_\\Desktop\\mcp-repo-final\\gcp-mcp\\src\\gcp-mcp-server\\main.py"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "C:/Users/enes_/Desktop/mcp-repo-final/gcp-mcp/service-account.json",
"GCP_PROJECT_ID": "gcp-mcp-cloud-project",
"GCP_LOCATION": "us-east1"
}
}
}構成の詳細
この構成では、次の内容で Google Cloud Platform ツール用の MCP サーバーをセットアップします。
コマンド:
uvパッケージ マネージャーを使用してサーバーを実行します依存関係: さまざまな Google Cloud ライブラリ (Artifact Registry、BigQuery、Cloud Build など) が含まれます
環境変数:
GOOGLE_APPLICATION_CREDENTIALS: GCP サービス アカウントの認証情報へのパスGCP_PROJECT_ID: Google Cloud プロジェクト IDGCP_LOCATION: GCPリージョン(us-east1)
使用法
GCP Cloud Tools 機能を有効にするには、この構成を MCP 構成ファイルに追加します。
Available Tools
1 tooltest_gcp_authC
Test GCP authentication
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'test_gcp_auth' has a clear and distinct purpose that cannot be mistaken for any other tool in this set.
The naming pattern is perfectly consistent as there is only one tool. It follows a verb_noun structure ('test_gcp_auth'), and with no other tools to compare, there are no deviations or inconsistencies in naming conventions.
The tool count of 1 is too few for a server named 'GCP MCP Server', which suggests a broad scope covering Google Cloud Platform services. A single authentication test tool is insufficient for meaningful interaction with GCP resources, making this a significant mismatch in scope.
The tool surface is severely incomplete for a GCP server. It only provides an authentication test, lacking any operations for core GCP services like compute, storage, databases, or management. This leaves major gaps that will prevent agents from performing useful tasks in the domain.
Maintenance
Related MCP Connectors
The Google Compute Engine MCP server is a fully-managed Model Context Protocol server that provides tools to manage Google Compute Engine resources through AI agents. It enables capabilities including instance management (creating, starting, stopping, resetting, listing), disk management, handling instance templates and group managers, viewing machine and accelerator types, managing images, and accessing reservation and commitment information. The server operates as a zero-deployment, enterprise-grade endpoint at https://compute.googleapis.com/mcp with built-in IAM-based security.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Hosted BigQuery MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI assistants to interact with Google Cloud Platform resources through natural language queries. Supports querying and managing GCP services like Compute Engine, Cloud Storage, BigQuery, and more across multiple projects and regions.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Cloud Platform services through gcloud CLI commands via a Cloud Run deployed MCP server. Supports executing gcloud commands and managing GCP resources through natural language.MIT
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants to interact with and manage Google Cloud Platform resources including Artifact Registry, BigQuery, Cloud Build, Compute Engine, Cloud Run, Cloud Storage, and monitoring services through a standardized MCP interface.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables management of Google Cloud services including BigQuery, Cloud Logging, Cloud Storage, and Compute Engine via MCP tools.262 PyPIMIT