Remote Session Mcp

by kayoch1n

295 downloads
Not rated
GitHub

About

A Model Context Protocol (MCP) server that enables AI assistants to manage persistent SSH sessions and execute commands on remote servers.

Details

Author
kayoch1n
Downloads
295
Categories
Other, Developer Tools

- Persistent SSH sessions with state across commands
- Automatic parsing of ~/.ssh/config for connection details
- Supports key-based authentication, custom ports, and jump hosts
- File upload and download capabilities
- List hosts and active sessions
- Configurable session timeout (default 1 hour)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Remote Session Mcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the server via uv pip install -e . or pip install -e ., then run remote-session-mcp or python -m remote_session_mcp. Ensure your remote servers are configured in ~/.ssh/config. Integrate with Claude Code by adding a mcpServers entry in your project’s mcp.json. Use the provided tools: hosts, create, execute, close, sessions, upload, and download.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "remote session mcp": {
            "remote-session": {
                "command": "remote-session-mcp"
            }
        }
    }
}

McpServers

{
    "remote-session": {
        "command": "remote-session-mcp"
    }
}

Remote Session MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to manage persistent SSH sessions and execute commands on remote servers.

Key Advantages

Persistent Sessions with State

Unlike SSH tools that execute single commands in isolation, this server uses invoke_shell() to maintain interactive shell sessions where state persists across multiple commands:

| Capability | Persistent Sessions | Single-Command |
|------------|---------------------|----------------|
| Working directory (cd) | Persists | Lost after each command |
| Environment variables (export) | Persists | Lost after each command |
| Multi-step workflows | Natural flow | Requires manual context passing |
| AI context awareness | Tracks pwd automatically | No state tracking |

Typical workflow:

create → execute("cd /app") → execute("export ENV=prod") → execute("./deploy.sh") → close

This is ideal for AI-driven deployment, debugging, and server management tasks where commands build on each other.

Automatic SSH Config Integration

- Parses ~/.ssh/config automatically for connection parameters
- Supports key-based authentication, custom ports, jump hosts, and all standard SSH options
- No need to hardcode credentials or connection details

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.