mcpField
M
MCP Sumo Logic

MCP Sumo Logic

Local
github.com/samwang0723Cloud & Infra11Updated 34w ago

About MCP Sumo Logic

MCP Sumo Logic is a server for searching logs through the Sumo Logic API. It supports custom queries and optional time bounds, with Docker deployment available.

Key features

  1. 01Search logs with custom queries
  2. 02Set search time ranges
  3. 03Error handling and detailed logs
  4. 04Docker deployment

Use cases

  1. 01Investigate logs with a query
  2. 02Limit searches to a time window

MCP support

It exposes the `search-sumologic` tool to MCP clients, accepting a query and optional start and end times.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"sumologic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"build"
]
}
}
}
Run commanddocker run -i --rm build

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocibuild

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MseeP.ai Security Assessment Badge

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://{host}/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={index} | 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

Makefile

Common tasks are available via make:

CommandDescription
make installInstall dependencies
make buildBuild the project
make startStart the server
make devStart in development mode (auto-reload)
make cleanRemove dist/ and node_modules/
make lintRun ESLint
make testRun tests
make docker-buildBuild Docker image
make docker-runRun container with .env file on port 3006
make docker-composeStart services via Docker Compose
make docker-downStop Docker Compose services

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.