Log Insight MCP Server
A server that bridges MCP-compatible clients to VMware Log Insight, enabling natural-language log querying and analysis.
README
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.
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
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.