Supports environment variable configuration through .env files for setting up GCP project details, locations, server ports, and other configuration parameters.
Provides tools for querying and managing GCP resources including Artifact Registry, BigQuery, Cloud Audit Logs, Cloud Build, Compute Engine, Cloud Monitoring, Cloud Run, and Cloud Storage, enabling operations like container management, data warehousing, logging analysis, CI/CD pipeline management, VM provisioning, metrics monitoring, and serverless deployments.
This is not a Ready MCP Server
GCP MCP Server
A comprehensive Model Context Protocol (MCP) server implementation for Google Cloud Platform (GCP) services, enabling AI assistants to interact with and manage GCP resources through a standardized interface.
Overview
GCP MCP Server provides AI assistants with capabilities to:
Query GCP Resources: Get information about your cloud infrastructure
Manage Cloud Resources: Create, configure, and manage GCP services
Receive Assistance: Get AI-guided help with GCP configurations and best practices
The implementation follows the MCP specification to enable AI systems to interact with GCP services in a secure, controlled manner.
Supported GCP Services
This implementation includes support for the following GCP services:
Artifact Registry: Container and package management
BigQuery: Data warehousing and analytics
Cloud Audit Logs: Logging and audit trail analysis
Cloud Build: CI/CD pipeline management
Cloud Compute Engine: Virtual machine instances
Cloud Monitoring: Metrics, alerting, and dashboards
Cloud Run: Serverless container deployments
Cloud Storage: Object storage management
Architecture
The project is structured as follows:
Key components:
Service Modules: Each GCP service has its own module with resources, tools, and prompts
Client Instances: Centralized client management for authentication and resource access
Core Components: Base functionality for the MCP server implementation
Getting Started
Prerequisites
Python 3.10+
GCP project with enabled APIs for the services you want to use
Authenticated GCP credentials (Application Default Credentials recommended)
Installation
Clone the repository:
git clone https://github.com/yourusername/gcp-mcp-server.git cd gcp-mcp-serverSet up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtConfigure your GCP credentials:
# Using gcloud gcloud auth application-default login # Or set GOOGLE_APPLICATION_CREDENTIALS export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"Set up environment variables:
cp .env.example .env # Edit .env with your configuration
Running the Server
Start the MCP server:
For development and testing:
Docker Deployment
Build and run with Docker:
Configuration
The server can be configured through environment variables or a configuration file:
Environment Variable | Description | Default |
| Default GCP project ID | None (required) |
| Default region/zone |
|
| Server port |
|
| Logging level |
|
See .env.example
for a complete list of configuration options.
Development
Adding a New GCP Service
Create a new file in the
services/
directoryImplement the service following the pattern in existing services
Register the service in
main.py
See the services README for detailed implementation guidance.
Security Considerations
The server uses Application Default Credentials for authentication
Authorization is determined by the permissions of the authenticated identity
No credentials are hardcoded in the service implementations
Consider running with a service account with appropriate permissions
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature
)Commit your changes (
git commit -m 'Add some amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Google Cloud Platform team for their comprehensive APIs
Model Context Protocol for providing a standardized way for AI to interact with services
Using the Server
To use this server:
Place your GCP service account key file as
service-account.json
in the same directoryInstall the MCP package:
pip install "mcp[cli]"
Install the required GCP package:
pip install google-cloud-run
Run:
mcp dev gcp_cloudrun_server.py
Or install it in Claude Desktop:
MCP Server Configuration
The following configuration can be added to your configuration file for GCP Cloud Tools:
Configuration Details
This configuration sets up an MCP server for Google Cloud Platform tools with the following:
Command: Uses
uv
package manager to run the serverDependencies: Includes various Google Cloud libraries (Artifact Registry, BigQuery, Cloud Build, etc.)
Environment Variables:
GOOGLE_APPLICATION_CREDENTIALS
: Path to your GCP service account credentialsGCP_PROJECT_ID
: Your Google Cloud project IDGCP_LOCATION
: GCP region (us-east1)
Usage
Add this configuration to your MCP configuration file to enable GCP Cloud Tools functionality.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables AI assistants to interact with and manage Google Cloud Platform resources including Compute Engine, Cloud Run, Storage, BigQuery, and other GCP services through a standardized MCP interface.
Related MCP Servers
- AsecurityFlicenseAqualityEnables AI assistants to interact with Confluence Cloud for managing spaces, pages, and content via the Model Context Protocol (MCP).Last updated -1115
- -securityAlicense-qualityAn MCP server that enables AI assistants to access and interact with Google Classroom data, allowing users to view courses, course details, and assignments through natural language commands.Last updated -7541MIT License
- AsecurityAlicenseAqualityEnables MCP-compatible AI agents to deploy applications to Google Cloud Run by providing tools for deploying code, listing services, and managing Google Cloud projects.Last updated -8122386Apache 2.0
- -securityAlicense-qualityA comprehensive utility MCP server that enables AI assistants to execute system commands, manage files, integrate with Google Sheets and Tasks, perform AI-powered text processing, and load dynamic prompts from markdown files.Last updated -MIT License