Universal MCP server for application log intelligence across Datadog, Grafana Loki, AWS CloudWatch, and local files.
Project description
LogIntel MCP Server
Universal Model Context Protocol (MCP) server that connects LLMs to application logs across Datadog, Grafana Loki, AWS CloudWatch, and local log files.
Ask your AI assistant questions like:
- "Why did orders spike at 2 AM?"
- "Find all timeout errors in the payment service from last hour"
- "Correlate 500 errors across api, payment, and db services"
- "Compare error rates before and after the deployment at 3 PM"
Features
- ๐ Multi-backend support โ Datadog, Grafana Loki, AWS CloudWatch, local files
- ๐ Natural language queries โ Ask in plain English, get structured results
- ๐ Local file provider โ Search, filter, tail, and aggregate JSON/regex/plain-text logs
- โ๏ธ CloudWatch provider โ Query AWS CloudWatch Logs Insights with natural language
- ๐ Datadog provider โ Search and aggregate via Datadog Logs v2 API
- ๐ฅ Loki provider โ Query Grafana Loki with LogQL label matchers and metric queries
- ๐ง Intelligent analysis โ Root cause analysis, cross-service correlation, anomaly detection
- ๐ Cross-service correlation โ Trace ID, timestamp proximity, and field matching
- โก Caching & pagination โ TTL cache for repeated queries; cursor-based pagination
- ๐ก๏ธ Read-only by default โ Safe to use in production; no log mutation
MCP Tools
| Tool | Description |
|---|---|
list_log_sources |
List all configured log sources |
get_source_health |
Check connectivity of a source |
get_source_schema |
Get field/schema info for a source |
search_logs |
Search logs with natural language or query |
filter_logs |
Filter by time, level, service, host, custom fields |
tail_logs |
Return latest N entries from a source |
aggregate_logs |
Count/group by field, time bucketing |
summarize_logs |
Generate natural language summary |
correlate_logs |
Cross-source correlation by trace_id or timestamp |
analyze_root_cause |
Multi-step incident root cause analysis |
compare_time_periods |
Before/after comparison with diff report |
detect_error_patterns |
Detect recurring error patterns |
find_anomalies |
Statistical anomaly detection |
natural_language_to_query |
Translate NL to provider query syntax |
explain_query |
Explain a provider-native query in plain English |
MCP Prompts
| Prompt | Description |
|---|---|
investigate_incident |
Structured 6-step SRE investigation workflow |
oncall_summary |
Generate a concise shift summary |
Quick Start
Installation
PyPI (recommended)
pip install logintel-mcp
# Or with uv
uv pip install logintel-mcp
uvx -y logintel-mcp --config ~/.logintelrc.yaml
npm (wrapper)
npx -y logintel-mcp-server --config ~/.logintelrc.yaml
Docker (GHCR)
docker run --rm -v "$HOME/.logintelrc.yaml:/etc/logintel/.logintelrc.yaml" \
ghcr.io/firas-mcp-servers/logintel-mcp-server:latest
From source
git clone https://github.com/firas-mcp-servers/logintel-mcp-server.git
cd logintel-mcp-server
poetry install
Configuration
Create a .logintelrc.yaml file:
sources:
datadog-prod:
type: datadog
apiKey: "${DATADOG_API_KEY}"
appKey: "${DATADOG_APP_KEY}"
site: "datadoghq.com"
defaultIndexes: ["main", "prod"]
loki-default:
type: loki
url: "http://localhost:3100"
defaultLabels:
app: "api"
cloudwatch-app:
type: cloudwatch
region: "us-east-1"
profile: "production"
logGroups:
- "/aws/lambda/my-app"
local-app:
type: local
paths:
- "/var/log/myapp/*.log"
parseJson: true
timestampField: "timestamp"
levelField: "level"
serviceField: "service"
defaults:
timeRange: "1h"
maxResults: 100
timezone: "UTC"
intelligence:
enableCaching: true
cacheTtlSeconds: 60
anomalySensitivity: "medium"
maxCorrelationDepth: 3
Run the Server
# stdio transport (default)
logintel-mcp --config ~/.logintelrc.yaml
# Or via Python module
python -m logintel --config ~/.logintelrc.yaml
Claude Desktop Integration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"log-intel": {
"command": "uvx",
"args": ["-y", "logintel-mcp", "--config", "/path/to/.logintelrc.yaml"]
}
}
}
Or with Docker:
{
"mcpServers": {
"log-intel": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/path/to/.logintelrc.yaml:/etc/logintel/.logintelrc.yaml",
"ghcr.io/firas-mcp-servers/logintel-mcp-server:latest"
]
}
}
}
Cursor Integration
Add to .cursor/mcp.json:
{
"mcpServers": {
"log-intel": {
"command": "npx",
"args": ["-y", "logintel-mcp-server", "--config", "./.logintelrc.yaml"]
}
}
}
Development
# Install dependencies
poetry install --with dev
# Run tests (100% coverage gate)
poetry run pytest --cov=src/logintel --cov-fail-under=100
# Or use the convenience tasks
poetry run poe test # full suite with coverage
poetry run poe test-fast # quick run without coverage
poetry run poe lint # ruff check
poetry run poe fix # ruff check --fix + ruff format
poetry run poe check # lint + test combo
# Run MCP Inspector for manual testing
poetry run python -m logintel --config ./examples/config.yaml
# In another terminal:
npx -y @modelcontextprotocol/inspector
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Host (Claude/Cursor/etc.) โ
โ โโโโโโโโโโโ โ
โ โ LLM โ โ
โ โโโโโโฌโโโโโ โ
โ โ MCP Protocol (JSON-RPC) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ LogIntel MCP Server โ
โ (this project) โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโผโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโโผโโโโโโโโ
โ Datadog โ โGrafana Loki โ โAWS CloudWatch โ
โ APIs โ โ HTTP API โ โ Logs Insightsโ
โโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Local Files โ
โ (fs/grep) โ
โโโโโโโโโโโโโโโ
Roadmap
| Phase | Focus | Status |
|---|---|---|
| 0 | Foundation โ scaffolding, config, health checks | โ Complete |
| 1 | Local File Provider | โ Complete |
| 2 | CloudWatch Provider | โ Complete |
| 3 | Datadog Provider | โ Complete |
| 4 | Loki Provider | โ Complete |
| 5 | Intelligence Layer โ root cause, correlation, caching | โ Complete |
| 6 | Polish โ Docker, PyPI, npm, CI/CD, docs | โ Complete |
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logintel_mcp-1.0.1.tar.gz.
File metadata
- Download URL: logintel_mcp-1.0.1.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.5 Linux/6.17.0-1013-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19633628d3383ed7d910cc5a420a7b904edf927fd339419bcad2df16f083d8d6
|
|
| MD5 |
9ddbc4b86de9c0eaeafedf41cdfcc9c4
|
|
| BLAKE2b-256 |
20acee1935d6135cc859196229023d594dbfab7cf015d776b787856c93a15ec7
|
File details
Details for the file logintel_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: logintel_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.5 Linux/6.17.0-1013-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
910df7fdaf1c4e287adde617e48c0018dd910664dd50a13c0f2d17ae26259b78
|
|
| MD5 |
d1ff40c5994af19481801893354d063a
|
|
| BLAKE2b-256 |
5940f279a97006bd6765d195e15c4028c6c71d50a98681ff082b26c88a42453b
|