graylog-mcp-fix
v1.0.0
Published
Local MCP proxy for Graylog — fixes schemas and response data for standard MCP client compatibility
Readme
graylog-mcp-fix
A local MCP proxy that sits between your AI client and a Graylog MCP server, fixing schema and response compatibility issues that prevent standard MCP clients from working with Graylog's API.
Why
Graylog's MCP implementation has several issues that cause MCP clients to reject its responses:
- Output schemas contain
$ref/$defsreferences that clients cannot resolve datarowsare returned as arrays-of-arrays instead of arrays-of-objectseffective_timerange.from/.toare returned as primitives but schemas require objects- Optional object fields (e.g.
unit) are returned asnullbut schemas lack null support
This proxy transparently fixes all of these on the fly.
Setup
npm installCreate a .env file in the project root:
GRAYLOG_TOKEN=your_api_token_here
GRAYLOG_MCP_URL=https://your-graylog-instance/api/mcpThe token is used as HTTP Basic Auth: Authorization: Basic base64(token:token).
Running
node index.jsMCP client configuration
For opencode (~/.config/opencode/opencode.json):
{
"mcp": {
"graylog": {
"type": "local",
"command": "node /path/to/graylog-mcp-fix/index.js",
"enabled": true,
"environment": {
"GRAYLOG_MCP_URL": "Graylog MCP endpoint URL",
"GRAYLOG_TOKEN": "Graylog API token"
}
}
}
}Environment variables
| Variable | Default | Description |
|---|---|---|
| GRAYLOG_TOKEN | (empty) | Graylog API token |
| GRAYLOG_MCP_URL | (built-in URL) | Graylog MCP endpoint URL |
