vps-ops-mcp

vps-ops-mcp

MCP server for monitoring and managing long-running processes on a remote VPS via SSH, with tools for status, logs, record summaries, and arbitrary command execution.

Category
访问服务器

README

vps-ops-mcp

An MCP server that puts a long-running process on a remote VPS behind a handful of tools an AI assistant can call. Is it alive, what do the logs say, what has it produced, and an escape hatch for everything else.

Node, stdio transport, one dependency. Works with any MCP client.

Written first, in Node. The Python successor, approval-gate-mcp, adds a human approval gate, hot-reload parameters, and a wider dashboard. Use this one if you want something small; use that one if you want the gate.

Why

Checking on a background process means opening a terminal, finding the host, remembering the log path, and reading ps output. None of that is hard and all of it is friction, which means you check less often than you should.

This turns the same job into a question you ask in whatever assistant you already have open, and it keeps the answer structured enough to act on.

Tools

Tool What it does
process_status Running or not, PID, uptime, CPU, memory, disk usage, last log line
process_logs(lines) Tail the last N lines of the log file, up to 500
record_summary(n) Parse the JSON records the process writes into totals, a breakdown by type, and recent entries
wallet_balance Optional. Read-only ERC-20 and native balance for a watch address
run_command(cmd) Escape hatch. Arbitrary shell over SSH

Install

git clone https://github.com/WillyV347/vps-ops-mcp
cd vps-ops-mcp
npm install
cp .env.example .env      # then edit it

Register it with your MCP client:

{
  "mcpServers": {
    "vps-ops": {
      "command": "node",
      "args": ["/absolute/path/to/vps-ops-mcp/index.js"],
      "env": {
        "VPS_HOST": "your.host.or.ip",
        "VPS_USER": "your-ssh-user",
        "PROCESS_DIR": "/srv/my-process",
        "PROCESS_MATCH": "my_process.py"
      }
    }
  }
}

VPS_HOST, VPS_USER, and PROCESS_DIR have no defaults. The server prints what is missing and exits. A monitoring tool that quietly falls back to a host baked in by its author is a bug, not a convenience.

Everything else is optional:

Variable Default Purpose
PROCESS_MATCH none Pattern used to find the process in ps. Without it, process_status tells you so
LOG_FILE $PROCESS_DIR/app.log Log file to tail
RECORDS_FILE $PROCESS_DIR/records.json JSON array the process appends to
SSH_KEY system default Path to a private key
EVM_RPC_URL none Enables wallet_balance when set with the two below
WALLET_ADDRESS none Watch address, read-only
TOKEN_CONTRACT none ERC-20 contract to read
TOKEN_DECIMALS 18 Decimals for that token

Authentication is your existing SSH setup. The server shells out to the system ssh binary, so agents, hardware keys, and password managers that expose an agent all work unchanged. It never reads a private key itself.

The records file

record_summary reads a JSON array. Four keys are interpreted if present and everything else is ignored, so you do not have to reshape your data to use it:

[
  {
    "id": "job-1041",
    "record_type": "reindex",
    "resolved": true,
    "outcome": "win",
    "cost": 4.25,
    "result": 11.80,
    "label": "nightly reindex, shard 3"
  }
]
  • record_type groups the breakdown
  • resolved splits done from open
  • outcome and result decide win or loss
  • cost and result are summed into totals

Example session

> is the process up?

  Process RUNNING

  PID:      31882
  Uptime:   14h 22m (51720s)
  CPU:      0.6%
  Memory:   84.3 MB
  Disk:     212M

  Last log: 2026-08-18 22:03:11 cycle complete, 4 records written

> how's it doing overall?

  Record Summary

  Total:       128
  Resolved:    121 (74 win / 47 loss)
  Pending:     7
  Success:     61.2%
  Net result:  46.90
  Gross input: 512.25

  By type
    reindex: 88 (55W/29L/4P) | net 38.40 | 65%
    compact: 40 (19W/18L/3P) | net 8.50 | 51%

Output above is illustrative.

Notes on safety

  • run_command runs arbitrary shell on the remote host. Scope the SSH user to what it actually needs rather than running everything as root.
  • wallet_balance is read-only and never touches a key. Leave it unconfigured and the tool is not registered at all.
  • No credential is stored in this repo. RPC providers put API keys in the URL path, so keep EVM_RPC_URL in the environment and out of your config files.
  • StrictHostKeyChecking is set to accept-new: unknown hosts are trusted on first connect, changed host keys still fail.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选