interactive-mcp

interactive-mcp

Enable interactive, local communication between LLMs and users via MCP.

313
Stars
25
Forks
313
Watchers
8
Issues
interactive-mcp implements a Model Context Protocol (MCP) server in Node.js/TypeScript, allowing Large Language Models (LLMs) to interact directly with users on their local machine. It exposes tools for requesting user input, sending notifications, and managing persistent command-line chat sessions, facilitating real-time communication. Designed for integration with clients like Claude Desktop and VS Code, it operates locally to access OS-level notifications and command prompts. The project is suited for interactive workflows where LLMs require user involvement or confirmation.

Key Features

Implements Model Context Protocol (MCP) server
Supports real-time user input requests
Provides local OS notifications to users
Manages persistent command-line chat sessions
Easy integration with desktop clients like Claude Desktop and VS Code
Built with Node.js and TypeScript
Enables confirmation and clarification dialogues
Facilitates feedback collection during code generation
Offers persistent multi-step chat interactions
Runs alongside clients for local context access

Use Cases

Interactive setup or software configuration processes
Real-time clarification during code generation or modification
Receiving step-by-step user input for workflow automation
Sending completion or status notifications to users
Pair programming with AI assistants requiring confirmation
Gathering feedback during complex task execution
Engaging users in multi-turn command-line conversations
Local LLM-driven applications that need OS-level prompts
AI-powered tools needing direct user responses or approval
Interactive instructional guidance or onboarding by LLMs

README

interactive-mcp

npm version npm downloads smithery badge GitHub license code style: prettier Platforms GitHub last commit

Install MCP Server

Screenshot 2025-05-13 213745

A MCP Server implemented in Node.js/TypeScript, facilitating interactive communication between LLMs and users. Note: This server is designed to run locally alongside the MCP client (e.g., Claude Desktop, VS Code), as it needs direct access to the user's operating system to display notifications and command-line prompts.

(Note: This project is in its early stages.)

Want a quick overview? Check out the introductory blog post: Stop Your AI Assistant From Guessing — Introducing interactive-mcp

Demo Video

Tools

This server exposes the following tools via the Model Context Protocol (MCP):

  • request_user_input: Asks the user a question and returns their answer. Can display predefined options.
  • message_complete_notification: Sends a simple OS notification.
  • start_intensive_chat: Initiates a persistent command-line chat session.
  • ask_intensive_chat: Asks a question within an active intensive chat session.
  • stop_intensive_chat: Closes an active intensive chat session.

Demo

Here are demonstrations of the interactive features:

Normal Question Completion Notification
Normal Question Demo Completion Notification Demo
Intensive Chat Start Intensive Chat End
Start Intensive Chat Demo End Intensive Chat Demo

Usage Scenarios

This server is ideal for scenarios where an LLM needs to interact directly with the user on their local machine, such as:

  • Interactive setup or configuration processes.
  • Gathering feedback during code generation or modification.
  • Clarifying instructions or confirming actions in pair programming.
  • Any workflow requiring user input or confirmation during LLM operation.

Client Configuration

This section explains how to configure MCP clients to use the interactive-mcp server.

By default, user prompts will time out after 30 seconds. You can customize server options like timeout or disabled tools by adding command-line flags directly to the args array when configuring your client.

Please make sure you have the npx command available.

Usage with Claude Desktop / Cursor

Add the following minimal configuration to your claude_desktop_config.json (Claude Desktop) or mcp.json (Cursor):

json
{
  "mcpServers": {
    "interactive": {
      "command": "npx",
      "args": ["-y", "interactive-mcp"]
    }
  }
}

With specific version

json
{
  "mcpServers": {
    "interactive": {
      "command": "npx",
      "args": ["-y", "interactive-mcp@1.9.0"]
    }
  }
}

Example with Custom Timeout (30s):

json
{
  "mcpServers": {
    "interactive": {
      "command": "npx",
      "args": ["-y", "interactive-mcp", "-t", "30"]
    }
  }
}

Usage with VS Code

Add the following minimal configuration to your User Settings (JSON) file or .vscode/mcp.json:

json
{
  "mcp": {
    "servers": {
      "interactive-mcp": {
        "command": "npx",
        "args": ["-y", "interactive-mcp"]
      }
    }
  }
}

macOS Recommendations

For a smoother experience on macOS using the default Terminal.app, consider this profile setting:

  • (Shell Tab): Under "When the shell exits" (Terminal > Settings > Profiles > [Your Profile] > Shell), select "Close if the shell exited cleanly" or "Close the window". This helps manage windows when the MCP server starts and stops.

Development Setup

This section is primarily for developers looking to modify or contribute to the server. If you just want to use the server with an MCP client, see the "Client Configuration" section above.

Prerequisites

  • Node.js: Check package.json for version compatibility.
  • pnpm: Used for package management. Install via npm install -g pnpm after installing Node.js.

Installation (Developers)

  1. Clone the repository:

    bash
    git clone https://github.com/ttommyth/interactive-mcp.git
    cd interactive-mcp
    
  2. Install dependencies:

    bash
    pnpm install
    

Running the Application (Developers)

bash
pnpm start

Command-Line Options

The interactive-mcp server accepts the following command-line options. These should typically be configured in your MCP client's JSON settings by adding them directly to the args array (see "Client Configuration" examples).

Option Alias Description
--timeout -t Sets the default timeout (in seconds) for user input prompts. Defaults to 30 seconds.
--disable-tools -d Disables specific tools or groups (comma-separated list). Prevents the server from advertising or registering them. Options: request_user_input, message_complete_notification, intensive_chat.

Example: Setting multiple options in the client config args array:

jsonc
// 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
]

Development Commands

  • Build: pnpm build
  • Lint: pnpm lint
  • Format: pnpm format

Guiding Principles for Interaction

When interacting with this MCP server (e.g., as an LLM client), please adhere to the following principles to ensure clarity and reduce unexpected changes:

  • Prioritize Interaction: Utilize the provided MCP tools (request_user_input, start_intensive_chat, etc.) frequently to engage with the user.
  • Seek Clarification: If requirements, instructions, or context are unclear, always ask clarifying questions before proceeding. Do not make assumptions.
  • Confirm Actions: Before performing significant actions (like modifying files, running complex commands, or making architectural decisions), confirm the plan with the user.
  • Provide Options: Whenever possible, present the user with predefined options through the MCP tools to facilitate quick decisions.

You can provide these instructions to an LLM client like this:

markdown
# 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.

Contributing

Contributions are welcome! Please follow standard development practices. (Further details can be added later).

License

MIT (See LICENSE file for details - if applicable, or specify license directly).

Star History

Star History Chart

Repository Owner

ttommyth
ttommyth

User

Repository Details

Language TypeScript
Default Branch main
Size 19,541 KB
Contributors 4
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
85.17%
JavaScript
14.66%
Shell
0.17%

Tags

Topics

mcp mcp-server vibe-coding vibecoding

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP Manager for Claude Desktop

    MCP Manager for Claude Desktop

    A desktop app to manage Model Context Protocol (MCP) servers for Claude Desktop on MacOS.

    MCP Manager for Claude Desktop provides a user-friendly interface to manage Model Context Protocol (MCP) servers, enabling Claude to access private data, APIs, and local or remote services securely from a MacOS desktop. It facilitates rapid configuration and integration with a wide variety of MCP servers, including productivity tools, databases, and web APIs. The app runs locally to ensure data privacy and streamlines connecting Claude to new sources through simple environment and server settings management.

    • 270
    • MCP
    • zueai/mcp-manager
  • mcp-cli

    mcp-cli

    A command-line inspector and client for the Model Context Protocol

    mcp-cli is a command-line interface tool designed to interact with Model Context Protocol (MCP) servers. It allows users to run and connect to MCP servers from various sources, inspect available tools, resources, and prompts, and execute commands non-interactively or interactively. The tool supports OAuth for various server types, making integration and automation seamless for developers working with MCP-compliant servers.

    • 391
    • MCP
    • wong2/mcp-cli
  • MCP CLI

    MCP CLI

    A powerful CLI for seamless interaction with Model Context Protocol servers and advanced LLMs.

    MCP CLI is a modular command-line interface designed for interacting with Model Context Protocol (MCP) servers and managing conversations with large language models. It integrates with the CHUK Tool Processor and CHUK-LLM to provide real-time chat, interactive command shells, and automation capabilities. The system supports a wide array of AI providers and models, advanced tool usage, context management, and performance metrics. Rich output formatting, concurrent tool execution, and flexible configuration make it suitable for both end-users and developers.

    • 1,755
    • MCP
    • chrishayuk/mcp-cli
  • iterm-mcp

    iterm-mcp

    MCP server for sharing and controlling your iTerm session with AI models.

    iterm-mcp is a Model Context Protocol (MCP) server that enables AI models to access, inspect, and control an active iTerm terminal session. It allows models to read terminal output, write commands, interact with REPLs, and send control characters directly to the terminal. Designed for efficient token usage and seamless integration with desktop AI clients like Claude Desktop, iterm-mcp can be installed easily and comes with minimal dependencies. The tool emphasizes user oversight and provides debugging support through the MCP Inspector.

    • 481
    • MCP
    • ferrislucas/iterm-mcp
  • MCP Notify Server

    MCP Notify Server

    Send desktop notifications with sound for completed agent/LLM tasks using the MCP protocol.

    MCP Notify Server provides system desktop notifications and sound alerts when AI agent tasks or LLM jobs finish. Built on the standard Model Context Protocol, it is cross-platform and designed for smooth integration with clients like Claude Desktop, Cursor, and VSCode. This tool leverages the Apprise API for notification delivery and includes configuration details for easy adoption across popular AI/LLM development environments.

    • 39
    • MCP
    • Cactusinhand/mcp_server_notify
  • mcp-server-commands

    mcp-server-commands

    Expose safe shell command execution as an MCP server for LLM tooling.

    mcp-server-commands exposes a server that provides a 'run_command' tool for local or remote large language models (LLMs) via the Model Context Protocol (MCP). It enables LLMs to execute shell commands, retrieve STDOUT and STDERR, and optionally pass data through stdin. The tool integrates with apps like Claude Desktop and Groq Desktop, and can be run via npm or as a local build, with security in mind.

    • 207
    • MCP
    • g0t4/mcp-server-commands
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results