Cortex R MCP server
{
"mcpServers": {
"dinglebear-cortex-r": {
"command": "npx",
"args": [
"-y",
"cortex-rmcp@latest"
],
"env": {
"CORTEX_TOKEN": "<cortex_token>",
"CORTEX_API_TOKEN": "<cortex_api_token>",
"CORTEX_API_ADMIN_TOKEN": "<cortex_api_admin_token>",
"CORTEX_URL": "https://...",
"CORTEX_DB_PATH": "/path/to/directory",
"CORTEX_PUBLIC_URL": "https://..."
}
}
}
}{
"mcpServers": {
"dinglebear-cortex-r": {
"command": "npx",
"args": [
"-y",
"cortex-rmcp@latest"
],
"env": {
"CORTEX_TOKEN": "<cortex_token>",
"CORTEX_API_TOKEN": "<cortex_api_token>",
"CORTEX_API_ADMIN_TOKEN": "<cortex_api_admin_token>",
"CORTEX_URL": "https://...",
"CORTEX_DB_PATH": "/path/to/directory",
"CORTEX_PUBLIC_URL": "https://..."
}
}
}
}{
"mcpServers": {
"dinglebear-cortex-r": {
"command": "npx",
"args": [
"-y",
"cortex-rmcp@latest"
],
"env": {
"CORTEX_TOKEN": "<cortex_token>",
"CORTEX_API_TOKEN": "<cortex_api_token>",
"CORTEX_API_ADMIN_TOKEN": "<cortex_api_admin_token>",
"CORTEX_URL": "https://...",
"CORTEX_DB_PATH": "/path/to/directory",
"CORTEX_PUBLIC_URL": "https://..."
}
}
}
}{
"servers": {
"dinglebear-cortex-r": {
"command": "npx",
"args": [
"-y",
"cortex-rmcp@latest"
],
"env": {
"CORTEX_TOKEN": "${input:cortex_token}",
"CORTEX_API_TOKEN": "${input:cortex_api_token}",
"CORTEX_API_ADMIN_TOKEN": "${input:cortex_api_admin_token}",
"CORTEX_URL": "${input:cortex_url}",
"CORTEX_DB_PATH": "${input:cortex_db_path}",
"CORTEX_PUBLIC_URL": "${input:cortex_public_url}"
}
}
},
"inputs": [
{
"id": "cortex_token",
"type": "promptString",
"description": "Cortex token",
"password": true
},
{
"id": "cortex_api_token",
"type": "promptString",
"description": "Cortex api token",
"password": true
},
{
"id": "cortex_api_admin_token",
"type": "promptString",
"description": "Cortex api admin token",
"password": true
},
{
"id": "cortex_url",
"type": "promptString",
"description": "Cortex url",
"password": true
},
{
"id": "cortex_db_path",
"type": "promptString",
"description": "Cortex db path",
"password": true
},
{
"id": "cortex_public_url",
"type": "promptString",
"description": "Cortex public url",
"password": true
}
]
}{
"mcpServers": {
"dinglebear-cortex-r": {
"command": "npx",
"args": [
"-y",
"cortex-rmcp@latest"
],
"env": {
"CORTEX_TOKEN": "<cortex_token>",
"CORTEX_API_TOKEN": "<cortex_api_token>",
"CORTEX_API_ADMIN_TOKEN": "<cortex_api_admin_token>",
"CORTEX_URL": "https://...",
"CORTEX_DB_PATH": "/path/to/directory",
"CORTEX_PUBLIC_URL": "https://..."
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall npx -y cortex-rmcpversion 3.9.1
What it does
Cortex is a Rust-based MCP server that collects and indexes logs from syslog, Docker, and other sources into a local SQLite database with full-text search. It provides investigation tools for searching, correlating, and analyzing logs across a homelab or small fleet, along with fleet inventory and AI session tracking.
- Search and retrieve logs from multiple sources (syslog, Docker, files) using full-text search and filters.
- Build timelines and correlate events across different log sources to investigate incidents.
- Track host inventory, service topology, and container relationships to understand fleet state.
Tools this server exposes
| Tool | Does |
|---|---|
| tail | Retrieve recent log entries with configurable limits. |
| errors | Query and filter error logs across sources. |
| search | Full-text search across indexed log content. |
| timeline | Build a chronological view of events from multiple sources. |
| context | Retrieve contextual information around a log event or time range. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.