Skip to main content
Glama
swen128

Google Cloud Logging MCP Server

by swen128

Google Cloud Logging MCP Server

A Model Context Protocol (MCP) server that provides access to Google Cloud Logging. This server allows AI assistants to query, search, and analyze logs from Google Cloud Platform projects.

Features

  • Query Logs: Search and filter logs across GCP projects

  • Get Log Details: Retrieve detailed information about specific log entries

  • List Projects: List available GCP projects

Related MCP server: GCP MCP Server

Getting Started

Prerequisites

  • Bun runtime

  • Google Cloud credentials configured

  • Access to Google Cloud Logging API

Quick Start

  1. Install dependencies:

    bun install
  2. Set up Google Cloud credentials:

    # Option 1: Use gcloud CLI
    gcloud auth application-default login
    
    # Option 2: Use service account
    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
  3. Set your project ID:

    export GOOGLE_CLOUD_PROJECT="your-project-id"
  4. Run the server:

    bun run start

Using with Claude Desktop

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "cloud-logging": {
      "command": "bun",
      "args": ["run", "/path/to/cloud-logging-mcp/src/main.ts"],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "your-project-id"
      }
    }
  }
}

Example Tool Usage

Query Logs

Search and filter logs from Google Cloud Logging.

{
  "tool": "queryLogs",
  "input": {
    "projectId": "my-project",
    "filter": "resource.type=\"cloud_run_revision\" AND severity>=ERROR",
    "orderBy": {
      "timestamp": "desc"
    },
    "pageSize": 50
  }
}

Parameters:

  • projectId: GCP project ID

  • filter: Log filter query (follows GCP logging query syntax)

  • orderBy: Sort order for results

  • pageSize: Number of results per page

  • pageToken: Token for pagination

  • resourceNames: Specific log resources to query

  • summaryFields: Fields to include in the summary

Get Log Detail

Retrieve complete details for a specific log entry.

{
  "tool": "getLogDetail",
  "input": {
    "projectId": "my-project",
    "logId": "65f5a7b60000000001234567"
  }
}

Parameters:

  • projectId: GCP project ID

  • logId: The unique identifier of the log entry

List Projects

List all accessible Google Cloud projects.

{
  "tool": "listProjects",
  "input": {}
}

Parameters: None

Common Filter Examples

  • By severity: severity>=ERROR

  • By time range: timestamp>="2024-01-01T00:00:00Z"

  • By resource: resource.type="cloud_run_revision"

  • By text search: textPayload:"connection timeout"

  • Combined: resource.type="k8s_container" AND severity=ERROR AND timestamp>="2024-01-01T00:00:00Z"

Troubleshooting

  1. Authentication errors: Ensure your Google Cloud credentials are properly configured

  2. Permission errors: Check that your account has the logging.logEntries.list permission

  3. No results: Verify your filter syntax and that logs exist for your query

Development

# Run tests
bun test

# Type checking
bun run typecheck

# Linting
bun run lint

# Format code
bun run format

Architecture

The server follows a clean architecture pattern:

  • /adapter: External service integrations (Google Cloud APIs)

  • /domain: Core business logic and data models

  • /port: Interface definitions and MCP tool handlers

  • /util: Utility functions and helpers

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.

  • 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.

  • Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.

  • 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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Google Cloud Platform services for log analysis and root cause investigation. Provides tools to query Cloud Logging, detect error patterns, and perform real-time log streaming across multiple GCP projects.
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Enables interaction with Google Cloud services including billing cost analysis, log querying, and metrics monitoring through natural language commands. Provides comprehensive tools for managing GCP resources, analyzing costs, detecting anomalies, and retrieving operational insights.
    40
    1
    Apache 2.0
  • A
    license
    C
    quality
    D
    maintenance
    Enables 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.
    9
    9,698
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swen128/cloud-logging-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server