home / mcp / vps mcp server

VPS MCP Server

Provides an MCP server to connect to and manage a VPS via SSH, enabling file operations and command execution through a secure session.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "harjjotsinghh-vps-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "vps-mcp"
      ]
    }
  }
}

This MCP server lets an AI agent connect to and manage a VPS over SSH, giving you secure session control, file system operations, and remote command execution. It streamlines interacting with a VPS from an MCP client by exposing a compact set of tools to manage files, directories, and shell commands through a tracked SSH session.

How to use

You establish an SSH session to your VPS and then perform actions like listing directories, reading or writing files, creating or deleting items, and running shell commands. The session is maintained as long as you keep the connection open. Use the following tools to manage the VPS during an MCP session: you can open a session, perform file operations, and execute commands with the results returned to you. When you want to change the working directory for subsequent actions, use the change directory tool; otherwise, most commands automatically run relative to your current directory.

How to install

Prerequisites you need on your control machine: a node-enabled environment with npx available. You can use Node.js and npm to access npx, which runs the MCP server locally.

Install and configure the MCP client to connect to the VPS MCP server by adding the following server entry to your MCP client configuration:

{
  "mcpServers": {
    "vps": {
      "command": "npx",
      "args": ["-y", "vps-mcp"]
    }
  }
}

Additional notes

To start using the VPS MCP server, run the provided startup command in your environment where MCP clients are executed. This begins the stdio-based MCP server workflow that uses a local npx command to launch the vps-mcp package.

Configuration and usage notes

Available operations include establishing an SSH session, ending the session, directory and file management, and executing shell commands. Remember that execution commands are automatically prefixed with changing to your current working directory, so you generally don’t need to prepend cd yourself unless you want to persistently shift the directory for multiple operations.

Available tools

connect_vps

Establish SSH connection to the VPS using Host, Port, User, and Password or Key.

disconnect_vps

Close the active SSH session to the VPS.

list_directory

List files and folders in a specified path, supporting relative paths from the current working directory.

create_directory

Create a new directory at the specified path.

read_file

Read and return the contents of a file.

write_file

Create or overwrite a file with provided content.

delete_item

Recursively delete a file or directory.

change_directory

Change the current working directory for subsequent operations.

get_current_directory

Retrieve the current tracked working directory for subsequent actions.

execute_command

Run a shell command, automatically prefixed with the current working directory. For persistent directory changes, use change_directory.