This project provides Model Control Protocol (MCP) servers for interacting with Google Cloud Platform resources.
GCP-MCP allows AI assistants and other MCP clients to interact with Google Cloud Platform services through standardized interfaces.
- uv
- Access to Google Cloud Platform with appropriate permissions
- Google Cloud SDK (for authentication)
-
Clone this repository:
git clone https://github.com/manuelbernhardt/gcp-mcp.git cd gcp-mcp
-
Install dependencies using
uv
:uv sync
-
Authenticate with Google Cloud:
gcloud auth application-default login
list_secrets
: List secrets in a GCP project (optionally filter by prefix)delete_secret
: Delete a secret from Secret Manageradd_secret
: Add or update a secret in Secret Managerget_secret_value
: Retrieve the value of a secret
list_cloud_run_services
: List Cloud Run services in a project and regiondelete_cloud_run_service
: Delete a Cloud Run serviceget_cloud_run_service_logs
: Fetch recent logs for a Cloud Run service
Create a mcp.json
file in ~/.cursor/mcp.json
:
{
"mcpServers": {
"gcp": {
"command": "uv",
"args": ["--directory", "/path/to/gcp-mcp", "run", "main.py"]
}
}
}
# Run all tests
python -m unittest discover
# Run Secret Manager tests
python -m unittest test_secret_manager.py
# Run Cloud Run tests
python -m unittest test_cloud_run.py
# Run a specific test class
python -m unittest test_secret_manager.TestSecretManagerFunctions
python -m unittest test_cloud_run.TestCloudRunFunctions
# Run a specific test
python -m unittest test_secret_manager.TestSecretManagerFunctions.test_list_secrets