终端MCP服务器管理工具

nexus-tui是一个终端仪表板,用于浏览、测试和管理MCP(Model Context Protocol)服务器连接,支持多服务器连接、工具浏览、交互式REPL等功能。

  • by ironystock
  • Go
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 ironystock/nexus-tui

使用说明

徐

用于浏览、测试和管理的终端仪表板 主控程序 (模型上下文协议)服务器连接。

建于 珍珠奶茶 和 唇彩.

特性

  • 多服务器连接 --同时连接到多个MCP服务器
  • 工具浏览器 --可滚动的已发现工具列表,包括描述和参数模式
  • 交互式REPL --从工具模式生成的键入输入字段(字符串、数字、整数、布尔值、JSON)
  • 格式化输出 --带原始切换的彩色JSON漂亮打印(Ctrl+R)
  • 动态布局 --REPL扩展响应,重置为 Esc
  • 配置生成器 --交互式 --init 生成配置文件的向导
  • 调试日志 --完整的请求/响应日志 --debug

安装

先决条件: 转到1.25+

# Clone the repo
git clone https://github.com/ironystock/nexus-tui.git
cd nexus-tui

# Build
go build -o bin/nexus-tui ./cmd/nexus-tui/

# Or run directly
go run ./cmd/nexus-tui/

用法

快速开始

使用交互式构建器生成配置文件:

nexus-tui --init

这将提示您输入服务器名称、URL和可选的承载令牌,然后写入 nexus.yaml.

配置格式

创建一个 nexus.yaml 在项目根(或传递)中 --config path/to/config.yaml):

servers:
  - name: "My Server"
    url: "https://example.com/mcp"
    headers:
      Authorization: "Bearer YOUR_TOKEN_HERE"

跑

nexus-tui                          # uses ./nexus.yaml
nexus-tui --config my-config.yaml  # custom config path
nexus-tui --debug                  # log requests/responses to nexus-debug.log

快捷键

关键 行动
Tab / Shift+Tab 循环面板(或REPL中的下一个字段)
j / k 浏览列表
Enter 选择服务器或工具
Ctrl+S 执行工具调用
Ctrl+R 切换原始/格式化输出
Esc 返回/重置布局
q 退出

即将推出

  • 历史记录面板 --浏览过去的工具调用和响应
  • 搜索和筛选 --在大型目录中快速查找工具
  • 水平滚动 --处理宽JSON输出
  • 内联验证 --执行前所需的现场检查
  • 多服务器工作流 --跨服务器的链式工具调用

贡献

欢迎投稿!请打开问题或拉取请求。

# Run tests
go test ./...

# Vet
go vet ./...

# Tidy modules
go mod tidy

项目结构

cmd/nexus-tui/     Entry point, CLI flags
internal/
  app/             Root Bubble Tea model, layout orchestration
  config/          YAML config loading, interactive builder
  mcp/             Streamable HTTP client, protocol types, server registry
  ui/              Panels: connections, tool browser, REPL, history, status bar, styles

指南

  • 保持 Update() 纯粹的副作用 tea.Cmd 函数
  • 永远不要从goroutine中改变模型状态——发送一个 tea.Msg
  • 用上下文包装错误: fmt.Errorf("context: %w", err)
  • 风格生活在 internal/ui/styles.go

许可证

麻省理工学院