Skip to content

API Reference

This page lists the MCP tools and resources currently exposed by Maverick SSH MCP.

Tool Areas

  • Connection
  • Shell
  • Expect shell
  • Local sockets
  • SFTP
  • SCP
  • Tunnels
  • SSH Teams integration

Connection Tools

Tool Purpose
ssh_connect Open an SSH connection and return an sshHandle.
ssh_status Get status and metadata for one sshHandle.
ssh_close Close an sshHandle.

Shell Tools

Tool Purpose
shell_open Open an interactive shell or run a remote command on an SSH handle.
shell_write Write input to a shell handle.
shell_read Read stdout and stderr currently available on a shell handle.
shell_close Close a shell handle.

Expect Shell Tools

Tool Purpose
expectShellOpen Build an ExpectShell from an existing shellHandle and return an expectShellHandle.
expectShellClose Close an expectShellHandle.
expectShellGetCharacterEncoding Read the active character encoding.
expectShellSetCharacterEncoding Update the character encoding.
expectShellSetShellInitTimeout Update the global legacy shell init timeout used by ExpectShell.
expectShellInStartup Check whether startup detection is still active.
expectShellSu Run su and return a child expectShellHandle when successful.
expectShellSudo Run sudo and return process state/output metadata.
expectShellIsClosed Check whether an expect shell is closed.
expectShellExit Exit the remote shell and close the expect shell handle.
expectShellGetNewline Return the OS-specific newline sequence used by the shell.
expectShellExecuteWithOutput Execute a command and return command output.
expectShellExecuteWithExitCode Execute a command and return command exit code.
expectShellExecute Execute a command without returning command output.
expectShellExecuteCommand Execute with advanced options (matchPromptMarker, consume, charset) and return process metadata.
expectShellGetNumCommandsExecuted Return the command count observed by this ExpectShell.
expectShellGetOsType Return the detected legacy OS type code.
expectShellGetOsDescription Return the detected OS description.

Local Socket Tools

Tool Purpose
socket_open Open an outbound local TCP socket and return a socketHandle.
socket_status Get status and metadata for one socketHandle.
socket_set_options Update socket options on an existing socketHandle.
socket_write Write bytes to an open socket handle.
socket_read Read bytes from an open socket handle.
socket_close Close a socket handle.
socket_listen_open Open a listening socket and return a socketListenerHandle.
socket_listen_accept Accept one incoming connection and return a socketHandle.
socket_listen_close Close a listening socket handle.

SFTP Tools

Tool Purpose
sftp_open Open an SFTP client and return an sftpHandle.
sftp_close Close an sftpHandle.
sftp_pwd Get current remote working directory.
sftp_cd Change remote working directory.
sftp_ls List files in a directory.
sftp_stat Read remote file or directory attributes.
sftp_mkdir Create a remote directory.
sftp_rmdir Remove a remote directory.
sftp_rm Remove a remote file or directory tree.
sftp_rename Rename a remote file or directory.
sftp_symlink Create a symbolic link.
sftp_chmod Change file or directory permissions.
sftp_chown Change file or directory owner and group.
sftp_file_open Open a remote file for random access and return an sftpFileHandle.
sftp_file_read Read bytes at a specific offset from an open file handle.
sftp_file_write Write bytes at a specific offset to an open file handle.
sftp_file_close Close an sftpFileHandle.

SCP Tools

Tool Purpose
scp_copy_to Upload files or directories to the remote host.
scp_copy_from Download files or directories from the remote host.

Tunnel Tools

Tool Purpose
tunnel_open_local Open local port or Unix-socket forwarding and return a tunnelHandle.
tunnel_open_remote Open remote port or Unix-socket forwarding and return a tunnelHandle.
tunnel_close Close a tunnel handle.

SSH Teams Tools

Tool Purpose
sshteam_register Start OAuth device flow registration for this runtime.
sshteam_register_poll Poll device flow completion using a deviceCode.
sshteam_status List local registrations and token status.
sshteam_revoke_device Revoke a registered remote device by id.

For full SSH Teams workflow details, see SSH Teams Integration.

MCP Resources

Resource URI Purpose
mcp://maverick/handles Snapshot of active SSH, shell, expect shell, SFTP, file, and tunnel handles.

Notes

  • Most tools are handle-oriented: call open first, then work with the returned handle, then close.
  • For destructive operations, include confirm=true when prompted by gate responses.