Skip to main content
Glama

MCP VPS Initialize

A Model Context Protocol (MCP) server for automated VPS initialization and management. This tool provides SSH-based automation for setting up fresh VPS instances with common services and CI/CD pipelines.

Features

  • 🔐 SSH Authentication: Supports both password and private key authentication

  • 🛠️ VPS Initialization: Automated setup of Node.js, PM2, Rust, Nginx, Redis

  • 🌐 Nginx Configuration: Domain setup with reverse proxy and SSL certificates

  • 🚀 GitHub CI/CD: Automated deploy key generation and workflow creation

  • 📝 Comprehensive Logging: Winston-based structured logging

  • 🔧 TypeScript: Fully typed with strict TypeScript configuration

Related MCP server: ssh-alias-mcp

Installation

# Clone the repository
git clone <repository-url>
cd mcp-vps-initialize

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

Development

# Run in development mode
npm run dev

# Lint code
npm run lint
npm run lint:fix

# Format code
npm run format
npm run format:check

MCP Tools

1. SSH Connect

Connect to a VPS via SSH using password or private key authentication.

Parameters:

  • host (required): VPS IP address or hostname

  • username (required): SSH username

  • port (optional): SSH port (default: 22)

  • password (optional): SSH password

  • privateKeyPath (optional): Path to private key file

  • passphrase (optional): Private key passphrase

Example:

{
  "host": "192.168.1.100",
  "username": "root",
  "password": "your-password"
}

2. VPS Initialize

Initialize a fresh VPS with system updates and optional services.

Parameters:

  • services (optional): Object specifying which services to install

    • nodejs (boolean): Install Node.js LTS

    • pm2 (boolean): Install PM2 process manager

    • rust (boolean): Install Rust toolchain

    • nginx (boolean): Install and configure Nginx

    • redis (boolean): Install and configure Redis

Example:

{
  "services": {
    "nodejs": true,
    "pm2": true,
    "nginx": true,
    "redis": false
  }
}

3. Nginx Setup

Configure Nginx with domain, reverse proxy, and SSL certificates.

Parameters:

  • domain (required): Domain name for the site

  • port (required): Backend port to proxy requests to

  • ssl (optional): Enable SSL with Certbot (default: true)

Example:

{
  "domain": "example.com",
  "port": 3000,
  "ssl": true
}

4. GitHub CI/CD Setup

Setup GitHub CI/CD with deploy keys and automated workflows.

Parameters:

  • repoUrl (required): GitHub repository URL

  • deployPath (required): Deployment path on the server

Example:

{
  "repoUrl": "https://github.com/username/repo.git",
  "deployPath": "/opt/deployments/myapp"
}

5. Execute Command

Execute arbitrary commands on the connected VPS.

Parameters:

  • command (required): Command to execute

Example:

{
  "command": "systemctl status nginx"
}

Workflow

Basic VPS Setup

  1. Connect to VPS:

    {
      "tool": "ssh_connect",
      "args": {
        "host": "your-vps-ip",
        "username": "root",
        "password": "your-password"
      }
    }
  2. Initialize VPS:

    {
      "tool": "vps_initialize",
      "args": {
        "services": {
          "nodejs": true,
          "pm2": true,
          "nginx": true
        }
      }
    }
  3. Setup Nginx:

    {
      "tool": "nginx_setup",
      "args": {
        "domain": "yourdomain.com",
        "port": 3000,
        "ssl": true
      }
    }
  4. Setup CI/CD:

    {
      "tool": "github_cicd_setup",
      "args": {
        "repoUrl": "https://github.com/username/repo.git",
        "deployPath": "/opt/deployments/myapp"
      }
    }

GitHub CI/CD Instructions

After running the github_cicd_setup tool, you'll receive:

  1. Deploy Key: Add to your GitHub repository's Deploy Keys

  2. GitHub Secrets: Add to your repository's Actions secrets

  3. Workflow File: Add to .github/workflows/deploy.yml

The generated workflow will:

  • Trigger on pushes to main/master branch

  • Run tests (if available)

  • Build the application (if build script exists)

  • Deploy to your VPS automatically

Security Features

  • Firewall Configuration: Automatic UFW setup with secure defaults

  • SSL Certificates: Automated Let's Encrypt certificate generation

  • SSH Key Management: Secure deploy key generation

  • Process Isolation: Optional deploy user creation

Logging

Logs are written to:

  • logs/combined.log: All log levels

  • logs/error.log: Error logs only

  • Console: Formatted output with colors

Log levels: error, warn, info, debug

Configuration

The server can be configured through environment variables:

  • LOG_LEVEL: Set logging level (default: 'info')

  • PORT: Server port (if running standalone)

Troubleshooting

