Logo Seq MCP Server

Seq MCP Server

Cộng đồng
willibrandon

A Model Context Protocol (MCP) server providing AI assistants with tools to search, stream, and analyze events from Seq structured logging servers.

Nhà phát hànhwillibrandon
Kho mãseq-mcp-server
Ngôn ngữC#
Bản fork
7
Sao
22
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Seq MCP Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    22 sao và 7 bản fork từ kho mã được liên kết.

Seq MCP Server

A Model Context Protocol (MCP) server that provides tools for searching and streaming events from Seq.

Installation

As a .NET Global Tool (Recommended)

bash
# Install
dotnet tool install -g SeqMcpServer

# Update to latest version
dotnet tool update -g SeqMcpServer

# Uninstall
dotnet tool uninstall -g SeqMcpServer

Requirements

  • .NET 10.0 Runtime or SDK
  • Seq server (local or remote)
  • Valid Seq API key

Quick Start

Development Environment

bash
# Clone the repository
git clone https://github.com/willibrandon/seq-mcp-server
cd seq-mcp-server

# Setup development environment (fully automated)
# PowerShell (Windows)
./scripts/setup-dev.ps1

# Bash (Linux/Mac)
./scripts/setup-dev.sh

# Build and run the MCP server
dotnet build
dotnet run --project SeqMcpServer

The setup script automatically:

  • Starts a Seq container on ports 15341/18081
  • Configures authentication and creates an API key
  • Sets up environment variables
  • Creates a .env file for the application

Production Deployment

MCP servers are not run directly - they are launched by MCP clients. For production:

  1. Build and deploy the executable:
bash
dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true
  1. Configure your MCP client to use the deployed executable:
json
{
  "mcpServers": {
    "seq": {
      "command": "/path/to/seq-mcp-server",
      "env": {
        "SEQ_SERVER_URL": "http://your-seq-server:5341",
        "SEQ_API_KEY": "your-production-api-key"
      }
    }
  }
}

MCP Tools

The following tools are available through the MCP protocol:

  • SeqSearch - Search Seq events with filters, date ranges, signals, and pagination

    • Parameters:
      • filter (required): Seq filter expression (use empty string "" for all events)
      • count: Number of events to return (default: 100, max: 1000)
      • signalId (optional): Signal ID to filter events (use SignalList to find IDs)
      • fromDateUtc (optional): Earliest date/time (ISO 8601, e.g., "2024-01-01T00:00:00Z")
      • toDateUtc (optional): Latest date/time (ISO 8601, e.g., "2024-01-31T23:59:59Z")
      • afterId (optional): Event ID to search after (exclusive) - use for pagination
      • timeoutSeconds (optional): Timeout in seconds (1-300)
      • workspace (optional): Specific workspace to query
    • Returns: List of matching events (ordered least to most recent)
    • Note: For date filtering, use fromDateUtc/toDateUtc parameters instead of @Timestamp in the filter expression for better performance
    • Pagination: To fetch more than 1000 events, use afterId with the ID of the last event from the previous search
    • Example filters:
      • "" - all events
      • "error" - events containing "error"
      • @Level = "Error" - error level events
      • Application = "MyApp" - events from specific application
    • Example with date range:
      • filter: "@Level = 'Error'", fromDateUtc: "2024-01-01T00:00:00Z", toDateUtc: "2024-01-31T23:59:59Z"
    • Example with pagination:
      • First call: filter: "", count: 1000 → returns events with IDs
      • Second call: filter: "", count: 1000, afterId: "event-<last-id>" → returns next batch
  • SeqWaitForEvents - Wait for and capture live events from Seq (5-second timeout)

    • Parameters:
      • filter (optional): Seq filter expression
      • count: Number of events to capture (default: 10, max: 100)
      • workspace (optional): Specific workspace to query
    • Returns: Snapshot of events captured during the wait period (may be empty if no events match)
  • SignalList - List available signals (read-only)

    • Parameters:
      • workspace (optional): Specific workspace to query
    • Returns: List of signals with their definitions
  • SeqConvertFilter - Convert fuzzy filter to strict filter expression

    • Parameters:
      • fuzzyFilter (required): Fuzzy search text (e.g., "error", "timeout")
      • workspace (optional): Specific workspace to query
    • Returns: Strict Seq filter expression for use in SeqSearch
    • Use case: Help users write correct filter expressions
    • Example: Convert "error" to a proper Seq filter expression

