A Model Context Protocol server that connects to Google Cloud services to provide context and tools for interacting with your Google Cloud resources.
Supported services:
Servers in development:
Query and filter log entries from Google Cloud Logging:
Interact with Google Cloud Spanner databases:
Retrieve and analyse metrics from Google Cloud Monitoring:
Analyse distributed traces from Google Cloud Trace:
This server supports two methods of authentication with Google Cloud:
Service Account Key File (Recommended): Set the GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of your service account key file. This is the standard Google Cloud authentication method.
Environment Variables: Set GOOGLE_CLIENT_EMAIL
and GOOGLE_PRIVATE_KEY
environment variables directly. This is useful for environments where storing a key file is not practical.
The server will also use the GOOGLE_CLOUD_PROJECT
environment variable if set, otherwise it will attempt to determine the project ID from the authentication credentials.
# Clone the repository
git clone https://github.com/krzko/google-cloud-mcp.git
cd google-cloud-mcp
# Install dependencies
pnpm install
# Build
pnpm build
Authenticate to Google Cloud:
gcloud auth application-default login
Configure the mcpServers
in your client:
{
"mcpServers": {
"google-cloud-mcp": {
"command": "node",
"args": [
"/Users/foo/code/google-cloud-mcp/dist/index.js"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json"
}
}
}
}
# Build the project
pnpm build
# Start the server
pnpm start
# Build the project
pnpm build
# Start the server and inspector
npx -y @modelcontextprotocol/inspector node dist/index.js
This server can be deployed and used with Smithery. The server implements lazy loading of authentication, which means it will start immediately and defer authentication until it's actually needed. Authentication is still required for operation, but this approach prevents timeouts during server initialization.
NOTE: Smithery local server support is currently in development and may not yet available.
If you encounter timeout issues when running the server with Smithery, try the following:
debug: true
in your configurationlazyAuth: true
is set to defer authentication until it's actually neededImportant: Authentication is still required for operation, but with lazy loading enabled, the server will start immediately and authenticate when needed rather than during initialization.
The server supports two methods of authentication:
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of your service account key fileGOOGLE_CLIENT_EMAIL
and GOOGLE_PRIVATE_KEY
environment variablesIf you're having authentication issues, make sure:
Seamless access to top MCP servers powering the future of AI integration.