Interactive MCP
交互式 MCP
一个用 Node.js/TypeScript 实现的 MCP 服务器,用于促进 LLM 与用户之间的交互通信。**注意:**此服务器设计为与 MCP 客户端(例如 Claude Desktop、VS Code)一起在本地运行,因为它需要直接访问用户的操作系统来显示通知和命令行提示符。
(注:该项目尚处于早期阶段。)
**想要快速了解一下?**请查看介绍性博客文章: 让你的 AI 助手不再猜测——interactive-mcp 介绍
工具
该服务器通过模型上下文协议(MCP)公开以下工具:
request_user_input:向用户提问并返回答案。可以显示预定义选项。message_complete_notification:发送简单的操作系统通知。start_intensive_chat:启动持久命令行聊天会话。ask_intensive_chat:在活跃的密集聊天会话中提出问题。stop_intensive_chat:关闭活动的密集聊天会话。
Related MCP server: Interactive Feedback MCP
演示
以下是交互功能的演示:
普通问题 | 完成通知 |
|
|
密集聊天开始 | 密集聊天结束 |
|
|
使用场景
此服务器非常适合 LLM 需要与本地计算机上的用户直接交互的场景,例如:
交互式设置或配置过程。
在代码生成或修改期间收集反馈。
在结对编程中澄清指令或确认操作。
LLM 操作期间任何需要用户输入或确认的工作流程。
客户端配置
本节介绍如何配置 MCP 客户端以使用interactive-mcp服务器。
默认情况下,用户提示将在 30 秒后超时。您可以在配置客户端时直接向args数组添加命令行标志,以自定义服务器选项,例如超时或禁用工具。
请确保您有可用的npx命令。
与 Claude Desktop/Cursor 一起使用
将以下最小配置添加到您的claude_desktop_config.json (Claude Desktop)或mcp.json (Cursor):
{
"mcpServers": {
"interactive": {
"command": "npx",
"args": ["-y", "interactive-mcp"]
}
}
}有特定版本
{
"mcpServers": {
"interactive": {
"command": "npx",
"args": ["-y", "interactive-mcp@1.9.0"]
}
}
}自定义超时示例(30 秒):
{
"mcpServers": {
"interactive": {
"command": "npx",
"args": ["-y", "interactive-mcp", "-t", "30"]
}
}
}与 VS Code 一起使用
将以下最小配置添加到您的用户设置(JSON)文件或.vscode/mcp.json :
{
"mcp": {
"servers": {
"interactive-mcp": {
"command": "npx",
"args": ["-y", "interactive-mcp"]
}
}
}
}macOS 建议
为了在 macOS 上使用默认Terminal.app获得更流畅的体验,请考虑以下配置文件设置:
(Shell 选项卡):在“当 Shell 退出时” (终端 > 设置 > 配置文件 > [您的配置文件] > Shell )下,选择**“如果 Shell 正常退出则关闭”或“关闭窗口”** 。这有助于在 MCP 服务器启动和停止时管理窗口。
开发设置
本节主要面向希望修改或贡献服务器的开发者。如果您只想将服务器与 MCP 客户端一起使用,请参阅上面的“客户端配置”部分。
先决条件
**Node.js:**检查
package.json的版本兼容性。**pnpm:**用于包管理。安装 Node.js 后,通过
npm install -g pnpm安装。
安装(开发人员)
克隆存储库:
git clone https://github.com/ttommyth/interactive-mcp.git cd interactive-mcp安装依赖项:
pnpm install
运行应用程序(开发人员)
pnpm start命令行选项
interactive-mcp服务器接受以下命令行选项。这些选项通常应该在 MCP 客户端的 JSON 设置中配置,方法是直接将它们添加到args数组中(参见“客户端配置”示例)。
选项 | 别名 | 描述 |
|
| 设置用户输入提示的默认超时时间(以秒为单位)。默认为 30 秒。 |
|
| 禁用特定工具或群组(逗号分隔列表)。阻止服务器广告或注册它们。选项: |
**示例:**在客户端配置args数组中设置多个选项:
// Example combining options in client config's "args":
"args": [
"-y", "interactive-mcp",
"-t", "30", // Set timeout to 30 seconds
"--disable-tools", "message_complete_notification,intensive_chat" // Disable notifications and intensive chat
]开发命令
构建:
pnpm buildLint:
pnpm lint格式:
pnpm format
互动指导原则
与此 MCP 服务器交互时(例如,作为 LLM 客户端),请遵守以下原则以确保清晰度并减少意外更改:
**优先考虑互动:**频繁使用提供的 MCP 工具(
request_user_input、start_intensive_chat等)与用户互动。**寻求澄清:**如果要求、说明或上下文不清楚,请务必在继续操作之前提出澄清问题。不要妄下结论。
**确认操作:**在执行重大操作(如修改文件、运行复杂命令或做出架构决策)之前,请与用户确认计划。
**提供选项:**尽可能通过 MCP 工具向用户提供预定义的选项,以便快速做出决策。
您可以向 LLM 客户提供以下说明,如下所示:
# Interaction
- Please use the interactive MCP tools
- Please provide options to interactive MCP if possible
# Reduce Unexpected Changes
- Do not make assumption.
- Ask more questions before executing, until you think the requirement is clear enough.贡献
欢迎贡献!请遵循标准开发实践。(更多详细信息可稍后添加)。
执照
MIT(有关详细信息,请参阅LICENSE文件 - 如果适用,或直接指定许可证)。
Maintenance
Related MCP Servers
- AlicenseBqualityDmaintenanceA secure terminal execution server that enables controlled command execution with security features and resource limits via the Model Context Protocol (MCP).11211MIT
- AlicenseAqualityDmaintenanceA MCP server that enables human-in-the-loop workflow in AI-assisted development tools by allowing users to run commands, view their output, and provide textual feedback directly to the AI assistant.11,711MIT
- AlicenseAqualityDmaintenanceA Node.js/TypeScript MCP server that facilitates interactive communication between LLMs and users, allowing AI assistants to request user input, display notifications, and manage command-line chat sessions.5291MIT
- AlicenseNot gradedqualityCmaintenanceA cross-platform MCP server that provides native popup windows for AI agents to gather user feedback, input, and safety confirmations. It enables agents to present interactive questionnaires and secure confirmation prompts for sensitive operations like file deletion or code execution.13MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for AI dialogue using various LLM models via AceDataCloud
Push notifications for AI agents - send instant iPhone notifications from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ttommyth/interactive-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server



