MCP Sumo Logic

by samwang0723

956 downloads
Not rated
GitHub

About

A Model Context Protocol server that integrates with Sumo Logic's API to perform log searches, designed for users needing to query Sumo Logic logs via an MCP-compatible client.

Details

Author
samwang0723
Downloads
956
Categories
Other

- Search Sumo Logic logs using custom queries
- Configurable time ranges for searches
- Error handling and detailed logging
- Docker support for easy deployment

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Sumo Logic
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, install dependencies (npm install), create a .env file with required environment variables, build (npm run build), and start (npm start). Alternatively, use the provided Docker setup. The server exposes a search-sumologic tool that accepts parameters query, from (optional), and to (optional).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp sumo logic": {
            "mcp-sumologic": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "mcp/sumologic",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "mcp-sumologic": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "mcp/sumologic",
            "."
        ]
    }
}

MCP Sumo Logic

A Model Context Protocol (MCP) server that integrates with Sumo Logic's API to perform log searches.

Features

- Search Sumo Logic logs using custom queries
- Configurable time ranges for searches
- Error handling and detailed logging
- Docker support for easy deployment

Environment Variables

ENDPOINT=https://api.au.sumologic.com/api/v1  # Sumo Logic API endpoint
SUMO_API_ID=your_api_id                       # Sumo Logic API ID
SUMO_API_KEY=your_api_key                     # Sumo Logic API Key

Setup

1. Clone the repository
2. Install dependencies:

   npm install

3. Create a .env file with the required environment variables
4. Build the project:
   npm run build

5. Start the server:
   npm start

Docker Setup

1. Build the Docker image:

   docker build -t mcp/sumologic .

2. Run the container (choose one method):

a. Using environment variables directly:

   docker run -e ENDPOINT=your_endpoint -e SUMO_API_ID=your_api_id -e SUMO_API_KEY=your_api_key mcp/sumologic

b. Using a .env file:

   docker run --env-file .env mcp/sumologic

Note: Make sure your .env file contains the required environment variables:

   ENDPOINT=your_endpoint
SUMO_API_ID=your_api_id
SUMO_API_KEY=your_api_key

Usage

The server exposes a search-sumologic tool that accepts the following parameters:

- query (required): The Sumo Logic search query
- from (optional): Start time in ISO 8601 format
- to (optional): End time in ISO 8601 format

Example query:

const query = '_index=app_pro_fiat_cont | json auto | fields log_identifier';
const results = await search(sumoClient, query, {
from: '2024-02-23T00:00:00Z',
to: '2024-02-24T00:00:00Z',
});

Error Handling

The server includes comprehensive error handling and logging:
- API errors are caught and logged with details
- Search job status is monitored and logged
- Network and authentication issues are properly handled

Development

To run in development mode:

npm run dev

For testing:

npm test

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.