graylog-mcp
Enables querying Graylog log management system for messages using natural language, supporting multiple instances and flexible search parameters.
README
Graylog MCP Server
A minimal MCP (Model Context Protocol) server in JavaScript that integrates with Graylog.
Features
- JavaScript MCP server
- Tools:
fetch_graylog_messages(query Graylog and return messages) - Multi-instance support — query multiple Graylog servers from a single MCP server
Requirements
- Node.js 18+
Configuration
Configure one or more Graylog instances using numbered env vars:
| Variable | Required | Description |
|---|---|---|
GRAYLOG_BASE_URL_INSTANCE_N |
yes | Graylog base URL for instance N |
GRAYLOG_API_TOKEN_INSTANCE_N |
yes | API token for instance N |
GRAYLOG_LABEL_INSTANCE_N |
no | Human-readable label (default: instance_N) |
Replace N with 1, 2, 3, … to register as many instances as needed. Only instances with both BASE_URL and API_TOKEN set will be active.
Use with an MCP client
No installation needed — npx downloads and runs the server automatically.
Claude Code
claude mcp add graylog-mcp npx @lcaliani/graylog-mcp-server@latest \
-e GRAYLOG_BASE_URL_INSTANCE_1=http://your-graylog-production.example.com:9000 \
-e GRAYLOG_API_TOKEN_INSTANCE_1=your_production_token \
-e GRAYLOG_LABEL_INSTANCE_1=production \
-e GRAYLOG_BASE_URL_INSTANCE_2=http://your-graylog-staging.example.com:9000 \
-e GRAYLOG_API_TOKEN_INSTANCE_2=your_staging_token \
-e GRAYLOG_LABEL_INSTANCE_2=staging
Or add it manually to ~/.claude.json:
{
"mcpServers": {
"graylog-mcp": {
"command": "npx",
"args": ["@lcaliani/graylog-mcp-server@latest"],
"env": {
"GRAYLOG_BASE_URL_INSTANCE_1": "http://your-graylog-production.example.com:9000",
"GRAYLOG_API_TOKEN_INSTANCE_1": "your_production_token",
"GRAYLOG_LABEL_INSTANCE_1": "production",
"GRAYLOG_BASE_URL_INSTANCE_2": "http://your-graylog-staging.example.com:9000",
"GRAYLOG_API_TOKEN_INSTANCE_2": "your_staging_token",
"GRAYLOG_LABEL_INSTANCE_2": "staging"
}
}
}
}
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"graylog-mcp": {
"command": "npx",
"args": ["@lcaliani/graylog-mcp-server@latest"],
"env": {
"GRAYLOG_BASE_URL_INSTANCE_1": "http://your-graylog-production.example.com:9000",
"GRAYLOG_API_TOKEN_INSTANCE_1": "your_production_token",
"GRAYLOG_LABEL_INSTANCE_1": "production",
"GRAYLOG_BASE_URL_INSTANCE_2": "http://your-graylog-staging.example.com:9000",
"GRAYLOG_API_TOKEN_INSTANCE_2": "your_staging_token",
"GRAYLOG_LABEL_INSTANCE_2": "staging"
}
}
}
}
Claude Desktop
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/claude-desktop/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Use the same JSON structure shown above for Cursor.
Use
Once configured, the fetch_graylog_messages tool becomes available and will be automatically called when needed. Example prompts:
Search for the latest 20 error logs of the example application in the last 15 minutes.
Search for the latest 20 error logs of the example application in the last 15 minutes.
Query the "staging" Graylog instance.
Available tools
fetch_graylog_messages
Fetch messages from Graylog.
Parameters:
query(string, required): Search query. Example:level:ERROR AND service:api.instance(string, optional): Label of the Graylog instance to query. Defaults to the first configured instance.searchTimeRangeInSeconds(number, optional): Relative time range in seconds. Default:900(15 minutes).searchCountLimit(number, optional): Max number of messages. Default:50.fields(string, optional): Comma-separated fields to include. Default:*(all fields).
Troubleshooting
- Ensure at least
GRAYLOG_BASE_URL_INSTANCE_1andGRAYLOG_API_TOKEN_INSTANCE_1are set. - Verify Node.js 18+ is installed.
- Set
DEBUG=truein the env to enable verbose logging to stderr.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.