Labsco
ttommyth logo

interactive-mcp

β˜… 348

from ttommyth

Enables interactive LLM workflows by adding local user prompts and chat capabilities directly into the MCP loop.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

interactive-mcp

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

Intensive Chat Start Intensive Chat End

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:

Copy & paste β€” that's it
# 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).