Labsco
enesbol logo

GCP MCP Server

β˜… 6

from enesbol

Access and manage Google Cloud Platform (GCP) services and resources.

πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

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:

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
└── ...

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

Development

Adding a New GCP Service

  1. Create a new file in the services/ directory
  2. Implement the service following the pattern in existing services
  3. 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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:

  1. Place your GCP service account key file as service-account.json in the same directory
  2. Install the MCP package: pip install "mcp[cli]"
  3. Install the required GCP package: pip install google-cloud-run
  4. Run: mcp dev gcp_cloudrun_server.py

Or install it in Claude Desktop:

mcp install gcp_cloudrun_server.py --name "GCP Cloud Run Manager"