Common Issues

  1. SSH Connection Failed

    • Verify IP address and credentials

    • Check firewall settings

    • Ensure SSH service is running

  2. SSL Certificate Issues

    • Verify domain DNS points to server

    • Check firewall allows HTTP/HTTPS

    • Ensure email is valid for Let's Encrypt

  3. Service Installation Failed

    • Check system update status

    • Verify internet connectivity

    • Review error logs

Debug Mode

Enable debug logging:

LOG_LEVEL=debug npm start

Requirements

  • Node.js 18+

  • Fresh Ubuntu/Debian VPS

  • Domain name (for SSL setup)

  • GitHub repository (for CI/CD)

License

MIT License - see LICENSE file for details.

Available Tools

5 tools
execute_commandC

Execute a command on the connected VPS

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to execute

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'Execute a command' but lacks critical details: it doesn't specify permissions required, whether commands run with elevated privileges, potential side effects (e.g., data modification or system changes), error handling, or output format. This is inadequate for a tool that likely performs mutations on a VPS.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it highly efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (executing commands on a VPS implies potential mutations and security risks), lack of annotations, and no output schema, the description is incomplete. It fails to address behavioral aspects like safety, permissions, or result handling, leaving significant gaps for an agent to operate safely and effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'command' documented in the schema as 'Command to execute'. The description adds no additional meaning beyond this, such as examples of valid commands, syntax constraints, or security considerations. Given the high schema coverage, a baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Execute a command') and target resource ('on the connected VPS'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from its siblings like 'ssh_connect' or 'vps_initialize', which might also involve VPS operations, leaving some ambiguity about its unique role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether the VPS must be initialized or connected first), exclusions, or comparisons to sibling tools like 'ssh_connect' for remote access, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

github_cicd_setupC

Setup GitHub CI/CD with deploy keys and workflow

ParametersJSON Schema
NameRequiredDescriptionDefault
repoUrlYesGitHub repository URL
deployPathYesDeployment path on server

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'deploy keys and workflow', hinting at configuration and automation, but lacks critical details: whether this is a read-only or mutative operation (likely mutative given 'Setup'), what permissions are required, if it modifies existing setups, or potential side effects like overwriting files. This is inadequate for a tool that likely involves significant system changes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Setup GitHub CI/CD with deploy keys and workflow'. It's front-loaded with the core action and includes key components. However, it could be slightly more structured by explicitly separating purpose from context, but it avoids redundancy and wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of CI/CD setup (likely involving mutations, authentication, and system changes), the description is incomplete. No annotations exist to cover behavioral traits, and there's no output schema to explain return values. The description lacks details on what 'Setup' entails (e.g., creates files, configures secrets), success/failure conditions, or dependencies. This leaves significant gaps for an AI agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear parameter definitions ('repoUrl' as GitHub repository URL, 'deployPath' as deployment path on server). The description adds no additional meaning beyond the schema, such as format examples (e.g., URL structure) or constraints (e.g., path must exist). With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Setup GitHub CI/CD with deploy keys and workflow'. It specifies the verb ('Setup') and resource ('GitHub CI/CD'), and mentions key components (deploy keys and workflow). However, it doesn't explicitly differentiate from sibling tools like 'execute_command' or 'vps_initialize', which might also involve setup operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a GitHub repository or server access), exclusions (e.g., not for other CI/CD platforms), or how it relates to sibling tools like 'nginx_setup' or 'ssh_connect'. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nginx_setupC

Configure Nginx with domain, reverse proxy, and SSL

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name
portYesBackend port to proxy to
sslNoEnable SSL with Certbot

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Configure Nginx,' implying a mutation that likely changes system files and requires permissions, but doesn't specify if it's idempotent, destructive, or requires sudo/root access. It mentions SSL with Certbot, hinting at external dependencies, but lacks details on rate limits, error handling, or output format. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Configure Nginx with domain, reverse proxy, and SSL.' It's front-loaded with the core action and lists key features without redundancy. Every word earns its place, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of configuring Nginx (a mutation tool with system impact), no annotations, no output schema, and 3 parameters, the description is incomplete. It lacks details on behavioral traits (e.g., permissions, side effects), usage context, and what to expect upon completion (e.g., success message, file changes). The agent is left with significant gaps in understanding how to invoke and interpret results from this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal meaning beyond the input schema, which has 100% coverage with clear descriptions for 'domain,' 'port,' and 'ssl.' It implies that 'domain' and 'port' are used for reverse proxy setup and 'ssl' enables Certbot, but doesn't elaborate on syntax (e.g., domain format), defaults, or interactions between parameters. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Configure Nginx with domain, reverse proxy, and SSL.' It specifies the verb ('configure') and resources/features (Nginx, domain, reverse proxy, SSL), making the action concrete. However, it doesn't explicitly differentiate from sibling tools like 'vps_initialize' or 'github_cicd_setup', which might also involve configuration tasks, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing Nginx installed), exclusions (e.g., not for Apache setups), or comparisons to siblings like 'execute_command' for general commands or 'vps_initialize' for initial server setup. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ssh_connectC

