LogSentry MCP

LogSentry MCP

Enables AI-powered centralized log monitoring and Q\&A for GCP Java microservices, allowing log query, service health checks, and anomaly detection through MCP tools.

Category
Visit Server

README

LogSentry

AI-powered, centralized log-monitoring and Q&A for a fleet of 90+ GCP Java (log4j) microservices.

LogSentry adds three things on top of Google Cloud Logging:

  1. MCP server — read-only tools for log query, service health, and anomaly detection.
  2. AI monitoring agent — scheduled loop that inspects logs via those tools and decides whether to alert.
  3. Google Chat integration — pushes proactive alerts and answers support questions interactively.

Anomaly thresholds are fully parameter-driven (config/thresholds.yaml + env), so tuning needs no code change.

New here? Read SETUP.md — a beginner-to-expert guide for local setup, local testing with examples, and step-by-step Google Cloud deployment.

See BUILD_SPEC.md for the full specification.

Tech stack

TypeScript (Node 20+) · @modelcontextprotocol/sdk · @google-cloud/logging + @google-cloud/bigquery · @google-cloud/pubsub · @anthropic-ai/sdk · express · zod + dotenv · vitest + nock · Cloud Run + Cloud Scheduler.

Quick start (local, no cloud needed)

npm install
npm run build           # tsc strict, must be clean
npm test                # all unit + integration (mocked)
npm run test:cov        # coverage gate >85% on core modules

Copy .env.example to .env and fill in values for runtime use.

Local smoke tests

MCP (stdio):

MCP_TRANSPORT=stdio npm run mcp
# another terminal:
npx @modelcontextprotocol/inspector node dist/mcp/server.js

Chat bot:

npm run dev
curl -s localhost:8080/health        # -> {"status":"ok"}
curl -s -X POST localhost:8080/chat -H 'content-type: application/json' \
  -d '{"type":"MESSAGE","message":{"text":"is payment-service healthy?"}}'

Agent dry-run (read-only, safe):

DRY_RUN=1 npm run monitor:once       # logs the decision, does NOT post to Chat

Deployment

Scripts in scripts/ are idempotent and support DRY_RUN=1 (echo instead of execute). Run in order:

Script Purpose
01-setup-logging-sink.sh BigQuery dataset + log sink routing severity>=WARNING to BigQuery (cost lever)
02-setup-pubsub.sh Topic + sink for near-real-time agent triggering (optional)
03-setup-bigquery.sh Dataset/table + view normalizing the export schema into the LogEntry shape
04-deploy-cloudrun.sh Build container, create viewer-only runtime SA, deploy, print URL
05-setup-scheduler.sh Cloud Scheduler job hitting POST /monitor every MONITOR_INTERVAL_MINUTES (OIDC)

Full step-by-step deployment, including Google Chat bot registration, is in SETUP.md.

Safety guardrails

  • Read-only everywhere — no tool, query, or script writes to production. assertReadOnly guards BigQuery.
  • Query capsquery_logs hard-caps at MAX_LOGS_PER_QUERY (500) and windows at 24h.
  • Least-privilege SAroles/logging.viewer, roles/bigquery.dataViewer, roles/bigquery.jobUser only.
  • Alert dedup + cooldown — prevents alert storms.
  • Log tiering — only severity>=WARNING exported to BigQuery; INFO/DEBUG stay in the cheaper default bucket. Ultra-chatty INFO logs can be sampled at the log4j appender level if volume becomes a problem.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured