test_gcp_auth
Verify Google Cloud Platform authentication credentials to ensure secure access for managing Compute Engine, Cloud Run, Storage, and BigQuery services through the MCP interface.
Instructions
Test GCP authentication
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/gcp-mcp-server/main.py:93-109 (handler)The primary handler for the 'test_gcp_auth' tool. It is decorated with @mcp.tool(), which registers it with the MCP server. The function tests GCP authentication by listing Cloud Storage buckets using shared client instances.@mcp.tool() def test_gcp_auth() -> str: """Test GCP authentication""" try: # Get clients from client_instances module instead of context clients = client_instances.get_clients() # Test if we can list storage buckets if hasattr(clients, "storage"): try: buckets = list(clients.storage.list_buckets(max_results=5)) return f"Authentication successful. Found {len(buckets)} buckets. {buckets}" except Exception as e: return f"Storage authentication failed: {str(e)}" except Exception as e: return f"Authentication failed: {str(e)}"