Google Cloud Logging

Provides access to Google Cloud Logging for querying, detailing, and listing projects.
  • typescript

10

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

This MCP server provides access to Google Cloud Logging, letting you query logs, fetch detailed log entries, and list accessible GCP projects from a single, scripted interface.

How to use

You will run the MCP server locally or integrate it into your MCP client workflow to access Google Cloud Logging data. Use it to query logs with filters, retrieve full details for specific log entries, and enumerate the projects you can access. Start the server, point your client to it, and perform common operations like searching for error logs or inspecting individual log entries.

How to install

Prerequisites you need before starting: the Bun runtime and Google Cloud credentials configured on your machine. Ensure you can access the Google Cloud Logging API for the projects you work with.

Step by step commands to get you running:

# Install dependencies
bun install

# Set up Google Cloud credentials (choose one)
# Option 1: Use gcloud CLI
gcloud auth application-default login

# Option 2: Use a service account
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"

# Set your project ID
export GOOGLE_CLOUD_PROJECT="your-project-id"

# Run the server
bun run start

Configuration and runtime details

The server is designed to be run via a local MCP client configuration. A common local setup uses Bun to launch the MCP server executable, with the Google Cloud project injected as an environment variable.

Here is a representative runtime configuration you can use in your MCP client setup (adjust paths to your environment):

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

How to configure for Claude Desktop usage

If you use Claude Desktop, add a local MCP server entry that points to the Bun command and the start script, with the necessary environment variable for your Google Cloud project.

Example entry you can adapt in your Claude Desktop config file:

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

Tools and capabilities

This server exposes the following capabilities as MCP tools:

  • queryLogs — Search and filter Google Cloud Logging data across projects. You can specify a project, log filters, sort order, and pagination to retrieve relevant log entries.

  • getLogDetail — Retrieve full details for a specific log entry by its identifier, giving you access to the complete payload and metadata.

  • listProjects — List all accessible Google Cloud projects you can query against.

Examples of common tasks

Query for error logs in a project and order by timestamp descending, returning up to 50 results per page.

Fetch detailed information for a single log entry to inspect its payload and resources.

List all projects you can access to determine which ones you can query for logs.

Troubleshooting

Authentication issues usually indicate credentials aren’t wired correctly. Double-check that Google Cloud credentials are configured and accessible by the runtime.

Permission problems occur if your account does not have the logging.logEntries.list permission. Validate your IAM permissions for the projects you query.

If you don’t see results, verify your log filters, ensure the target projects actually contain matching logs, and confirm the client is pointing to the correct MCP server configuration.

Development

To run quality checks and improve the server, perform tests, type checking, linting, and formatting as part of your workflow.

# 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 with dedicated areas for external integrations, core domain logic, port interfaces, and utilities. This separation helps you maintain and extend the server as you add new data sources or MCP tool endpoints.

License

MIT license applies to this server.

Available tools

queryLogs

Execute log queries across Google Cloud projects with filters, ordering, and pagination to retrieve matching log entries.

getLogDetail

Fetch complete details for a specific log entry identified by its logId.

listProjects

List all Google Cloud projects accessible to the credentials in use.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational