seq-mcp

seq-mcp

A Model Context Protocol server that provides AI agents with controlled read access to Datalust Seq instances for log analysis and monitoring. It enables agents to search events, execute data queries, and retrieve information about signals, dashboards, and alerts.

Category
访问服务器

README

mcp-seq-otel

Standalone MCP server that gives AI agents controlled API access to a user-owned Datalust Seq instance.

What This Service Assumes

  • You already run/manage your own Seq instance.
  • This service only needs connection settings.

Required configuration:

  • SEQ_URL
  • SEQ_API_KEY

URL Support

SEQ_URL accepts either:

  • Host URL (recommended; service will append /api):
    • http://localhost:10150
    • https://seq.example.com
  • Full API base URL (also supported):
    • http://localhost:10150/api
    • https://seq.example.com/api

Available MCP Tools

  • seq_connection_test: validates Seq connectivity and API reachability.
  • seq_starter_help: lists the compact starter alias tools.
  • seq_starter_overview: quick health, user, diagnostics, signals, and workspace summary.
  • seq_starter_events_search: common event search by filter/signal/time range.
  • seq_starter_event_by_id: fetch one event by id.
  • seq_starter_data_query: run a q query using GET or POST.
  • seq_starter_signals_list / seq_starter_signal_by_id: signal discovery helpers.
  • seq_starter_dashboards_list: list dashboards.
  • seq_starter_alerts_list: list alerts.
  • seq_starter_events_stream: bounded live-tail style stream call.
  • seq_api_catalog: returns the full official Seq route/verb/permission catalog.
  • seq_api_live_links: discovers live name -> route links from your Seq instance.
  • seq_api_request: generic verb/path invoker for any Seq API route.
  • seq_<verb>_<route>: auto-generated tool per official route+verb (from docs).

Scope note:

  • seq_starter_* tools are focused on common read workflows.
  • seq_api_request and seq_<verb>_<route> expose the broader HTTP API surface from the Seq endpoint catalog, including non-GET routes.

Seq API Key Permissions

Use least privilege based on the exact tools/workflows your MCP client will call.

Authoritative Datalust references:

  • API keys and permission model: https://docs.datalust.co/docs/api-keys
  • HTTP API usage guide: https://docs.datalust.co/docs/using-the-http-api
  • Server endpoint + permission table: https://docs.datalust.co/docs/server-http-api

Recommended permission profiles:

  • Read-focused starter usage (seq_starter_*, seq_connection_test, read-only queries): enable Read; disable Ingest, Write, Project, Organization, System.
  • Full route-surface usage (seq_api_request and seq_<verb>_<route>): required permissions depend on the specific route+verb; check seq_api_catalog or the official endpoint table before granting.

Permission guidance for this project:

