Skip to main content
Glama
deployment-mcp

deployment-mcp

by jsilvanus

deployment-mcp

An MCP (Model Context Protocol) server that handles deployment operations over SSH.

Features

  • ssh_git_pull – SSH into a remote host and run git pull in a specified repository directory.

  • ssh_run_command – Execute an arbitrary shell command on a remote host and return its stdout, stderr and exit code.

  • ssh_run_script – Upload and execute a multi-line shell script on a remote host (piped to bash; no temporary files created locally).

  • write_ssh_config – Write or update a Host entry in the local ~/.ssh/config file.

All SSH tools support authentication via an inline PEM private key, a path to a key file, or a password.

Related MCP server: MCP SSH Server

Installation

npm install
npm run build

Usage

Run the MCP server over stdio (used by MCP-compatible AI clients):

node dist/index.js

MCP client configuration example

{
  "mcpServers": {
    "deployment": {
      "command": "node",
      "args": ["/path/to/deployment-mcp/dist/index.js"]
    }
  }
}

Tool examples

ssh_git_pull

{
  "host": "my-server.example.com",
  "username": "deploy",
  "privateKeyPath": "~/.ssh/id_rsa",
  "repoPath": "/var/www/myapp",
  "branch": "main"
}

ssh_run_command

{
  "host": "my-server.example.com",
  "username": "deploy",
  "privateKeyPath": "~/.ssh/id_rsa",
  "command": "systemctl restart myapp"
}

ssh_run_script

{
  "host": "my-server.example.com",
  "username": "deploy",
  "privateKeyPath": "~/.ssh/id_rsa",
  "workingDirectory": "/var/www/myapp",
  "script": "#!/bin/bash\nset -e\ngit pull\nnpm install --omit=dev\nnpm run build\npm2 restart myapp"
}

write_ssh_config

{
  "alias": "my-server",
  "hostname": "my-server.example.com",
  "user": "deploy",
  "identityFile": "~/.ssh/deploy_key",
  "extraOptions": {
    "StrictHostKeyChecking": "no",
    "ServerAliveInterval": "60"
  }
}

Development

npm run dev    # TypeScript watch mode
npm test       # Run tests
npm run build  # Compile TypeScript

Available Tools

4 tools
ssh_git_pullB

SSH into a remote host and run git pull in the specified repository directory. Supports authentication via private key (PEM string or file path) or password.

Inputs: host (required), repoPath (required), username (required), port, +5 more.

ssh_run_commandB

SSH into a remote host and run an arbitrary shell command. Returns stdout, stderr and the exit code.

Inputs: host (required), command (required), username (required), port, +4 more.

ssh_run_scriptA

SSH into a remote host and execute a multi-line shell script. The script content is piped to bash remotely; no temporary files are created locally.

Inputs: host (required), script (required), username (required), port, +5 more.

write_ssh_configA

Write (or update) a Host entry in the local ~/.ssh/config file. If an entry with the same alias already exists it is replaced. Useful for setting up SSH config before running deployment commands.

Inputs: user (required), alias (required), hostname (required), port, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation4/5

    Tools are mostly distinct: git pull, command execution, script execution, and SSH config writing each target different actions. Some overlap between run_command and run_script but descriptions clarify the difference.

    Naming Consistency4/5

    All tools use snake_case with ssh_ prefix, following a verb_noun pattern. `ssh_git_pull` is slightly inconsistent (compound verb) but overall pattern is predictable.

    Tool Count4/5

    Four tools is a reasonable scope for a focused deployment server covering SSH execution and config. Could be expanded but not overly sparse.

    Completeness2/5

    Lacks critical deployment operations like file transfer (scp/rsync), service management, or environment setup. The set is too limited for typical deployment workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables SSH operations including connecting to remote servers, executing commands, and transferring files between local and remote systems. Supports multiple SSH connections with both password and private key authentication methods.
      18
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables seamless SSH operations including secure connections, file transfers, interactive shell sessions, and Docker container management on remote servers. Supports both password and SSH key authentication with credential management and connection pooling.
      18
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Enables SSH remote command execution on remote machines with persistent connections, supporting automatic key discovery and connection pooling.
      2
      156 npm
      MIT