Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ cython_debug/
config.json
test_*.py
debug_*.py
# But always track the real test suite under tests/.
!tests/test_*.py

# macOS
.DS_Store
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,39 @@ Configure your MCP client to connect to this server. Example configuration for v
- `validate_monitor_config`: Validate monitor configuration
- `get_monitor_history`: Get monitor execution history and metrics

### Generic API Tools
- `api_call`: Execute raw, authenticated HTTP requests to any Sumo Logic API endpoint (useful for fallback or unsupported APIs)

## CLI Subcommand

This MCP server package also exposes an `api` CLI subcommand (similar to GitHub CLI's `gh api`) that lets you execute authenticated and rate-limited HTTP requests to Sumo Logic directly from your terminal. It reuses the credentials configured in your environment or configuration files.

### Syntax
```bash
python -m sumologic_mcp api <PATH> [OPTIONS]
```

### Examples
```bash
# List all users (defaults to GET)
python -m sumologic_mcp api "/v1/users"

# Create a folder (using -X POST)
python -m sumologic_mcp api "/v1/folders" -X POST --body '{"name": "New Folder", "parentId": "0000000000000001"}'

# Delete a collector (using -X DELETE)
python -m sumologic_mcp api "/v1/collectors/10002" -X DELETE

# Get with query parameters
python -m sumologic_mcp api "/v1/collectors" -p "limit=5" -p "offset=0"
```

### Options
* `-X, --method`: HTTP Method (GET, POST, PUT, DELETE, PATCH). Defaults to `GET`.
* `-b, --body`: JSON string request body for write requests.
* `-p, --param`: Query parameters in `KEY=VALUE` format (can be specified multiple times).
* `-H, --header`: Custom headers in `KEY=VALUE` or `KEY:VALUE` format (can be specified multiple times).

## Development

### Setup Development Environment
Expand Down
Loading