Connect to a VPS via SSH using password or private key

ParametersJSON Schema
NameRequiredDescriptionDefault
hostYesVPS IP address or hostname
portNoSSH port (default: 22)
usernameYesSSH username
passwordNoSSH password (optional)
privateKeyPathNoPrivate key file path (optional)
passphraseNoPrivate key passphrase (optional)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool establishes an SSH connection but lacks details on what happens after connection (e.g., does it open a session, return a handle, or just verify connectivity?), error handling, timeout behavior, or security implications. This is inadequate for a tool that involves network operations and authentication.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose and authentication options without any fluff. It's front-loaded and appropriately sized for its function, with every word earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of SSH connections (involving network, authentication, and potential session management), no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., connection status, session ID), error cases, or behavioral traits like timeouts, leaving significant gaps for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear documentation for all 6 parameters (e.g., host as 'VPS IP address or hostname', port with default 22). The description adds no additional parameter semantics beyond what the schema provides, such as explaining interactions between password and privateKeyPath. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Connect to a VPS via SSH') and the authentication methods ('using password or private key'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'execute_command' (which might be for commands after connection) or 'vps_initialize' (which might be for initial setup).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'execute_command' (for running commands on an SSH connection) or 'vps_initialize' (for initial VPS setup). It mentions authentication methods but doesn't specify prerequisites or exclusions, leaving usage context implied at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

vps_initializeC

Initialize a fresh VPS with basic setup and optional services

ParametersJSON Schema
NameRequiredDescriptionDefault
servicesNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a creation/write operation ('initialize') but doesn't disclose critical traits like whether this is destructive to existing VPS configurations, authentication requirements, execution time, error handling, or rate limits. The phrase 'basic setup' is vague without elaboration.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place: 'initialize' (action), 'fresh VPS' (resource), 'basic setup' (scope), and 'optional services' (parameter hint). There's no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of initializing a VPS with multiple service options, no annotations, no output schema, and low schema coverage, the description is inadequate. It lacks details on what 'basic setup' entails, expected outcomes, error conditions, or how the tool interacts with siblings, making it incomplete for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description adds some context by mentioning 'optional services', which aligns with the 'services' parameter in the schema. However, it doesn't explain the structure of the services object or provide examples, leaving significant gaps in understanding how to use the parameters effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('initialize') and resource ('fresh VPS'), specifying 'with basic setup and optional services'. It distinguishes from siblings like 'execute_command' or 'nginx_setup' by focusing on comprehensive VPS initialization rather than specific tasks. However, it doesn't explicitly differentiate from 'github_cicd_setup' which might also involve setup activities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'nginx_setup' for just Nginx installation or 'github_cicd_setup' for CI/CD setup. It mentions 'optional services' but doesn't specify prerequisites, timing, or exclusions, leaving the agent to guess based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updates
    • First observedexecute_command
    • First observedgithub_cicd_setup
    • First observednginx_setup
    • First observedssh_connect
    • First observedvps_initialize

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: execute_command runs commands, github_cicd_setup configures CI/CD, nginx_setup handles web server setup, ssh_connect establishes SSH connections, and vps_initialize performs initial VPS setup. There is no overlap or ambiguity between these functions.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern (e.g., execute_command, nginx_setup, ssh_connect), but github_cicd_setup uses an acronym and vps_initialize includes 'vps' as a prefix, which slightly deviates from the pattern. Overall, the naming is readable and mostly predictable.

Tool Count5/5

With 5 tools, the server is well-scoped for VPS initialization tasks. Each tool serves a specific, necessary function in the setup process, from connecting to the VPS to configuring services, making the count appropriate and efficient.

Completeness4/5

The toolset covers core VPS initialization workflows, including connection, basic setup, command execution, web server configuration, and CI/CD integration. A minor gap might be the lack of tools for monitoring or backup setup, but agents can work around this with existing tools.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to securely manage Virtual Private Servers via SSH, with features including command execution, file operations, system monitoring, and service management.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to SSH into Linux servers, run commands, deploy code, and manage servers via natural language, also doubles as a CLI for manual use.
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables SSH command execution, file uploads/downloads, and multi-server management with zero-config inline credentials, supporting async jobs and AI-readable output.
    20
    2
    AGPL 3.0

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/oxy-Op/DevPilot'

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