queryLogsLABSCO SUMMARY
An agent can go from an error report to the log line behind it.
It keeps GCP's own filter language rather than inventing one, so a filter you would paste into the console works here — and the entry that matters comes back whole instead of flattened into a summary.
What it is
A reader for Google Cloud Logging. Queries take GCP's own filter syntax with sort order, page size and pagination, and any single entry can be pulled back complete by id. It authenticates with the Google Cloud credentials already on the machine.
What you get
- Logs queried across a project using GCP logging filter syntax
- Sort order, page size and page tokens for working through large result sets, plus a choice of summary fields
- Specific log resources targeted rather than the whole project
- One log entry retrieved in full, by id
- The GCP projects you have access to, listed
Requirements
The Bun runtime, access to the Cloud Logging API, and Google credentials already in place — either gcloud application-default login or a service account file. A default project is set in the server's environment.
Setup effort
Build from source — git clone https://github.com/swen128/cloud-logging-mcp.git
USE CASES
Finding the errors behind a spike
Pick the project, then query with a severity and resource-type filter — the same expression you would use in the console.
Reading one entry properly after the search narrowed it
Take the id off the result and pull the complete entry, payload and all, rather than working from the summary fields.
Working through more results than one page holds
Set the page size, then follow the page token, so a wide time window is walked rather than truncated.
Checking a service that lives in another project
List the projects your credentials reach and run the same query against the right one.
3 tools
Listed in project docs. Your client may show a different list.
getLogDetaillistProjectsBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
Requires
Bun
Optional
GOOGLE_APPLICATION_CREDENTIALS in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/swen128/cloud-logging-mcp.git
cd cloud-logging-mcp
bun installMCP Clients
Claude Desktop
{
"mcpServers": {
"cloud-logging": {
"command": "bun",
"args": [
"run",
"<YOUR_PATH_TO_CLOUD_LOGGING_MCP>/src/main.ts"
],
"env": {
"GOOGLE_CLOUD_PROJECT": "<YOUR_GOOGLE_CLOUD_PROJECT>"
}
}
}
}The configuration on this page does not set GOOGLE_APPLICATION_CREDENTIALS; the project's instructions set it with an export line. An app opened from its icon or dock does not see variables exported in a terminal, so to supply GOOGLE_APPLICATION_CREDENTIALS, use the block's "env" section.