Seq MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows management of Seq signals including fetching, filtering by owner ID, and filtering shared/private signals

  • Used for static type checking in the server implementation

  • Used for runtime type checking through schema validation

序列 MCP 服务器

MCP 服务器用于 Seq 的 API 端点,用于与您的日志记录和监控系统进行交互。该服务器通过模型上下文协议 (MCP) 提供对 Seq API 功能的全面访问。

特征

工具

信号管理

  • get-signals - 使用过滤选项获取信号
    • 按所有者 ID 过滤
    • 过滤共享/私有信号
    • 支持部分匹配

活动管理

  • get-events - 使用广泛的过滤选项检索事件
    • 按信号 ID 过滤
    • 自定义过滤表达式
    • 可配置事件计数(最多 100 个)
    • 灵活的时间范围选项
    • 日期范围过滤

警报管理

  • get-alertstate - 检索警报的当前状态

资源

信号列表

  • signals - 列出所有共享信号的详细信息
    • 信号ID
    • 标题
    • 描述
    • 共享状态
    • 车主信息

配置

服务器需要以下环境变量:

  • SEQ_BASE_URL (可选):您的 Seq 服务器 URL(默认为 ' http://localhost:8080 ')
  • SEQ_API_KEY (必需):您的 Seq API 密钥

与 Claude Desktop 一起使用

添加到您的claude_desktop_config.json

{ "mcpServers": { "seq": { "command": "npx", "args": ["-y", "mcp-seq"], "env": { "SEQ_BASE_URL": "your-seq-url", "SEQ_API_KEY": "your-api-key" } } } }

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run dev

运行测试:

npm run test-script

时间范围选项

get-events工具支持以下时间范围选项:

  • 1m - 最后一分钟
  • 15m ——最后15分钟
  • 30m - 最后30分钟
  • 1h - 最后一小时
  • 2h - 过去 2 小时
  • 6h - 过去 6 小时
  • 12h - 过去 12 小时
  • 1d - 最后一天
  • 7d - 过去 7 天
  • 14d - 过去 14 天
  • 30d - 过去 30 天

安装

此工具仍在开发中,我们尚未推送到 npm 仓库。您需要先克隆此仓库到本地,然后运行npm run build进行构建。

要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "seq": { "command":"node", "args": ["/Users/ahmadreza/source/ahmad2x4/mcp-server-seq/build/seq-server.js"], "env": { "SEQ_BASE_URL": "your-seq-url", "SEQ_API_KEY": "your-api-key" } } } }

调试

由于 MCP 服务器通过 stdio 进行通信,因此调试起来可能比较困难。该服务器为所有操作实现了适当的错误处理和日志记录。您可以运行测试脚本来验证功能:

npm run test-script

类型安全

服务器使用以下方式实现全面的类型安全:

  • 用于静态类型检查的 TypeScript
  • Zod 模式验证用于运行时类型检查
  • 正确的错误处理和响应格式 =======

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Seq MCP 服务器支持与 Seq 的 API 端点进行交互以进行日志记录和监控,并提供用于管理信号、事件和警报的工具以及广泛的过滤和配置选项。

  1. Features
    1. Tools
    2. Resources
  2. Configuration
    1. Usage with Claude Desktop
      1. Development
        1. Time Range Options
          1. Installation
            1. Debugging
          2. Type Safety
            ID: yljb00fc2g