MCP server for interactive terminal sessions

MCP server for interactive terminal sessions

mcp_interactive_terminal•bydanielp370-msft

A FastMCP-based server that lets an agent start, monitor, send commands to, and terminate interactive command-line sessions such as gdb, UART consoles, or other REPL-based tools.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Starts a new interactive session by invoking a shell command with arguments and an optional log file for session output.
  • •Waits for specific output or prompts within a timeout and can also retrieve the current output buffer.
  • •Sends commands to an interactive session and terminates it on request.
  • •Lists all active interactive sessions with their statuses.

BEST FOR

  • •Automating debugger or REPL workflows by having an agent drive interactive prompts.
  • •Managing a running Python interactive session where commands are sent and output is awaited.

ABOUT MCP_INTERACTIVE_TERMINAL

MCP server for interactive terminal sessions is cataloged as an MCP server attributed to danielp370-msft. A FastMCP-based server that lets an agent start, monitor, send commands to, and terminate interactive command-line sessions such as gdb, UART consoles, or other REPL-based tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for interactive terminal sessions are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which transports does the server support?

It supports three FastMCP transport options: stdio by default, plus sse and streamable-http.

Can session output be logged to a file?

Yes, the start session tool accepts an optional log_file path where session output will be written; without it, no logging occurs.

Upstream README

View this exact version on GitHub

README.md · 5b6e30355a04 · Fetched 2026-11-13 13:59:15 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MCP Interactive Terminal Server

Overview

The MCP Interactive Terminal Server allows an agent to interact with a command-line driven prompt. This is useful for automating and managing interactive terminal commands such as gdb, a UART console, or any other REPL-based tool. Built using the FastMCP package, it provides tools for managing interactive terminal sessions and adheres to the latest MCP standards. The server supports three transport options offered by FastMCP: stdio (default), sse, and streamable-http, making it versatile for various use cases.

Installation

Prerequisites

  1. Python 3.12 or later Ensure you have Python 3.12 or newer installed on your system.

  2. UV Astral Package Manager UV Astral is an optional package manager that handles dependencies. If you use it, it will provide Python with only the dependencies you need. If you invoke commands that require other dependencies, you can add them to the UV dependencies so that they get loaded as well. It may be better to do this in the downstream package or not use UV if the environment is set up to provide all packages directly.

    Install UV using one of the following methods:

    • Standalone Installer:
      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    • Pip Installation:
      pip install uv
      

    Verify the installation:

    uv --version
    

Adding Dependencies to UV Astral

If you are using UV Astral as your package manager, you can optionally add Python and other dependencies to its configuration. For detailed instructions on managing dependencies with UV Astral, refer to the UV Astral official documentation.

Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/danielp370-msft/mcp_interactive_terminal
cd mcp_interactive_terminal

Usage

Running the Server

Using VS Code

  1. Open the project in VS Code.

  2. Ensure the .vscode/mcp.json file is configured correctly. You can use either of the following examples:

    Example 1: Using uv (package manager)

    {
      "servers": {
        "interactive-terminal-server": {
          "type": "stdio",
          "command": "uv",
          "args": ["run", "${workspaceFolder}/interactive/server.py"]
        }
      }
    }
    

    Example 2: Using python directly (current default)

    {
      "servers": {
        "interactive-terminal-server": {
          "type": "stdio",
          "command": "python3.13",
          "args": ["${workspaceFolder}/interactive/server.py"]
        }
      }
    }
    

    Example 3: Using streamable-http transport

    {
      "servers": {
        "interactive-terminal-server": {
          "type": "http",
          "url": "http://localhost:8070/mcp/"
        }
      }
    }
    
  3. Start the server using the MCP interface in VS Code.

Using the Command Line

Note: You only need to invoke the server on the command line if you are using non-stdio transport options (like streamable-http) or if you want to run it outside of VS Code. For stdio, the VS Code MCP interface can launch the server automatically.

  • Stdio Transport (Default):

    uv run python -m interactive.server
    

    You can also run the server without uv if you want to use the packages provided by your runtime environment:

    python -m interactive.server
    
  • Streamable HTTP Transport:

    uv run python -m interactive.server --transport streamable-http --port 8070
    

    Or without uv:

    python -m interactive.server --transport streamable-http --port 8070
    

Interactive Terminal Tools

The server provides the following tools:

  1. Start Session:

    • Description: Start a new interactive session by invoking a shell command.
    • Parameters:
      • command (str): The command to start the session (e.g., python).
      • args (list): Arguments for the command.
      • log_file (str, optional): Path to a log file where session output will be written. If not provided, no logging will occur.
    • Returns: A message with the session ID.
  2. Wait for Output or Prompt:

    • Description: Wait for specific output, a prompt, or gather output within a timeout.
    • Parameters:
      • session_id (int): The ID of the session to monitor.
      • prompts (list): A list of strings to detect in the output (e.g., prompts or specific text).
      • timeout (int): The maximum time to wait for the output, in seconds.
    • Returns: A message indicating the detected output, or a timeout message if no match is found.
    • Note: This function can also be used to retrieve the current output buffer.
  3. Send Command:

    • Description: Send a command to the interactive session.
    • Parameters:
      • session_id (int): The session ID.
      • command (str): The command to send.
    • Returns: A message indicating success or failure.
  4. Exit Session:

    • Description: Terminate the interactive session.
    • Parameters:
      • session_id (int): The ID of the session to terminate.
    • Returns: A message indicating the session termination status.
  5. Get Active Sessions:

    • Description: Retrieve a list of all active interactive sessions.
    • Returns: A dictionary containing session IDs and their statuses.

Starting a Session

You can start a new session using the start_session tool.

start_session(command: str, args: list, log_file: str = None)
  • command: The command to start the interactive session (e.g., 'python').
  • args: A list of arguments to pass to the command.
  • log_file: Optional log file to write session output.

Example:

start_session("python", ["-i"])

This will start a Python interactive session.

Testing

Run the unit tests to validate the server's functionality:

uv run python3 -m unittest

References

Acknowledgments

This product was vibe coded with the help of Daniel Potts, who deserves special thanks for pestering the AI to do endless rounds of interactive testing — truly a champion of quality assurance (and patience). No human directly wrote any code, documentation, or even bothered to help push into a PR for this project. All code and documentation were generated with the assistance of GitHub Copilot (OpenAI GPT-4).

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for interactive terminal sessions from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp_interactive_terminal)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools