Skip to main content
Glama
raghavharness

remote-shell-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
prompts
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
shellA

PRIMARY TOOL - Intelligent shell command handler for remote sessions.

This tool automatically detects and handles:

  1. Remote shell commands (ssh, gcloud compute ssh, aws ssm, az ssh, etc.) - Starts a persistent session

  2. Regular commands when session is active - Executes in the remote session

  3. Session control - Use special exit sequences to close the session

Smart Wait Time: Automatically adjusts wait time based on command type (longer for builds, shorter for ls).

Working Directory Tracking: Tracks cd commands and shows current directory in prompt.

Control sequences (to avoid conflict with normal commands):

  • ~. or //end - End session and return to local shell

  • //stop or //kill or //ctrl-c - Send Ctrl+C (SIGINT) to interrupt running command

Auto-reconnect: Sessions automatically attempt to reconnect on disconnection.

Sessions auto-cleanup after 1 hour of inactivity. Output is displayed exactly as the terminal shows.

remote_session_startA

Start a remote shell session with explicit parameters. Use for fine-grained control.

For most cases, prefer the shell tool which auto-detects remote commands.

remote_session_statusA

Get status of all remote sessions with working directory, port forwards, and auto-reconnect status.

remote_session_switchA

Switch the active session when multiple sessions are open.

remote_session_endA

End remote session(s). Use sessionId='all' to end all sessions.

remote_session_historyB

Get command history for a session with working directories.

remote_session_outputB

Read recent raw output from session buffer.

remote_session_signalA

Send a signal to the session (SIGINT=Ctrl+C, SIGTERM, SIGKILL, SIGHUP).

remote_session_searchC

Search through command history and output. Supports regex.

remote_session_errorsA

Find error messages in session history (looks for 'error', 'failed', 'denied', etc.).

remote_file_uploadA

Upload a file from local machine to the remote server.

Works with both SSH2 and child process sessions:

  • SSH2: Uses SFTP for efficient binary transfer

  • Child process: Uses base64 encoding through the shell

Example: Upload a config file to the server.

remote_file_downloadA

Download a file from the remote server to local machine.

Works with both SSH2 and child process sessions:

  • SSH2: Uses SFTP for efficient binary transfer

  • Child process: Uses base64 encoding through the shell

Example: Download logs or config files from a server.

remote_file_listA

List files in a remote directory with details (like ls -la).

remote_port_forward_localA

Start a LOCAL port forward (SSH -L style).

Listens on a local port and forwards connections to a port on the remote server.

Example: Access a database running on the remote server:

  • localPort: 5433

  • remoteHost: localhost

  • remotePort: 5432 → Connect to localhost:5433 to access the remote PostgreSQL

remote_port_forward_remoteA

Start a REMOTE port forward (SSH -R style).

Listens on a port on the remote server and forwards connections back to your local machine. Requires SSH2 session type.

Example: Expose a local dev server to the remote:

  • remotePort: 8080

  • localPort: 3000 → Remote server port 8080 forwards to your localhost:3000

remote_port_listA

List all active port forwards.

remote_port_stopA

Stop a specific port forward by ID.

remote_port_stop_allA

Stop all port forwards for a session or all sessions.

remote_blocks_listB

List command blocks for a session.

Each command execution creates a "block" containing the command and its output. Blocks can be searched, tagged, and referenced by ID.

remote_block_getA

Get a specific block by ID with full output.

Returns the complete command and output for a block.

remote_blocks_searchC

Search through command blocks.

Search command history and output across blocks.

remote_block_copyA

Get block output only (for copying).

Returns just the output without the command or metadata.

remote_block_tagA

Add tags to a block for organization.

Tags can be used to filter blocks when searching.

remote_block_untagA

Remove tags from a block.

remote_block_collapseC

Toggle or set block collapsed state.

remote_blocks_errorsA

Find error blocks in session history.

Returns blocks that had errors (non-zero exit or error patterns).

remote_pane_splitA

Split the current pane horizontally or vertically (tmux-style).

Creates a new pane within the session. Use for running multiple commands in parallel or monitoring.

remote_pane_focusC

Switch to a specific pane.

remote_pane_closeB

Close a pane (cannot close the last pane).

remote_pane_listA

List all panes for a session.

remote_pane_execA

Execute a command in a specific pane without switching focus.

remote_pane_broadcastA

Broadcast a command to all panes in a session.

Useful for running the same command in multiple contexts simultaneously.

remote_pane_renameB

Rename a pane for easier identification.

remote_pane_nextB

Switch to the next pane in the session.

remote_session_shareA

Share a terminal session for collaboration.

Creates a shareable URL that others can use to view (or control) your terminal session in real-time.

remote_session_unshareC

Stop sharing a session.

remote_shares_listA

List all active session shares.

remote_share_updateB

Update share settings (permissions, expiration).

remote_share_server_startA

Start the share server (usually starts automatically).

remote_share_server_stopA

Stop the share server and disconnect all viewers.

remote_swarm_createA

Create a swarm of parallel SSH sessions to multiple machines.

Swarms allow you to connect to multiple servers simultaneously and broadcast commands. Useful for managing clusters, fleets, or performing parallel operations.

Example targets for SSH: [{ "id": "web1", "host": "10.0.0.1", "username": "admin" }, { "id": "web2", "host": "10.0.0.2", "username": "admin" }]

Example targets for GCloud: [{ "id": "vm1", "instance": "my-vm-1", "zone": "us-central1-a" }, { "id": "vm2", "instance": "my-vm-2", "zone": "us-central1-a" }]

remote_swarm_listA

List all active swarms with their status.

remote_swarm_statusA

Get detailed status of a specific swarm including all targets.

remote_swarm_execA

Broadcast a command to all sessions in a swarm (parallel execution).

Returns aggregated output from all targets. Use for running the same command across multiple machines.

remote_swarm_inputA

Send input text to all sessions in a swarm.

Useful for responding to prompts (passwords, confirmations) across all targets.

remote_swarm_interruptA

Send Ctrl+C (SIGINT) to all sessions in a swarm.

remote_swarm_endA

End a swarm, closing all its sessions. Use swarmId='all' to end all swarms.

remote_swarm_add_targetB

Add a new target to an existing swarm.

remote_swarm_remove_targetA

Remove a target from a swarm (closes its session).

remote_session_inputA

Send input text to a session (respond to prompts, passwords, confirmations).

Use when a remote command is waiting for user input:

  • Password prompts

  • Y/N confirmations

  • Interactive text input

  • Any prompt ending with : or ?

Set hideInput=true for passwords to avoid logging sensitive data.

remote_session_check_promptA

Check if a session is waiting for user input (password, confirmation, etc.).

Returns details about any detected prompt and how to respond.

remote_session_confirmA

Send a Y/N confirmation response to a session.

remote_session_passwordA

Send a password to a session. Input is automatically hidden in responses.

Use when prompted for sudo password, SSH passphrase, or other secret input.

remote_stream_enableA

Enable real-time streaming for a session with error detection.

When enabled, the system monitors output in real-time for:

  • Error patterns (configurable)

  • Interactive prompts requiring input

  • Command completion

With autoInterrupt=true, it will automatically send Ctrl+C when errors are detected.

remote_stream_disableB

Disable real-time streaming for a session.

remote_stream_statusA

Get streaming status for a session (enabled, error count, pending prompts).

Prompts

Interactive templates invoked by user choice

NameDescription
end-sessionEnd the current remote shell session or all sessions. Aliases: end, exit, quit, close, disconnect
endAlias for end-session. End the current remote shell session.
exitAlias for end-session. End the current remote shell session.
quitAlias for end-session. End the current remote shell session.
closeAlias for end-session. End the current remote shell session.
disconnectAlias for end-session. End the current remote shell session.
stopSend Ctrl+C (SIGINT) to interrupt the current command. Aliases: kill, interrupt, ctrl-c
killAlias for stop. Send Ctrl+C (SIGINT) to interrupt the current command.
interruptAlias for stop. Send Ctrl+C (SIGINT) to interrupt the current command.
ctrl-cAlias for stop. Send Ctrl+C (SIGINT) to interrupt the current command.
session-statusShow status of all remote shell sessions
switch-sessionSwitch to a different remote shell session
session-historyShow command history for a session
exit-nestedExit a nested shell (inner SSH, sudo, docker exec, etc.) without killing the main session
new-sessionStart a new parallel SSH session without running inside the current active session
pwdShow the current working directory in the active session
reconnectManually trigger a reconnection attempt for the active session
upload-fileUpload a file to the remote server
download-fileDownload a file from the remote server
list-filesList files in a remote directory
port-forwardSet up a local port forward to access remote services locally
list-portsList all active port forwards
stop-portStop a port forward
stop-all-portsStop all port forwards
find-errorsSearch session history for error messages
search-outputSearch through command history and output
blocksList recent command blocks for the active session
blockGet a specific block by ID
block-searchSearch through command blocks
block-errorsFind error blocks in session history
block-tagTag a block for organization
splitSplit the current pane horizontally or vertically
panesList all panes in the current session
pane-focusSwitch to a specific pane
pane-closeClose a pane
broadcastBroadcast a command to all panes
shareShare the current session for collaboration
unshareStop sharing the current session
sharesList all active session shares
swarm-createCreate a swarm of parallel SSH sessions to multiple machines
swarm-listList all active swarms
swarm-execBroadcast a command to all sessions in a swarm
swarm-endEnd a swarm and close all its sessions
inputSend input to a session (respond to prompts, passwords, confirmations)
passwordSend a password to a session (input is hidden)
confirmSend a yes/no confirmation to a session
check-promptCheck if a session is waiting for user input
streamEnable/disable real-time streaming with error detection

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raghavharness/remote-shell-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server