Claude Desktop Integration

Option 1: Using .NET Global Tool (Recommended)

After installing the global tool, add to your Claude Desktop configuration:

json
{
  "mcpServers": {
    "seq": {
      "command": "seq-mcp-server",
      "env": {
        "SEQ_SERVER_URL": "http://localhost:5341",
        "SEQ_API_KEY": "your-api-key-here"
      }
    }
  }
}

Option 2: Pre-built Release

Download the latest release for your platform and add to your MCP settings:

json
{
  "mcpServers": {
    "seq": {
      "command": "C:\\\\Tools\\\\seq-mcp-server.exe",
      "args": [],
      "env": {
        "SEQ_SERVER_URL": "http://localhost:5341",
        "SEQ_API_KEY": "your-api-key-here"
      }
    }
  }
}

Option 3: Build from Source

Build a single-file executable (requires .NET 10 runtime):

bash
# Windows
dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true

# macOS
dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true

# Linux
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true

The executable will be in SeqMcpServer/bin/Release/net10.0/{runtime}/publish/

Configuration

The Seq MCP Server uses environment variables for configuration:

  • SEQ_SERVER_URL: URL of your Seq server
  • SEQ_API_KEY: API key for accessing Seq (required)
  • SEQ_API_KEY_<WORKSPACE>: Optional workspace-specific API keys (e.g., SEQ_API_KEY_PRODUCTION)

Seq Compatibility

SeqSearch prefers Events.EnumerateAsync(), which uses the Seq Scan link when the server advertises it. Older Seq builds such as 2024.3.x do not expose Scan on api/events/resources; in that case the server now falls back to PagedEnumerateAsync() so searches continue to work instead of failing with:

text
System.NotSupportedException: The requested link `Scan` isn't available on entity `Seq.Api.Model.ResourceGroup`.

If you are debugging compatibility issues:

  • Seq 2025.2.x and newer expose Scan
  • Seq 2024.3.x does not expose Scan
  • this MCP server supports both paths by falling back automatically

Workspace Support

The MCP server supports workspace-specific API keys (future feature):

bash
export SEQ_API_KEY="default-key"
export SEQ_API_KEY_PRODUCTION="production-key"
export SEQ_API_KEY_STAGING="staging-key"

Note: Workspace-specific keys are currently designed but not yet implemented in the MCP tools.

Development

Prerequisites

  • .NET 10.0 SDK
  • Docker (for running Seq locally)

Running Tests

bash
dotnet test

Development

The scripts folder contains automated setup scripts:

  • setup-dev.ps1 / setup-dev.sh: Automatically configures your development environment
    • Starts Seq container with authentication
    • Handles initial password setup
    • Creates development API key
    • Sets environment variables
    • Creates .env file for the application
  • teardown-dev.ps1 / teardown-dev.sh: Cleans up the development environment
    • Stops and removes containers
    • Clears environment variables

For detailed development setup, see docs/DEVELOPMENT.md.

Architecture

This is a pure MCP server implementation that:

  • Runs as a stdio-based service (no web server)
  • Communicates via JSON-RPC over standard input/output
  • Does not log to console to avoid interfering with MCP communication
  • Optionally logs to Seq itself for debugging when configured

Self-Logging

The MCP server can log its own operations to Seq when a valid SEQ_SERVER_URL and SEQ_API_KEY are provided. This helps with debugging and monitoring the MCP server itself.

License

MIT License - see LICENSE file for details.

Dùng MCP Seq MCP Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Seq MCP Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Seq MCP Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Seq MCP Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "seq-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Seq MCP Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Seq MCP Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Seq MCP Server giúp tôi làm việc này không?
Seq MCP Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Seq MCP Server.

Câu hỏi thường gặp

Máy chủ MCP Seq MCP Server dùng để làm gì?

Seq MCP Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Seq MCP Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Seq MCP Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Seq MCP Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Seq MCP Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Seq MCP Server với TypingMind?

Seq MCP Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Seq MCP Server cung cấp những công cụ nào trong TypingMind?

Seq MCP Server cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Seq MCP Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Seq MCP Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