test_gcp_auth
Verify Google Cloud Platform authentication credentials to ensure secure access to GCP 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 handler function for the 'test_gcp_auth' tool. It tests GCP authentication by attempting to list storage buckets using the initialized GCP clients. The @mcp.tool() decorator registers it with the FastMCP server.@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)}"