Permission Needed now Why
Read Yes Required by starter query/retrieval workflows.
Ingest Usually No Needed only when calling ingestion routes such as ingest/* or api/events/raw when API-key-for-writing is required.
Write Maybe Needed for write routes (for example signals, dashboards, alerts, permalinks, SQL queries).
Project Maybe Needed for project-scoped administration and some settings/index routes.
Organization Maybe Needed for organization/user-management routes.
System Maybe Needed for system administration routes (for example apps, feeds, backups, updates).

Starter endpoint mapping in current implementation:

  • GET /health: public endpoint.
  • GET /api/events/resources: public endpoint.
  • GET /api/events: Read permission demand.
  • GET /api/events/{id}: Read permission demand.
  • GET /api/data: Read permission demand.

API Key Header

The server authenticates to Seq using the X-Seq-ApiKey header.

Resilience and Permission Handling

Tool failures are returned as structured MCP error responses (isError: true) instead of crashing the server process.

Current graceful handling includes:

  • 401 Unauthorized: returns guidance to verify SEQ_API_KEY and SEQ_URL.
  • 403 Forbidden: returns a permission-denied response with route-derived permission hints when available.
  • Network/timeout failures: returns connectivity diagnostics for AI clients.

Local Run (Node)

Node.js requirement: LTS (see .nvmrc).

npm install
npm run build

Windows PowerShell:

$env:SEQ_URL = "http://localhost:10150"
$env:SEQ_API_KEY = "your-key"
node dist/index.js

Docker Standalone Run

Docker Hub documentation assets in this repo:

Build image:

docker build -t mcp/seq-otel:latest .

Run via Docker Compose (recommended for MCP stdio):

PowerShell:

./scripts/run-mcp-compose.ps1 -SeqUrl "http://localhost:10150" -SeqApiKey "<YOUR_SEQ_API_KEY>" -ImageTag latest -Build

Bash:

./scripts/run-mcp-compose.sh --seq-url "http://localhost:10150" --seq-api-key "<YOUR_SEQ_API_KEY>" --image-tag latest --build

Compose run behavior:

  • Value precedence is: explicit script args -> existing environment variables -> .env.
  • If the target .env is missing, scripts create a generic template .env automatically.
  • When that generated generic template is in use, ensure SEQ_URL and SEQ_API_KEY are resolved via script args, existing environment variables, or a populated .env file.
  • MCP_IMAGE_TAG precedence is: explicit -ImageTag/--image-tag -> existing environment -> .env -> latest.
  • Scripts check image availability through compose service metadata and auto-build if the selected tag is not available.
  • By default, no container name is specified, so Docker auto-generates a random name.
  • You can override container name with -ContainerName (PowerShell) or --container-name (Bash).
  • For security, prefer setting SEQ_API_KEY via environment variables or .env instead of CLI args.

Or use helper scripts:

PowerShell:

./scripts/build-image.ps1

Bash:

./scripts/build-image.sh

Build and push to registry (pullable by other Docker hosts):

PowerShell:

./scripts/build-image.ps1 -Registry ghcr.io/mclifeleader -Tag v0.2.0 -Push

Bash:

./scripts/build-image.sh --registry ghcr.io/mclifeleader --tag v0.2.0 --push

Build and export tar (loadable with docker load):

PowerShell:

./scripts/build-image.ps1 -SaveTar ./mcp-seq-otel.tar

Bash:

./scripts/build-image.sh --save-tar ./mcp-seq-otel.tar

Run against local Seq:

docker run --rm -i \
  -e SEQ_URL=http://host.docker.internal:10150 \
  -e SEQ_API_KEY=your-key \
  mcp/seq-otel:latest

Run against FQDN Seq:

docker run --rm -i \
  -e SEQ_URL=https://seq.example.com \
  -e SEQ_API_KEY=your-key \
  mcp/seq-otel:latest

Run with Podman:

podman build -t mcp/seq-otel:latest .
podman run --rm -i \
  -e SEQ_URL=https://seq.example.com \
  -e SEQ_API_KEY=your-key \
  mcp/seq-otel:latest

The container startup contract requires both variables to be present:

  • SEQ_URL
  • SEQ_API_KEY

If either is missing, the container exits immediately with a clear startup error.

Copy/Paste MCP Config (Codex and VS Code)

Assumes the image already exists (mcp/seq-otel:latest).

{
  "mcpServers": {
    "seq-otel": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "SEQ_URL=http://host.docker.internal:10150",
        "-e",
        "SEQ_API_KEY=<YOUR_SEQ_API_KEY>",
        "mcp/seq-otel:latest"
      ]
    }
  }
}

Docker MCP Catalog Compatibility

This repo includes a catalog-ready server definition in:

  • catalog/server.yaml
  • catalog/tools.json
  • assets/seq-otel-icon.svg

catalog/server.yaml declares:

  • SEQ_URL as a required user parameter (mapped via config.env)
  • SEQ_API_KEY as a required secret (mapped via config.secrets)

These files follow the Docker MCP registry server format, so they can be used in catalog generation/import workflows (for example via docker/mcp-registry tools).

Submission checklist for Docker MCP Registry:

  • docs/docker-mcp-registry-submission.md

MCP Client Integration Example

Use a command-based MCP client entry that launches the container with stdin/stdout attached.

{
  "mcpServers": {
    "seq-otel": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "SEQ_URL=https://seq.example.com",
        "-e",
        "SEQ_API_KEY=<YOUR_SEQ_API_KEY>",
        "mcp/seq-otel:latest"
      ]
    }
  }
}

Security Notes

  • Do not commit keys.
  • Use least-privilege Seq API keys.
  • Prefer HTTPS for non-local Seq instances.

API Mapping Artifact

Status

Core standalone server scaffold is implemented and buildable.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选