GCP MCP Server
Provides tools for interacting with Google Cloud Platform, covering projects, billing, Compute Engine, Cloud Storage, BigQuery, Cloud SQL, Cloud Functions, Cloud Run, GKE, and Cloud Logging, plus executing custom TypeScript against GCP APIs.
Allows listing Google Kubernetes Engine clusters and retrieving detailed GKE cluster information through GCP.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
GCP MCP Server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact seamlessly with your Google Cloud Platform environment. Built with TypeScript and featuring 25+ tools across 8 major GCP service categories.
β¨ Key Features
π€ AI-Native: Natural language interface for all GCP operations
π Secure: Uses your existing GCP credentials (no external access required)
π Multi-Project: Seamlessly work across multiple GCP projects and regions
β‘ Comprehensive: 25 tools covering compute, storage, databases, serverless, and more
π οΈ Developer-Friendly: Full TypeScript implementation with excellent error handling
π Reliable: Built-in retry logic and robust error handling
π Observable: Comprehensive logging for debugging and monitoring
Related MCP server: GCP Billing and Monitoring MCP Server
π Quick Start
Prerequisites
Node.js v18 or higher
Google Cloud SDK configured with authentication
Claude Desktop, Cursor, Windsurf, or any MCP-compatible AI assistant
Installation & Setup
Authenticate with GCP:
gcloud auth application-default loginInstall via NPX (recommended):
npx gcp-mcp-serverConfigure your AI assistant:
Claude Desktop - Add to
claude_desktop_config.json:{ "mcpServers": { "gcp": { "command": "npx", "args": ["-y", "gcp-mcp-server"] } } }Cursor - Add to MCP settings:
{ "gcp": { "command": "npx", "args": ["-y", "gcp-mcp-server"] } }Windsurf - Add to
~/.windsurf/config.json:{ "mcpServers": { "gcp": { "command": "npx", "args": ["-y", "gcp-mcp-server"] } }Restart your AI assistant and start chatting with your GCP environment!
π οΈ Available Tools (25 Total)
π§ Core Management (5 tools)
Tool | Description |
| Execute custom TypeScript code against GCP APIs |
| List all accessible GCP projects |
| Select a project for subsequent operations |
| Get billing information and status |
| Get cost forecasting data |
οΏ½ Compute Engine (4 tools)
Tool | Description |
| List VM instances (by zone or all zones) |
| Get detailed instance information |
| Start a stopped instance |
| Stop a running instance |
ποΈ Cloud Storage (3 tools)
Tool | Description |
| List all storage buckets |
| List objects in a specific bucket |
| Get metadata for specific objects |
π BigQuery (3 tools)
Tool | Description |
| List all BigQuery datasets |
| List tables in a dataset |
| Execute SQL queries on BigQuery |
ποΈ Cloud SQL (2 tools)
Tool | Description |
| List all Cloud SQL instances |
| Get detailed instance information |
β‘ Cloud Functions (2 tools)
Tool | Description |
| List all Cloud Functions |
| Get detailed function information |
π Cloud Run (2 tools)
Tool | Description |
| List all Cloud Run services |
| Get detailed service information |
π’ Google Kubernetes Engine (2 tools)
Tool | Description |
| List all GKE clusters |
| Get detailed cluster information |
π Cloud Logging (2 tools)
Tool | Description |
| Query Cloud Logging with filters |
| List recent log entries |
π‘ Example Conversations
Getting Started
User: "Show me all my GCP projects"
Assistant: [Lists all accessible projects with IDs and names]
User: "Use project my-web-app-prod"
Assistant: [Selects project and shows available regions]Infrastructure Management
User: "List all running compute instances in us-west1"
Assistant: [Shows VM instances with status, machine type, and IPs]
User: "What storage buckets do I have?"
Assistant: [Lists buckets with size, location, and storage class]
User: "Show me my Cloud Run services"
Assistant: [Displays services with URLs, traffic allocation, and status]Data & Analytics
User: "What BigQuery datasets are in my project?"
Assistant: [Lists datasets with creation time and location]
User: "Query my sales table for last month's revenue"
Assistant: [Executes SQL and returns results]Cost Management
User: "What's my current billing status?"
Assistant: [Shows billing account, budget alerts, and current usage]
User: "Forecast my costs for the next 3 months"
Assistant: [Displays cost predictions based on usage trends]Troubleshooting
User: "Show me error logs from my app in the last hour"
Assistant: [Queries Cloud Logging and displays relevant errors]
User: "Why is my Cloud Function timing out?"
Assistant: [Analyzes function configuration and recent logs]ποΈ Architecture
The server is built with a clean, modular architecture:
src/
βββ types/ # TypeScript type definitions
βββ utils/ # Utilities (logging, errors, state management)
βββ tools/ # Tool definitions and handlers
β βββ definitions.ts
β βββ handlers.ts
βββ config.ts # Configuration constants
βββ server.ts # MCP server implementation
βββ index.ts # Application entry pointπ§ Development
Local Development Setup
# Clone the repository
git clone https://github.com/startupmanch/gcp-mcp-server
cd gcp-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run devAvailable Scripts
npm run dev # Development mode with auto-reload
npm run build # Production build
npm run start # Start built server
npm run test # Run test suite
npm run lint # Lint code
npm run format # Format code with Prettier
npm run clean # Clean build artifactsTesting with MCP Inspector
# Build and test with MCP Inspector
npm run build
npx @modelcontextprotocol/inspector ./bin.jsπ Requirements
Node.js: Version 18 or higher
Google Cloud SDK: Properly configured and authenticated
GCP Projects: Access to at least one GCP project with appropriate IAM permissions
Required GCP APIs
The following APIs should be enabled in your GCP project:
Cloud Resource Manager API
Compute Engine API
Cloud Storage API
BigQuery API
Cloud SQL Admin API
Cloud Functions API
Cloud Run API
Cloud Logging API
Cloud Billing API
Kubernetes Engine API
οΏ½ Security & Permissions
Required IAM Roles
Your GCP account needs the following roles (or equivalent custom roles):
roles/viewer(basic read access)roles/compute.viewer(Compute Engine resources)roles/storage.objectViewer(Cloud Storage)roles/bigquery.user(BigQuery)roles/cloudsql.viewer(Cloud SQL)roles/cloudfunctions.viewer(Cloud Functions)roles/run.viewer(Cloud Run)roles/container.viewer(GKE)roles/logging.viewer(Cloud Logging)
Security Features
Local Credentials: Uses your local GCP authentication
No External Access: All operations run locally
Principle of Least Privilege: Only requests necessary permissions
Secure by Default: No credentials stored or transmitted
π Troubleshooting
Common Issues
Authentication Errors
# Re-authenticate with GCP
gcloud auth application-default login
# Verify access
gcloud projects listPermission Denied
Verify your IAM roles include the required permissions
Check that APIs are enabled in your GCP project
Server Not Starting
Ensure Node.js v18+ is installed
Verify GCP credentials are configured
Check the server logs for specific errors
Debug Mode
Enable debug logging:
export LOG_LEVEL=debug
npx gcp-mcp-serverπ€ Contributing
We welcome contributions! Here's how to get started:
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes and add tests
Run the test suite:
npm testCommit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
Development Guidelines
Follow TypeScript best practices
Add tests for new functionality
Update documentation for new features
Follow conventional commit messages
Ensure all tests pass before submitting
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Built on the Model Context Protocol
Inspired by the amazing MCP ecosystem
Made with β€οΈ for the AI and Cloud communities
For support, feature requests, or bug reports, please open an issue on GitHub.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
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.
Interact with your Google Cloud Firestore resources using natural language commands.
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.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables 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.16MIT
- AlicenseCqualityDmaintenanceEnables interaction with Google Cloud services including billing cost analysis, log querying, and metrics monitoring through natural language commands. Provides comprehensive tools for managing GCP resources, analyzing costs, detecting anomalies, and retrieving operational insights.401Apache 2.0
- 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
- 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