Seq MCP Server
by lancer1977
README.md
# Seq MCP Server
MCP server that lets Cursor's AI query structured logs from [Datalust Seq](https://datalust.co/seq).
## Tools
| Tool | Description |
|------|-------------|
| `seq_query_logs` | Query logs with optional filter, count, and time range |
| `seq_recent_errors` | Get recent Error/Fatal events (last N minutes) |
| `seq_get_event` | Fetch a single event by ID |
| `seq_health` | Check Seq connectivity |
## Setup
### 1. Install dependencies
```bash
cd seq-mcp-server
npm install
npm run build
```
### 2. Add to Cursor MCP config
**Option A – Install script** (merges into existing config):
```bash
./scripts/install-mcp-config.sh YOUR_API_KEY
./scripts/install-mcp-config.sh YOUR_API_KEY https://seq.example.com # custom Seq URL
```
**Option B – Manual** – Edit `~/.cursor/mcp.json` and add the `Seq` entry to your existing `mcpServers`:
```json
{
"mcpServers": {
"Seq": {
"command": "node",
"args": ["/home/lancer1977/code/seq-mcp-server/dist/index.js"],
"env": {
"SEQ_SERVER_URL": "https://seq.polyhydragames.com",
"SEQ_API_KEY": "your-seq-api-key"
}
}
}
}
```
**Or** use `npx` with env vars in your shell:
```json
{
"mcpServers": {
"Seq": {
"command": "npx",
"args": ["-y", "tsx", "/home/lancer1977/code/seq-mcp-server/src/index.ts"],
"env": {
"SEQ_SERVER_URL": "https://seq.polyhydragames.com",
"SEQ_API_KEY": "your-seq-api-key"
}
}
}
}
```
### 3. Restart Cursor
Restart Cursor (or reload the window) so it picks up the new MCP server.
## Seq filter examples
Use [Seq's query syntax](https://seq.readme.io/docs/query-syntax):
- `@Level = 'Error'` — errors only
- `@Level in ['Warning', 'Error']` — warnings and errors
- `"timeout"` — text search in message
- `@Message like '%exception%' ci` — case-insensitive substring
- `appname = 'ChannelCheevos'` — current app property in existing events
- `Application = 'ChannelCheevos'` — recommended standard property
- `(Application = 'ChannelCheevos' or appname = 'ChannelCheevos')` — migration-safe query
- `@Timestamp > now() - 1h` — last hour
## Docker
Image: **`lancer1977/seq-mcp-server:latest`** on [Docker Hub](https://hub.docker.com/r/lancer1977/seq-mcp-server)
### Build (optional)
```bash
docker build -t lancer1977/seq-mcp-server:latest .
```
### Run with Cursor
Add to `~/.cursor/mcp.json` using the Docker image (no local build needed):
```json
{
"mcpServers": {
"Seq": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "SEQ_SERVER_URL=https://seq.polyhydragames.com",
"-e", "SEQ_API_KEY=your-seq-api-key",
"lancer1977/seq-mcp-server:latest"
]
}
}
}
```
The `-i` flag keeps stdin open for MCP protocol communication. `--rm` removes the container when Cursor disconnects.
### Test the image
```bash
docker run --rm -e SEQ_SERVER_URL=https://seq.example.com -e SEQ_API_KEY=xxx lancer1977/seq-mcp-server:latest
# Server starts and waits for stdio input; Ctrl+C to exit
```
## Requirements
- Seq server with HTTP API (2021+)
- API key with **Read** permission
- Node.js 18+ (or Docker)
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessSyncing