interactive-mcp

MIT License
364
22
  • Apple
  • Linux

Integrations

  • Provides cross-platform support for Linux environments, allowing LLMs to interact directly with users on their local Linux machines.

  • Supports running on macOS with specific recommendations for Terminal.app settings to ensure a smooth experience with the interactive MCP server.

  • Implements the Model Context Protocol (MCP) server in Node.js, allowing seamless integration with the local operating system for displaying notifications and command-line prompts.

インタラクティブMCP

Node.js/TypeScriptで実装されたMCPサーバー。LLMとユーザー間のインタラクティブな通信を容易にします。**注:**このサーバーは、通知やコマンドラインプロンプトを表示するためにユーザーのオペレーティングシステムに直接アクセスする必要があるため、MCPクライアント(Claude Desktop、VS Codeなど)と並行してローカルで実行されるように設計されています。

(注: このプロジェクトはまだ初期段階です。)

**概要を知りたいですか?**紹介ブログ記事をご覧ください: AIアシスタントの推測を阻止する - interactive-mcpのご紹介

デモビデオ

ツール

このサーバーは、モデル コンテキスト プロトコル (MCP) を介して次のツールを公開します。

  • request_user_input : ユーザーに質問し、回答を返します。定義済みのオプションを表示できます。
  • message_complete_notification : 簡単な OS 通知を送信します。
  • start_intensive_chat : 永続的なコマンドライン チャット セッションを開始します。
  • ask_intensive_chat : アクティブな集中チャットセッション内で質問します。
  • stop_intensive_chat : アクティブな集中チャットセッションを閉じます。

デモ

インタラクティブ機能のデモを次に示します。

通常の質問完了通知
集中チャット開始集中チャット終了

使用シナリオ

このサーバーは、次のような LLM がローカル マシン上のユーザーと直接対話する必要があるシナリオに最適です。

  • 対話型のセットアップまたは構成プロセス。
  • コード生成または変更中にフィードバックを収集します。
  • ペアプログラミングにおける指示の明確化やアクションの確認。
  • LLM 操作中にユーザー入力または確認を必要とするワークフロー。

クライアント構成

このセクションではinteractive-mcpサーバーを使用するように MCP クライアントを構成する方法について説明します。

デフォルトでは、ユーザープロンプトは30秒後にタイムアウトします。クライアントの設定時に、 args配列の"--"の後にコマンドラインフラグを追加することで、タイムアウトや無効化ツールなどのサーバーオプションをカスタマイズできます。

npxコマンドが使用可能であることを確認してください。

Claude Desktop / Cursor での使用

次の最小限の構成をclaude_desktop_config.json (Claude Desktop) またはmcp.json (Cursor) に追加します。

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

カスタムタイムアウト(60秒)の例:

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

VS Codeでの使用

ユーザー設定 (JSON) ファイルまたは.vscode/mcp.jsonに次の最小限の構成を追加します。

{ "mcp": { "servers": { "interactive-mcp": { "command": "npx", "args": ["-y", "interactive-mcp"] } } } }
macOSの推奨事項

macOS でデフォルトのTerminal.appを使用してよりスムーズに操作するには、次のプロファイル設定を検討してください。

  • (シェルタブ): 「シェルの終了時」ターミナル > 設定 > プロファイル > [あなたのプロファイル] > シェル)で、 **「シェルが正常に終了した場合は閉じる」または「ウィンドウを閉じる」**を選択します。これにより、MCPサーバーの起動時と停止時のウィンドウ管理が容易になります。
  • (詳細タブ): 入力ターミナル > 設定 > プロファイル > [あなたのプロファイル] > 詳細)で、 **「Delete は Control-H を送信する」**オプションのチェックを外します。macOS ターミナルでは、デフォルトでは Delete キーを押すと Control-H(ASCII Backspace キー)が送信されます。このオプションのチェックを外すと、異なるシーケンスを要求するアプリケーションで役立つ場合がありますが、 \033[3~ (前方削除によく必要)のような特定のシーケンスを実現するには、他の設定やターミナルの代替手段が必要になる場合があります。

開発セットアップ

このセクションは、主にサーバーの修正や貢献を希望する開発者向けです。MCPクライアントでサーバーを使用するだけの場合は、上記の「クライアント設定」セクションをご覧ください。

前提条件

  • **Node.js:**バージョンの互換性についてはpackage.json確認してください。
  • **pnpm:**パッケージ管理に使用します。Node.js をインストールした後、 npm install -g pnpmでインストールしてください。

インストール(開発者)

  1. リポジトリをクローンします。
    git clone https://github.com/ttommyth/interactive-mcp.git cd interactive-mcp
  2. 依存関係をインストールします:
    pnpm install

アプリケーションの実行(開発者)

pnpm start
コマンドラインオプション

interactive-mcpサーバーは以下のコマンドラインオプションを受け入れます。これらのオプションは通常、MCP クライアントの JSON 設定で、 args配列に"--"区切りの後にオプションを追加することで設定します(「クライアント設定」の例を参照)。

オプションエイリアス説明
--timeout-tユーザー入力プロンプトのデフォルトのタイムアウト(秒単位)を設定します。デフォルトは 30 秒です。
--disable-tools-d特定のツールまたはグループ(カンマ区切りのリスト)を無効にします。サーバーがそれらを宣伝したり登録したりすることを防ぎます。オプション: request_user_inputmessage_complete_notificationintensive_chat

**例:**クライアント構成args配列に複数のオプションを設定する:

// Example combining options in client config's "args": // ... (other args like "-y", "interactive-mcp") "--", // Separator for server arguments "-t", "90", // Set timeout to 90 seconds "--disable-tools", "message_complete_notification,intensive_chat" // Disable notifications and intensive chat // ...

開発コマンド

  • ビルド: pnpm build
  • リント: pnpm lint
  • フォーマット: pnpm format

インタラクションの指針

この MCP サーバーと対話する場合 (たとえば、LLM クライアントとして)、明確さを確保し、予期しない変更を減らすために、次の原則に従ってください。

  • **インタラクションの優先順位付け:**提供されている MCP ツール ( request_user_inputstart_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ファイルを参照してください - 該当する場合、またはライセンスを直接指定してください)。

You must be authenticated.

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

local-only server

The server can only run on the client's local machine because it depends on local resources.

インタラクティブMCP

  1. Tools
    1. Demo
      1. Usage Scenarios
        1. Client Configuration
          1. Usage with Claude Desktop / Cursor
          2. Usage with VS Code
        2. Development Setup
          1. Prerequisites
          2. Installation (Developers)
          3. Running the Application (Developers)
        3. Development Commands
          1. Guiding Principles for Interaction
            1. Contributing
              1. License

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  An MCP server to run commands.
                  Last updated -
                  2
                  204
                  104
                  JavaScript
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  An MCP server that generates 2D and 3D game assets from text prompts using AI models from Hugging Face Spaces, allowing developers to easily create game art through Claude Desktop or other MCP clients.
                  Last updated -
                  34
                  JavaScript
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  An MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.
                  Last updated -
                  7
                  Python
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  An MCP server that leverages multiple Claude instances to provide enhanced responses by sending the same prompt to two separate instances and using a third to combine or select the best elements.
                  Last updated -
                  1
                  JavaScript

                View all related MCP servers

                ID: 205j0hivrj