Token导航 LogoToken导航TokenDH.com
tui (Damiik) logo
开发工具未说明官方级别未说明来源级核验

tui (Damiik)

MCP Server

一个基于终端的UI客户端,用于与MCP兼容服务器进行交互通信、工具执行和上下文管理。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
RustCursor开发工具Cursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

damiik

提供方

damiik

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

TUI MCP Client

A terminal-based UI client for the Model Context Protocol (MCP), inspired by Vim's modal interface. It allows for interactive communication with MCP-compliant servers, tool execution, and context management directly from the command line.

Features

  • Modal Interface: Vim-like NORMAL, INSERT, and COMMAND modes for efficient, keyboard-driven interaction.
  • MCP Communication: Connects to MCP servers via Server-Sent Events (SSE) and JSON-RPC.
  • Interactive Selection Menus: Easily select servers and tools from dynamic lists.
  • Command System: A rich set of commands for controlling the application, managing connections, and interacting with tools.
  • Command Completion: Press Tab in COMMAND mode to auto-complete commands, tool names, and server names.
  • Command History: Navigate through previously executed commands using the Up and Down arrow keys.
  • Tool Inspection: View detailed information about available tools, including descriptions and input schemas.
  • Dynamic Layout: The UI adapts to different terminal sizes.
  • Mouse Support: Optional mouse capture for scrolling and other interactions.
  • Configurable: Define MCP server endpoints in an external config.json file.

Configuration

Create a config.json file in the root of the project directory to define the MCP servers you want to connect to.

config.json format:

{
  "mcp_servers": [
    {
      "name": "local-dev",
      "url": "http://localhost:8080/sse"
    },
    {
      "name": "staging-server",
      "url": "https://mcp.staging.example.com"
    }
  ]
}

How to Run

  1. Build the project:
    cargo build --release
  1. Run the application:
    cargo run

User Interface

The UI is split into three main sections:

┌───────────────────────────────────────────────────┐
│ 📦 Available tools:                               │  ← Output Area
│   • read_file: Reads a file from the filesystem.  │  (Scrollable history of commands and responses)
│   • list_directory: Lists files in a directory.   │
│                                                   │
├───────────────────────────────────────────────────┤
│ NORMAL | Ready                                    │  ← Status Bar
├───────────────────────────────────────────────────┤
│ :mcp tools_                                       │  ← Input/Command Line
└───────────────────────────────────────────────────┘

Modes

  • NORMAL (Cyan): The default mode for navigation and entering other modes.
  • INSERT (Green): For typing input to be sent to the server (currently echoes back).
  • COMMAND (Yellow): For entering commands to control the application (e.g., :q, :mcp connect).
  • SELECT (Magenta): An interactive mode for selecting a server or tool from a list.

Keybindings

ModeKey(s)Action
NORMALiEnter INSERT mode.
:Enter COMMAND mode.
qQuit the application.
k / UpScroll output up.
j / DownScroll output down.
PageUp / PageDownScroll output by a full page.
EndJump to the bottom of the output (enables autoscroll).
Ctrl+LClear the output area.
INSERTEscReturn to NORMAL mode.
EnterSend the input.
BackspaceDelete character before the cursor.
Left/Right/Home/EndNavigate the input line.
COMMANDEscReturn to NORMAL mode.
EnterExecute the command or apply completion.
TabTrigger command/argument completion.
Up/DownNavigate command history or completion list.
BackspaceDelete character before the cursor.
Left/Right/Home/EndNavigate the command line.
SELECTk / UpMove selection up.
j / DownMove selection down.
EnterConfirm selection.
EscCancel selection and return to NORMAL mode.

Commands

Commands are entered in COMMAND mode, prefixed with :.

CommandAliasDescription
:q, :quitExit the application.
:clearClear the output area.
:echo Print `` to the output area.
:h, :helpShow the help message with all available commands.
:mouse on / :mouse offEnable or disable mouse capture.
:mcp listList all configured MCP servers from config.json.
:mcp connect [name]:mcp cnConnect to an MCP server. Opens an interactive menu if [name] is omitted.
:mcp statusShow the current MCP connection status and number of loaded tools.
:mcp toolsList all available tools from the connected MCP server.
:mcp tool Show a detailed description of ``, including its input schema.
:mcp run [tool_name] [args...]Execute a tool. Opens an interactive menu if [tool_name] is omitted.

Architecture

The application follows a functional, event-driven architecture inspired by Elm.

  • main.rs: The entry point, responsible for setting up the terminal, initializing the App, and running the main event loop.
  • app.rs: The core state machine. It holds all application state and handles state transitions in response to events.
  • ui.rs: Contains all rendering logic. It is a pure function that maps the App state to the terminal frame.
  • event.rs: Defines the main event loop and abstracts away terminal events.
  • mcp.rs: The MCP client, responsible for handling SSE connections, sending JSON-RPC requests, and receiving responses.
  • command.rs: The command parser, which validates and translates command strings into structured Command enums.
  • config.rs: Handles loading and parsing the config.json file.
  • state.rs: Defines simple, immutable data structures for buffers and logs.
  • mode.rs: Defines the different application modes (Normal, Insert, Command).
  • completion.rs: Implements the logic for command completion and history.

目录标签

目录标签

RustCursor开发工具终端应用本地部署MCP协议命令行工具交互式界面

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP