GCP MCP Server
Este no es un servidor MCP listo
Servidor MCP de GCP
Una implementación integral del servidor del Protocolo de contexto de modelo (MCP) para los servicios de Google Cloud Platform (GCP), que permite a los asistentes de IA interactuar con los recursos de GCP y administrarlos a través de una interfaz estandarizada.
Descripción general
El servidor MCP de GCP proporciona a los asistentes de IA capacidades para:
Consultar recursos de GCP : obtener información sobre su infraestructura en la nube
Administrar recursos en la nube : crear, configurar y administrar servicios de GCP
Recibir asistencia : obtenga ayuda guiada por IA con las configuraciones y las mejores prácticas de GCP
La implementación sigue la especificación MCP para permitir que los sistemas de IA interactúen con los servicios de GCP de manera segura y controlada.
Related MCP server: gcloud MCP Cloud Run
Servicios de GCP compatibles
Esta implementación incluye soporte para los siguientes servicios de GCP:
Registro de artefactos : gestión de contenedores y paquetes
BigQuery : almacenamiento y análisis de datos
Registros de auditoría en la nube : registro y análisis de registros de auditoría
Cloud Build : gestión de canalizaciones de CI/CD
Cloud Compute Engine : instancias de máquinas virtuales
Monitoreo de la nube : métricas, alertas y paneles
Cloud Run : Implementaciones de contenedores sin servidor
Almacenamiento en la nube : gestión del almacenamiento de objetos
Arquitectura
El proyecto se estructura de la siguiente manera:
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
└── ...Componentes clave:
Módulos de servicio : cada servicio de GCP tiene su propio módulo con recursos, herramientas y avisos.
Instancias de cliente : gestión centralizada de clientes para autenticación y acceso a recursos
Componentes principales : funcionalidad básica para la implementación del servidor MCP
Empezando
Prerrequisitos
Python 3.10+
Proyecto de GCP con API habilitadas para los servicios que desea utilizar
Credenciales de GCP autenticadas (se recomiendan las credenciales predeterminadas de la aplicación)
Instalación
Clonar el repositorio:
git clone https://github.com/yourusername/gcp-mcp-server.git cd gcp-mcp-serverConfigurar un entorno virtual:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstalar dependencias:
pip install -r requirements.txtConfigure sus credenciales de GCP:
# Using gcloud gcloud auth application-default login # Or set GOOGLE_APPLICATION_CREDENTIALS export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"Configurar variables de entorno:
cp .env.example .env # Edit .env with your configuration
Ejecución del servidor
Inicie el servidor MCP:
python main.pyPara desarrollo y pruebas:
# Development mode with auto-reload
python main.py --dev
# Run with specific configuration
python main.py --config config.yamlImplementación de Docker
Construir y ejecutar con 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-serverConfiguración
El servidor se puede configurar a través de variables de entorno o un archivo de configuración:
Variable de entorno | Descripción | Por defecto |
| ID de proyecto de GCP predeterminado | Ninguno (obligatorio) |
| Región/zona predeterminada |
|
| Puerto del servidor |
|
| Nivel de registro |
|
Consulte .env.example para obtener una lista completa de las opciones de configuración.
Desarrollo
Agregar un nuevo servicio de GCP
Crea un nuevo archivo en el directorio
services/Implementar el servicio siguiendo el patrón de los servicios existentes
Registrar el servicio en
main.py
Consulte el archivo README de servicios para obtener una guía de implementación detallada.
Consideraciones de seguridad
El servidor utiliza las credenciales predeterminadas de la aplicación para la autenticación
La autorización está determinada por los permisos de la identidad autenticada.
No hay credenciales codificadas en las implementaciones del servicio
Considere ejecutar con una cuenta de servicio con los permisos adecuados
Contribuyendo
¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios.
Bifurcar el repositorio
Crea tu rama de funciones (
git checkout -b feature/amazing-feature)Confirme sus cambios (
git commit -m 'Add some amazing feature')Empujar a la rama (
git push origin feature/amazing-feature)Abrir una solicitud de extracción
Licencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
Expresiones de gratitud
El equipo de Google Cloud Platform por sus API integrales
Protocolo de contexto modelo para proporcionar una forma estandarizada para que la IA interactúe con los servicios
Usando el servidor
Para utilizar este servidor:
Coloque el archivo de clave de su cuenta de servicio de GCP como
service-account.jsonen el mismo directorioInstale el paquete MCP:
pip install "mcp[cli]"Instale el paquete GCP requerido:
pip install google-cloud-runEjecutar:
mcp dev gcp_cloudrun_server.py
O instálalo en Claude Desktop:
mcp install gcp_cloudrun_server.py --name "GCP Cloud Run Manager"Configuración del servidor MCP
Se puede agregar la siguiente configuración a su archivo de configuración para 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"
}
}
}Detalles de configuración
Esta configuración configura un servidor MCP para las herramientas de Google Cloud Platform con lo siguiente:
Comando : utiliza el administrador de paquetes
uvpara ejecutar el servidorDependencias : incluye varias bibliotecas de Google Cloud (Artifact Registry, BigQuery, Cloud Build, etc.)
Variables de entorno :
GOOGLE_APPLICATION_CREDENTIALS: Ruta a las credenciales de su cuenta de servicio de GCPGCP_PROJECT_ID: Su ID de proyecto de Google CloudGCP_LOCATION: Región de GCP (us-east1)
Uso
Agregue esta configuración a su archivo de configuración de MCP para habilitar la funcionalidad de GCP Cloud Tools.
Available Tools
1 tooltest_gcp_authC
Test GCP authentication
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'test' but doesn't disclose behavioral traits like what gets tested (e.g., credentials, permissions), whether it's safe/destructive, or what output to expect. This leaves significant gaps for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise ('Test GCP authentication') with no wasted words, making it front-loaded and easy to parse. It efficiently conveys the core purpose in minimal text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (simple auth test) but lack of annotations and output schema, the description is incomplete. It doesn't explain what 'test' entails, what success/failure looks like, or any behavioral context, leaving the agent with insufficient information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add param info, but that's acceptable here, meeting the baseline for zero-param tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Test GCP authentication' states a clear purpose (testing authentication) but lacks specificity about what resource or system is being tested. It doesn't distinguish from siblings (though none exist), making it somewhat vague but functional.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool, such as during setup, troubleshooting, or validation scenarios. With no siblings, differentiation isn't needed, but general usage context is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
test_gcp_auth
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.
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
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.91,504 npmMIT
- 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.MIT