Model Context Protocol server for Logz.io log management platform
npm install mcp-server-logzio


An unofficial\* Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Logz.io's log management platform. Includes tools for simple log search, Lucene query search, and fetching basic statistics from logz io.
\I'll be a little surprised if logz io makes an official* MCP server. Instead, they seem to be leaning heavily into integrating AI directly into their tooling, which makes sense, but doesn't give the user much flexibility over models or integration with external tools.. which is why this project exists.
Add this to your Claude/Cursor/etc configuration file:
``python`
{
"mcpServers": {
# other servers ...
"logzio": {
"command": "npx",
"args": [
"-y",
"mcp-server-logzio",
"apiKey", "YOUR_LOGZIO_API_KEY"
]
}
}
}
US is the default region. For other regions:
`python`
{
"mcpServers": {
# other servers ...
"logzio": {
"command": "npx",
"args": [
"-y",
"mcp-server-logzio",
"apiKey", "YOUR_LOGZIO_API_KEY",
"region", "eu" # add this for example
]
}
}
}
| Argument | Description | Default | Required |
|----------|-------------|---------|----------|
| apiKey | Your Logz.io API key | - | Yes |region
| | Logz.io region (us, us-west, eu, ca, au, uk) | us | No |logzioUrl
| | Custom Logz.io API URL (overrides region) | - | No |--timeout
| | Request timeout | 30000 | No |--retry-attempts
| | Retry attempts | 3 | No |--max-results
| | Max results per query | 1000 | No |
The server automatically maps region codes to the correct Logz.io API endpoints:
| Region Code | Description | API Endpoint |
|-------------|-------------|--------------|
| us | US East (default) | https://api.logz.io |us-west
| | US West | https://api-wa.logz.io |eu
| | Europe | https://api-eu.logz.io |ca
| | Canada | https://api-ca.logz.io |au
| | Australia | https://api-au.logz.io |uk
| | United Kingdom | https://api-uk.logz.io |
Finding Your Region: Log into your Logz.io account and check the URL in your browser:
- https://app.logz.io ā use region ushttps://app-eu.logz.io
- ā use region euhttps://app-ca.logz.io
- ā use region ca
- etc.
These are the tools your agent will see.
Parameters:
- query (required): Search query stringtimeRange
- : Time range (1h, 6h, 12h, 24h, 3d, 7d, 30d)from
- /to: Custom time range (ISO 8601)logType
- : Filter by log typeseverity
- : Filter by severity levellimit
- : Maximum results (1-1000)sort
- : Sort order (asc/desc)
Parameters:
- luceneQuery (required): Lucene query stringfrom
- /to: Time range (ISO 8601)size
- : Maximum results (1-1000)sort
- : Sort order (asc/desc)
Parameters:
- timeRange: Time range (1h, 6h, 12h, 24h, 3d, 7d, 30d)from
- /to: Custom time range (ISO 8601)groupBy
- : Fields to group by
- Node.js 18+
- TypeScript 5.8+
- Valid Logz.io account and API key
`bashClone the repository
git clone https://github.com/modelcontextprotocol/mcp-server-logzio.git
cd mcp-server-logzio
$3
-
npm run build - Compile TypeScript
- npm run dev - Run in development mode
- npm test - Run test suite
- npm run format - Format code with Prettier
- npm run type-check - Type check without emissionš Project Structure
`
mcp-server-logzio/
āāā src/
ā āāā api/ # Logz.io API client and types
ā āāā tools/ # MCP tool implementations
ā āāā utils/ # Utilities (logging, errors)
ā āāā config.ts # Configuration management
ā āāā server.ts # MCP server implementation
ā āāā index.ts # Entry point
āāā tests/ # Test suites
āāā examples/ # Usage examples
āāā docs/ # Documentation
āāā dist/ # Compiled output
``