mcp-sumologic
The SumoLogic MCP Server is designed to let AI agents interact with the SumoLogic API through the Model Context Protocol. It supports deployment as a Docker container and provides various tools for managing SumoLogic resources such as collectors and search jobs.
SumoLogic MCP Server
A Model Context Protocol (MCP) server for the SumoLogic API that can be deployed locally as a Docker container. This server allows AI agents to leverage MCP to interact with SumoLogic's API methods.
Features
- Packaged as a Docker container for easy deployment
- Implements the Model Context Protocol
- Provides tools for interacting with SumoLogic API endpoints
- Authentication via SumoLogic API keys
- Support for Collectors, Sources, Search Jobs, and Monitors management
Prerequisites
- Docker
- SumoLogic account with API access
- Access ID and Access Key for the SumoLogic API
Quick Start
Using Docker Hub Image (Recommended)
docker run -i --rm \
-e SUMOLOGIC_ACCESS_ID=your_access_id \
-e SUMOLOGIC_ACCESS_KEY=your_access_key \
-e SUMOLOGIC_API_ENDPOINT=https://api.us2.sumologic.com/api \
sumologic-mcp-server
Building Locally
- Clone this repository:
git clone https://github.com/greyaperez/mcp-sumologic.git
cd mcp-sumologic
- Build the Docker image:
docker build -t sumologic-mcp-server .
- Run the container:
docker run -i --rm \
-e SUMOLOGIC_ACCESS_ID=your_access_id \
-e SUMOLOGIC_ACCESS_KEY=your_access_key \
-e SUMOLOGIC_API_ENDPOINT=https://api.us2.sumologic.com/api \
sumologic-mcp-server
Environment Variables
SUMOLOGIC_ACCESS_ID
: Your SumoLogic Access IDSUMOLOGIC_ACCESS_KEY
: Your SumoLogic Access KeySUMOLOGIC_API_ENDPOINT
: The SumoLogic API endpoint for your deployment (e.g., https://api.us2.sumologic.com/api)
Integration with MCP Clients
VS Code
To use this MCP server with VS Code, add the following configuration to your .vscode/mcp.json
file:
{
"servers": {
"sumologic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SUMOLOGIC_ACCESS_ID",
"-e",
"SUMOLOGIC_ACCESS_KEY",
"-e",
"SUMOLOGIC_API_ENDPOINT",
"sumologic-mcp-server"
],
"env": {
"SUMOLOGIC_ACCESS_ID": "your_access_id",
"SUMOLOGIC_ACCESS_KEY": "your_access_key",
"SUMOLOGIC_API_ENDPOINT": "https://api.us2.sumologic.com/api"
}
}
}
}
Claude Desktop
To use this MCP server with Claude Desktop, add the following configuration to your ~/.config/Claude/claude_desktop_config.json
file:
{
"mcpServers": {
"sumologic": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SUMOLOGIC_ACCESS_ID",
"-e",
"SUMOLOGIC_ACCESS_KEY",
"-e",
"SUMOLOGIC_API_ENDPOINT",
"sumologic-mcp-server"
],
"env": {
"SUMOLOGIC_ACCESS_ID": "your_access_id",
"SUMOLOGIC_ACCESS_KEY": "your_access_key",
"SUMOLOGIC_API_ENDPOINT": "https://api.us2.sumologic.com/api"
}
}
}
}
Available Tools
The SumoLogic MCP Server provides the following tools:
check_connection
: Check if the SumoLogic API connection is workinglist_collectors
: List all SumoLogic collectorsget_collector
: Get a specific SumoLogic collector by IDcreate_hosted_collector
: Create a new hosted collector in SumoLogicupdate_collector
: Update an existing collector in SumoLogicdelete_collector
: Delete a SumoLogic collector by IDlist_sources
: List all sources in a specific SumoLogic collectorget_source
: Get a specific source from a SumoLogic collectorcreate_http_source
: Create a new HTTP source in a SumoLogic collectorstart_search_job
: Start a search job in SumoLogiccheck_search_job_status
: Check the status of a search jobget_search_job_results
: Get the results of a search joblist_monitors
: List all monitors in SumoLogicget_monitor
: Get a specific monitor by ID
Development
Local Development Setup
- Install dependencies:
npm install
- Create a
.env
file with your SumoLogic credentials:
SUMOLOGIC_ACCESS_ID=your_access_id
SUMOLOGIC_ACCESS_KEY=your_access_key
SUMOLOGIC_API_ENDPOINT=https://api.us2.sumologic.com/api
- Build the TypeScript code:
npm run build
- Run the server locally:
npm start
Adding New Tools
To add new tools for additional SumoLogic API endpoints:
- Add a new tool definition to the
sumoLogicTools
array insrc/index.ts
- Define parameters, validation, and execution logic
- Rebuild and test the server
License
GPL