Skip to main content
Glama
trevorputbrese

Log Insight MCP Server

Log Insight MCP Server

A Model Context Protocol (MCP) server that connects AI assistants like Claude to VMware Log Insight, enabling natural-language log querying and analysis.

Overview

This server acts as a bridge between MCP-compatible clients (such as Claude Code or Claude Desktop) and a VMware Log Insight instance. It exposes two tools that allow an AI assistant to query and analyze logs on your behalf:

  • query_logs — Query logs between a start and end time, with an optional keyword filter.

  • search_logs_for_errors — Search for error patterns (e.g. error, critical, exception, fatal, fail) within a time range.

The server manages authentication with Log Insight automatically, including session renewal and retry on expiry.

Related MCP server: grafana-mcp

Architecture

MCP Client (Claude)  ──HTTP POST──▶  MCP Server (:3000)  ──HTTPS──▶  Log Insight API (:9543)
                                       │
                                       ├─ /mcp      (MCP protocol endpoint)
                                       └─ /health   (health check)

Key components:

File

Role

src/index.ts

HTTP server, MCP session management

src/loginsight-client.ts

Log Insight REST API client with auth handling

src/tools/query-logs.ts

MCP tool definitions and handlers

Prerequisites

  • Node.js v18 or later

  • npm

  • A running VMware Log Insight instance accessible over the network

Local Setup

1. Clone the repository

git clone <repo-url>
cd log-insight-mcp-server

2. Install dependencies

npm install

3. Configure environment variables

Create a .env file in the project root (or copy and edit the existing one):

LOGINSIGHT_URL=https://your-loginsight-host
LOGINSIGHT_USERNAME=admin
LOGINSIGHT_PASSWORD=your-password

Variable

Required

Description

LOGINSIGHT_URL

Yes

Base URL of your Log Insight instance (e.g. https://10.10.10.119)

LOGINSIGHT_USERNAME

Yes

Log Insight user with API access

LOGINSIGHT_PASSWORD

Yes

Password for the above user

PORT

No

Server port (defaults to 3000)

The server will exit with an error if any required variable is missing.

4. Build

npm run build

This compiles TypeScript from src/ into dist/.

5. Run

Production:

npm start

Development (watch mode):

npm run dev

The server starts on http://localhost:3000. Verify it is running:

curl http://localhost:3000/health

Connecting an MCP Client

Claude Code

Add the server to your Claude Code MCP configuration:

{
  "mcpServers": {
    "log-insight": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "log-insight": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Once connected, you can ask Claude questions like:

  • "Show me all logs from the last hour"

  • "Search for errors between 2025-01-01T00:00:00Z and 2025-01-01T12:00:00Z"

  • "Find any fatal or critical log entries from yesterday"

Available Tools

query_logs

Query logs within a time range.

Parameter

Type

Required

Description

startTime

string (ISO 8601)

Yes

Start of the time range

endTime

string (ISO 8601)

Yes

End of the time range

keyword

string

No

Text to search for in log messages

limit

number (1–20000)

No

Max results to return (default: 200)

search_logs_for_errors

Search for error-pattern logs within a time range.

Parameter

Type

Required

Description

startTime

string (ISO 8601)

Yes

Start of the time range

endTime

string (ISO 8601)

Yes

End of the time range

errorPattern

string

No

Error keyword to match (default: "error")

limit

number (1–20000)

No

Max results to return (default: 500)

Cloud Foundry Deployment

Prerequisites

  • CF CLI installed and logged in (cf login)

  • Your Log Insight instance must be reachable from the CF environment

Push with inline variables

The Node.js buildpack automatically runs npm run build during staging, so no local pre-build is needed. Supply credentials at deploy time so they never appear in committed files:

cf push \
  --var loginsight-url=https://your-loginsight-host \
  --var loginsight-username=admin \
  --var loginsight-password=your-password

Push with a vars file

Alternatively, create a vars.yml file (already gitignored):

loginsight-url: https://your-loginsight-host
loginsight-username: admin
loginsight-password: your-password

Then deploy:

cf push --vars-file vars.yml

Verify

cf app log-insight-mcp
curl https://<your-app-route>/health

Scripts

Command

Description

npm start

Run the server

npm run dev

Run in watch mode (auto-restart on changes)

npm run build

Compile TypeScript to dist/

License

ISC

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/trevorputbrese/log-insight-mcp-server'

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