Back to Browse

Vps MCP Server

Developer ToolsUse Caution3.8MCP RegistryLocal
Free

Server data from the Official MCP Registry

Autonomous Digital Secretary and VPS MCP platform with Executive Web Cockpit

About

Autonomous Digital Secretary and VPS MCP platform with Executive Web Cockpit

Security Report

3.8
Use Caution3.8High Risk

This is a large, legitimate-looking VPS management and personal assistant platform with SSH host-key pinning, a dedicated unprivileged user, and secrets pulled from the keychain or env rather than hardcoded. The main concern is that the generated sudoers profile grants the MCP user root-equivalent access to tee, cat, install, rm, curl, tar, chown and chmod, which would let a compromised client write arbitrary root-owned files even though the server itself is designed to issue only fixed command templates. The shown code is truncated, so the remaining tool implementations and the Telegram and Google integrations could not be fully reviewed. Supply chain analysis found 13 known vulnerabilities in dependencies (0 critical, 4 high severity).

4 files analyzed Β· 17 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

ssh_remote_exec

Check that this permission is expected for this type of plugin.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

process_spawn

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

clipboard

Check that this permission is expected for this type of plugin.

root_sudo

Check that this permission is expected for this type of plugin.

telegram_account

Check that this permission is expected for this type of plugin.

google_oauth

Check that this permission is expected for this type of plugin.

How to Install

Install command not verified. See the repository for install instructions.

View repository

Documentation

View on GitHub

From the project's GitHub README.

VPS-MCP & Digital Secretary

PyPI Python 3.12+ Website Glama MCP Server MCP Observatory risk grade MCP Registry Tools License: MIT

🌐 Interactive Landing Page & Visual Tool Explorer: Explore live demos, architecture blueprints, and search all 45 MCP tools at https://www.navidmirnouri.com/vps-mcp/.

An enterprise-grade Model Context Protocol (MCP) platform and autonomous Executive Digital Secretary that bridges AI models (Claude, Groq, DeepSeek, Qwen, Nemotron) with real-world infrastructure, enterprise databases, Git workflows, knowledge libraries, and personal productivity channels.

The system runs locally on your machine, communicating over secure SSH to remote servers without requiring persistent background daemons on target hosts.



Core Platform Pillars

  • Executive Web Cockpit & Telegram Assistant (assistant): A local dark-mode command center (http://127.0.0.1:8765) and always-on Telegram bot with multi-model routing (Groq, DeepSeek, local Qwen via LM Studio, Nemotron), multi-step tool execution loops, GFM Markdown tables, and human-in-the-loop action approval guardrails for sensitive actions.
  • Remote Infrastructure & Services (16 tools): Zero-footprint management of systemd services and Docker/Podman containers over SSH. Features live telemetry, journalctl log inspection, restart/stop/boot controls, and declarative configuration deployment with syntax diff previews and automatic rollback on health-check failure.
  • Database & Migration Rehearsal (13 tools): Deep PostgreSQL and Odoo schema inspection, database-to-database diffing with automated risk verdict generation (safe_to_promote, review_warnings, do_not_promote), and deterministic upgrade rehearsals on disposable copy databases.
  • GitLab CI/CD & Production Deployments (15 tools): Direct integration with self-hosted or cloud GitLab instances. Inspect commits, merge requests, branches, and pipeline jobs; verify deployment targets; and trigger zero-downtime ref rollouts to production with automatic health verification.
  • Knowledge Base Dense Semantic RAG (6 tools): Dedicated vector library for indexing technical books (e.g. Designing Data-Intensive Applications), research papers, and documents using FAISS and SentenceTransformers (all-MiniLM-L6-v2) with page-level citations. Completely isolated from operator profile memory.
  • Google Workspace Integration (8 tools): OAuth 2.0 integration for Google Calendar (calendar__events, calendar__create) and Gmail (email__inbox, email__send, email__draft), with interactive phone and desktop approval gating for outgoing communications.
  • Personal Telegram MTProto Client (5 tools): Telethon-powered user client integration for searching personal chats, reading incoming messages, and sending direct messages under approval gating.
  • Shared Agent Memory (agent-memory, 5 tools): Cross-client and cross-project knowledge store holding facts, architectural decisions, procedures, and operator profiles with confidence scores, provenance tracking, and expiration policies.
  • Modular Lazy Tool Catalog (90+ Tools): Over 90 tools organized into modular toolsets (services, db, migration, gitlab, jobs, files, kb, calendar, email, memory, telegram) to keep prompt token counts minimal and prevent LLM rate-limiting.

What It Gives Your Agent

  • Structured JSON Answers instead of Fragile Shell Sessions: "Is Odoo healthy?" is a single, typed tool call returning compact telemetry, eliminating raw SSH shell scraping and keeping token usage minimal for smaller models.
  • Guaranteed Safety & Human-in-the-Loop Approvals: Sensitive write operations (service restart, file modification, database copy drops, outgoing emails) pause for explicit confirmation via the phone messenger or Web Cockpit.
  • Zero-Footprint Server Architecture: Nothing runs permanently on target servers. Only an SSH key, a dedicated unprivileged user, and a minimal sudoers profile are required.
  • Deterministic Upgrade Confidence: Run full migration rehearsal pipelines on isolated clone databases before touching production data.
  • Multi-Model Flexibility: Switch models on the fly between lightning-fast cloud APIs (Groq gpt-oss-120b, DeepSeek) and completely private offline local weights (Qwen 2.5 via LM Studio).

Design documents: specs/001-vps-service-mcp/ (services), specs/002-odoo-migration-analysis/ (migration), specs/003-declared-jobs/ (jobs), specs/004-agent-memory/ (memory), specs/005-gitlab-integration/ (GitLab), specs/007-assistant-runtime/ (personal assistant), specs/008-lazy-tool-loading/ (lazy tool loading), specs/009-knows-me/ (operator profile & recall), specs/010-web-and-media/ (web, photos, documents), specs/011-email-and-calendar/ (Google Workspace), specs/012-personal-telegram/ (personal Telegram account MTProto), and specs/013-knowledge-base-rag/ (knowledge base RAG).


Contents


The 90+ Tool Ecosystem

The platform exposes over 90 specialized tools divided across VPS/GitLab MCP services and Digital Secretary built-ins, orchestrated with token-saving lazy loading:

DomainToolsPrimary ToolsCapabilities
VPS Infrastructure & Systemd17assess_infrastructure, list_services, get_resource_usage, restart_service, configure_serviceCPU/RAM/Disk metrics, journalctl logs, state mutation, declarative config rollback
PostgreSQL & Odoo DBs5db_list, db_overview, db_modules, db_table, db_compareSchema introspection, installed modules, table row counts, live database comparisons
Migration Rehearsals8rehearse, rehearsal_status, run_check, get_reportAutomated upgrade pipelines on disposable copy databases, finding analysis, risk verdicts
GitLab CI/CD & Deploy15gitlab_commits, gitlab_pipelines, deploy_from_gitlabInspect repos, branches, MRs, CI jobs, verify targets, zero-downtime production deployments
Declared Background Jobs4list_jobs, run_job, job_status, cancel_jobScript integrity verification, background execution tracking, automated final reports
Knowledge Base Semantic RAG6kb__search, kb__ask, kb__list, kb__addDense vector search across technical books (DDIA) and PDFs with exact page-level citations
Local Machine Filesystem8files__read, files__write, files__edit, files__searchSafe local file management with directory traversal protection and size caps
Google Workspace8calendar__events, calendar__create, email__inbox, email__sendCalendar agenda tracking, meeting links, unread emails, and gated draft sending
Personal Telegram MTProto5tg_user__inbox, tg_user__search, tg_user__sendSearch personal dialogs, read incoming messages, interact under confirmation gating
Persistent Agent Memory8memory__search, memory__save, me__rememberCross-agent facts, procedures, decay policies, operator profile cards ("Knows Me")
Background Cadences & Web7schedule__list, schedule__add, web__search, web__readCron routines, automated morning briefings, live web research with domain filtering

Requirements

WhereWhat
LaptopPython β‰₯ 3.12, uv, an MCP client
VPSLinux with systemd (β‰₯ 248 recommended: Ubuntu 22.04+, Debian 12+, RHEL 9+), apt or dnf, SSH; optionally Docker or Podman
Migration toolsPostgreSQL β‰₯ 14 on the VPS (for the pg_read_all_data role)

Quick start & Installation

Option 1: Instant Zero-Install via uvx (Recommended)

Run Steward and its companion MCP servers directly with zero git cloning or virtual environment setup:

# Run the Governed VPS Control Plane MCP server
uvx steward-mcp serve --config ~/.config/vps-mcp/myvps.toml

# Or run the standalone Knowledge Base Semantic RAG server
uvx --from steward-mcp kb-mcp serve

# Or run the shared Agent Memory server
uvx --from steward-mcp agent-memory serve

# Or launch the Executive Web Cockpit
uvx --from steward-mcp assistant ui

Option 2: Install via PyPI (pip / uv)

pip install steward-mcp
# or
uv tool install steward-mcp

Option 3: From Source (Clone Repository)

git clone https://github.com/navid72m/vps-mcp && cd vps-mcp
uv sync

1. Create a dedicated SSH key and VPS user. Run the ssh root@… part with any account that already has root on the VPS.

ssh-keygen -t ed25519 -N "" -f ~/.ssh/vps_mcp_ed25519
ssh root@<vps> "useradd -m -s /bin/bash vpsmcp && passwd -l vpsmcp && \
  install -d -m 700 -o vpsmcp -g vpsmcp /home/vpsmcp/.ssh && \
  echo 'restrict,pty $(cat ~/.ssh/vps_mcp_ed25519.pub)' > /home/vpsmcp/.ssh/authorized_keys && \
  chown vpsmcp: /home/vpsmcp/.ssh/authorized_keys && chmod 600 /home/vpsmcp/.ssh/authorized_keys"

2. Install the least-privilege sudoers profile. Review the generated file first.

uv run vps-mcp bootstrap --print-sudoers --runtime docker --pm apt > vps-mcp.sudoers
scp vps-mcp.sudoers root@<vps>:/tmp/
ssh root@<vps> "visudo -cf /tmp/vps-mcp.sudoers && install -m 0440 /tmp/vps-mcp.sudoers /etc/sudoers.d/vps-mcp"

3. Pin the VPS host key. Compare the printed fingerprint with one you already trust, for example from ssh-keygen -lF <vps>.

mkdir -p ~/.config/vps-mcp
uv run vps-mcp trust-host --host <vps> --known-hosts ~/.config/vps-mcp/known_hosts

4. Write the policy file. Start in read-only mode.

cp examples/vps-mcp.toml ~/.config/vps-mcp/myvps.toml   # set host, key, services; read_only = true
uv run vps-mcp check-config --config ~/.config/vps-mcp/myvps.toml

5. Connect your MCP client (next section). Once you trust it, set read_only = false.

check-config also prints where the memory folder will be. It's created the first time a client starts the server.

Connect your MCP client

The server is a stdio program. Clients start it on demand and stop it when they're done, so seeing no vps-mcp process between sessions is normal. Use absolute paths, because GUI apps don't inherit your shell PATH.

Claude Code (available in every new session):

# Option A: Zero-install via uvx (PyPI)
claude mcp add --scope user vps -- uvx steward-mcp serve --config ~/.config/vps-mcp/myvps.toml
claude mcp add --scope user kb -- uvx --from steward-mcp kb-mcp serve
claude mcp add --scope user memory -- uvx --from steward-mcp agent-memory serve

# Option B: From local checkout
claude mcp add --scope user vps -- "$(which uv)" run --directory "$PWD" \
  steward serve --config ~/.config/vps-mcp/myvps.toml

Optionally, let the read-only tools run without approval prompts. Add this to ~/.claude/settings.json under permissions.allow:

"mcp__vps__list_services", "mcp__vps__get_service_status", "mcp__vps__get_service_logs",
"mcp__vps__get_resource_usage", "mcp__vps__get_service_config", "mcp__vps__get_audit_log",
"mcp__vps__list_revisions",
"mcp__vps__db_list", "mcp__vps__db_overview", "mcp__vps__db_modules", "mcp__vps__db_table",
"mcp__vps__db_compare", "mcp__vps__get_report", "mcp__vps__list_reports",
"mcp__vps__rehearsal_status", "mcp__vps__pipeline_last_run",
"mcp__vps__list_jobs", "mcp__vps__job_status",
"mcp__vps__memory_search", "mcp__vps__memory_get",
"mcp__vps__gitlab_projects", "mcp__vps__gitlab_refs", "mcp__vps__gitlab_tree",
"mcp__vps__gitlab_file", "mcp__vps__gitlab_commits", "mcp__vps__gitlab_compare",
"mcp__vps__gitlab_list_items", "mcp__vps__gitlab_read_item", "mcp__vps__gitlab_pipelines",
"mcp__vps__gitlab_job_log", "mcp__vps__deploy_targets"

The migration and job lines only apply if you enabled those features.

Keep the state-changing tools on "ask".

LM Studio (~/.lmstudio/mcp.json) or Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "vps": {
      "command": "uvx",
      "args": ["steward-mcp", "serve", "--config", "/absolute/path/to/.config/vps-mcp/myvps.toml"]
    },
    "kb": {
      "command": "uvx",
      "args": ["--from", "steward-mcp", "kb-mcp", "serve"]
    },
    "memory": {
      "command": "uvx",
      "args": ["--from", "steward-mcp", "agent-memory", "serve"]
    }
  }
}

(Note: If running from a local source clone instead of PyPI, substitute "command": "uv", "args": ["run", "--directory", "/path/to/vps-mcp", "steward", "serve", ...])

In LM Studio, turn on mcp/vps (and optionally mcp/kb, mcp/memory) in the chat's Program panel, and pick a model with tool-calling support.

OpenCode (~/.config/opencode/opencode.json, or opencode.json in a project):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "vps": {
      "type": "local",
      "command": ["uvx", "steward-mcp", "serve", "--config", "/absolute/path/to/.config/vps-mcp/myvps.toml"],
      "enabled": true
    },
    "kb": {
      "type": "local",
      "command": ["uvx", "--from", "steward-mcp", "kb-mcp", "serve"],
      "enabled": true
    }
  }
}

Every client that uses the same --config shares the same memory, so a note written in one client can be found by the next session in all of them.

Surface Modes: Compact (Default) vs Full Granular

By default, vps-mcp serve exposes the consolidated compact catalog (13 action-based tools) to optimize LLM routing and reduce schema context token consumption by ~70%.

To expose the granular 45-tool catalog instead, pass --mode full or set VPS_MCP_MODE=full:

uv run vps-mcp serve --config ~/.config/vps-mcp/myvps.toml --mode full

(Or omit --mode to use the default compact surface)

This consolidates the 45 granular tools into 13 action-based tools, reducing schema token overhead by ~70%:

  • assess_infrastructure: Holistic VPS health verdict, compute load, RAM, storage headroom, runtimes, and warnings.
  • service_inspect: Consolidated action: ["list", "status", "logs", "config", "revisions", "audit"].
  • service_control: Runtime controls action: ["start", "stop", "restart", "enable_boot", "disable_boot"].
  • service_manage: Lifecycle and rollbacks action: ["deploy", "update", "configure", "rollback", "remove"].
  • db_inspect: Schema and diffs action: ["list", "overview", "modules", "table", "compare"].
  • rehearsal_manage: Disposable copy rehearsals action: ["start", "status", "cancel", "last_run", "drop_copies"].
  • migration_audit: Health checks and reports action: ["run_check", "list_reports", "get_report"].
  • job_manage: Declared script jobs action: ["list", "run", "status", "cancel"].
  • gitlab_repo: Repo and code tree action: ["projects", "refs", "tree", "read_file", "commits", "compare"].
  • gitlab_items: Issues and merge requests action: ["list", "read", "create_issue", "comment", "create_mr", "close_issue"].
  • gitlab_ci: Pipelines and CI jobs action: ["pipelines", "job_log", "retry_job", "cancel_job", "retry_pipeline", "cancel_pipeline", "trigger_pipeline"].
  • gitlab_deploy: Production deployments action: ["targets", "deploy", "rollback"].
  • memory_manage: Persistent shared memory action: ["search", "get", "save", "update", "archive"].

Dedicated Knowledge Base RAG Server (kb-mcp)

Following the modular MCP server pattern (Approach A), the repository includes a standalone MCP server for dense semantic vector search over technical books, research papers, and architecture documents using FAISS and SentenceTransformers (all-MiniLM-L6-v2):

# Run standalone MCP server on stdio (zero-install via uvx)
uvx --from steward-mcp kb-mcp serve

# Or from local checkout
uv run kb-mcp serve

# Ingest and index a book or research paper (PDF, Markdown, text)
uvx --from steward-mcp kb-mcp add ~/Downloads/ddia.pdf --title "Designing Data-Intensive Applications" --author "Martin Kleppmann"

# Search passages with verbatim excerpts, page citations, and scores
uvx --from steward-mcp kb-mcp search "fault-tolerant consensus algorithms"

# List all indexed books and papers
uvx --from steward-mcp kb-mcp list

Exposed MCP Tools (5 tools):

  • kb_search: Dense semantic vector search returning ranked passages with page citations and relevance scores.
  • kb_read: Read sequential content chunks from an indexed document in original book/chapter order.
  • kb_list: Catalog of all ingested documents, chunk counts, and file sizes.
  • kb_add: Ingest and index a new document with SHA256 deduplication.
  • kb_remove: Delete a document and its corresponding vector embeddings from the index.

Using it

Ask in plain language. The assistant picks the tools.

The full set of examples, covering every tool, is in docs/USAGE_EXAMPLES.md.

  • "What's running on my VPS?"
  • "Show the last 100 lines of odoo19's logs containing 'error'"
  • "Which service uses the most memory?"
  • "Restart worker", or for a protected service, "restart nginx, I confirm"
  • "Deploy redis:7 as a container named cache", which shows a preview first and asks you to confirm
  • "Update api to ghcr.io/myorg/api:1.2", which rolls back automatically if it comes up unhealthy
  • "Compare db_before with db_after and tell me if it's safe to promote" (migration tools)
  • "Plan the full-rehearsal job", then "start it", then later "how is the rehearsal going?" (jobs)
  • "Where are we with the migration?" in a brand-new session, answered from memory
  • "Remember as a decision: promote only when the verdict is safe_to_promote" (memory)
  • "What changed in the addons since v1.4? Did the pipeline pass? Then deploy v1.5" (GitLab)
  • "Open an issue in addons with the blocking findings of the last rehearsal" (GitLab)
  • "Show the audit log"

Service tools

PurposeTools
Lookassess_infrastructure, list_services, get_service_status, get_service_logs, get_service_config, list_revisions, get_resource_usage, get_audit_log
Controlstart_service, stop_service, restart_service, set_boot_start
Lifecycledeploy_service, update_service, configure_service, rollback_service, remove_service
  • Previews: deploy, update, configure, rollback and remove return a preview unless confirm=true.
  • Rollback: changes are health-gated and roll back automatically on failure.
  • Compact output: results are compact JSON, and logs are returned as plain YYYY-MM-DD HH:MM:SS message lines to keep token usage low.

The full contract is in specs/001-vps-service-mcp/contracts/mcp-tools.md.

Deploying your own code

The server deploys images and packages from approved sources. It never uploads or builds code on the VPS. To ship your code:

  1. Build an image, ideally in CI (e.g. GitHub Actions).
  2. Push it to a registry.
  3. Add the registry prefix to approved_sources.image_prefixes.
  4. Ask the assistant to deploy or update that image.

Example: Odoo with PostgreSQL

Containers that share a networks entry reach each other by service name, so the database never needs a published port:

deploy_service name="odoo-db" kind="container" confirm=true
  container={ image:"postgres:16", networks:["odoo-net"],
              env:{POSTGRES_USER:"odoo", POSTGRES_PASSWORD:"…", POSTGRES_DB:"postgres"},
              volumes:["odoo-db-data:/var/lib/postgresql/data"] }

deploy_service name="odoo" kind="container" confirm=true
  container={ image:"odoo:18", networks:["odoo-net"], ports:["8069:8069"],
              env:{HOST:"odoo-db", USER:"odoo", PASSWORD:"…"},
              volumes:["odoo-data:/var/lib/odoo"] }

This requires docker.io/library/ in approved_sources.image_prefixes. Networks the server creates are removed automatically once no managed container uses them.

Docker Compose stacks: restarting them and reading their logs through the server is fine, but change their configuration or version with docker compose. configure_service and update_service recreate the container from their own spec, which would detach it from Compose.

Migration analysis (optional)

Add a [migration] section to the policy file to enable 13 more tools. They're designed for an Odoo version upgrade (e.g. 17 β†’ 19) where upgrade dumps and test databases live on the VPS and production lives elsewhere.

PurposeTools
Understanddb_list, db_overview, db_modules, db_table
Compare + riskdb_compare, get_report, list_reports
Rehearse on a disposable copyrehearse, rehearsal_status, cancel_rehearsal
Your own runs and checkspipeline_last_run, run_check
Cleanupdrop_copies

Comparison. db_compare snapshots both databases. Each difference becomes a finding, classified blocking / warning / info:

  • Schema: tables and columns removed or added, type narrowing and widening, and constraints and indexes.
  • Rows: row losses. The largest tables are always counted exactly, because statistics can be stale after an upgrade.
  • Odoo state: modules not upgraded or stuck in "to upgrade", and deactivated or orphaned views.

The report ends with a verdict: safe_to_promote, review_warnings or do_not_promote.

Rehearsal. rehearse without confirm returns a plan: the copy name, each step with a fingerprint of its file, and free disk before and after. Confirming with the plan's plan_hash:

  1. creates an HMAC-marked copy of the source;
  2. runs your declared steps (SQL files, scripts, odoo-bin -u all, re-upgrade of stale modules) against the copy only, in a background systemd unit that keeps running if your client disconnects;
  3. produces a source-vs-copy report.

Copies expire after copy_retention_h (default 24 h).

Setup on the VPS (as root, after reviewing each output):

uv run vps-mcp bootstrap --print-sudoers --with-migration --config ~/.config/vps-mcp/myvps.toml
uv run vps-mcp bootstrap --print-migration-sql | ssh root@<vps> "sudo -u postgres psql -p <port>"
ssh root@<vps> "setfacl -m u:vpsmcp:rx /opt/odoo"   # lets the module-code check list addons

The [migration] schema (targets, Odoo profile, pipelines, checks, thresholds) is documented in contracts/migration-config.md and in the commented section of examples/vps-mcp.toml.

How it stays safe:

  • Analysis runs as a database role with pg_read_all_data only, in read-only sessions. Queries come from a fixed catalogue, and no tool accepts SQL.
  • SQL step files are scanned before a rehearsal. Anything that could reach another database, the cluster, the filesystem or a shell is refused (\c, \!, dblink, DROP DATABASE, GRANT, pg_read_file, dynamic SQL in DO blocks, …).
  • Script steps are detected, not confined. Write counters on every other allowlisted database are checked around each step, and a write aborts the rehearsal with a blocking finding.
  • Copies can only be dropped if both the local record and the database's HMAC marker match.
  • Disk: a rehearsal needs about 1.3Γ— the source size free plus max(min_free_gb, min_free_pct%). It is refused up front otherwise.

Declared jobs (optional)

Some long scripts can't be rehearsed on a copy, for example a full rehearsal that drops and rebuilds a test database from a dump, runs the deploy script, then compares the result. You can declare such a script as a job under [[migration.job]]. Four tools then let the assistant run it safely: list_jobs, run_job, job_status and cancel_job.

[[migration.job]]
name = "full-rehearsal"
script = "/root/full_rehearsal.sh"            # root-owned, not group/other-writable
progress_file = "/root/rehearsal_logs/STEPS.txt"
report_file = "/root/rehearsal_logs/compare.md"
may_modify = ["shop_19_test"]                 # may be dropped and rebuilt
services = ["odoo-test"]                      # may be stopped
source = "shop_17_dump"                       # compared with result at the end
result = "shop_19_test"

How a job runs:

  1. Plan: run_job without confirm shows a plan: the script's fingerprint, owner and mode; which databases it will rebuild and which services it may stop; parameters; and free disk. Nothing runs yet.
  2. Run: confirming with the plan's plan_id re-checks everything, then starts the script as-is in a transient systemd unit. The job has a runtime cap, and if it's cancelled its whole process tree is killed. It keeps running if your client disconnects. Only one job or rehearsal runs at a time.
  3. Status: job_status reads the job's progress file. It only reads lines written since this run started, because many scripts append to the same file across runs. It recognises outcomes such as EXIT n, rc=n, ok, FAILED, STOP…, and the success marker (ALL DONE by default).
  4. Guard: writes to any database the job doesn't declare, an undeclared database disappearing, or a change to any undeclared managed service are all reported as blocking findings.
  5. Report: when the job ends, one report combines its step outcomes, an excerpt of its own report file and a db_compare of source against result, and gives a verdict.

Parameters are declared with a name and a validation pattern, and are passed only as environment variables. For example, RUN_NAME must match ^[a-z0-9_]{1,40}$ and defaults to rehearsal_{date:%Y%m%d_%H%M}.

Limits:

  • Not confined. A job is your own script running as root. The server controls what may start and when, and detects undeclared changes; it doesn't prevent them.
  • Cancel has limits. Cancelling stops the job's process tree, but not work it handed to other services. For example, a query already running in PostgreSQL, or a docker exec inside a container.

Optional keys:

  • run_as: defaults to root.
  • log_globs
  • min_free_gb: defaults to 5.
  • max_runtime_h: defaults to 24, at most 168.
  • success_marker
  • outcome_patterns: regexes with step/status groups, for progress lines the built-in rules don't recognise.

All of them are commented in examples/vps-mcp.toml. The full schema is in contracts/job-config.md, and the tools are in contracts/job-tools.md.

Setup on the VPS: regenerate and reinstall the sudoers file with jobs enabled. This adds stat, used for the script owner/mode check.

uv run vps-mcp bootstrap --print-sudoers --with-migration --with-jobs \
  --config ~/.config/vps-mcp/myvps.toml > vps-mcp.sudoers

GitLab (optional)

Add a [gitlab] section and the assistant can work with your GitLab, using your own token. It only reaches the projects you allowlist, and only with the permissions you give each one.

1. Store the token in the macOS Keychain. This prompts for the token, so it never appears on a command line or in shell history:

security add-generic-password -U -s vps-mcp-gitlab -a <account> -w
What you declareMinimum token scope
read (and deploy, which only downloads archives)read_api
write_issues, write_mrs, ciapi

Prefer a project or group access token with the lowest role that works. The token can do whatever GitLab allows it to; vps-mcp only limits what assistants can do through vps-mcp.

2. Declare the projects and deploy targets in the policy file. See the commented block in examples/vps-mcp.toml and contracts/gitlab-config.md. Then check that everything resolves:

uv run vps-mcp gitlab-check --config ~/.config/vps-mcp/myvps.toml

gitlab-check prints:

  • the token's user and scopes;
  • its expiry date, with a warning when that's under 14 days away;
  • whether each project is reachable;
  • what each deploy target currently has on the VPS.

It never prints the token.

PurposeToolsPermission
Readgitlab_projects, gitlab_refs, gitlab_tree, gitlab_file, gitlab_commits, gitlab_compareread
Issues and MRsgitlab_list_items, gitlab_read_item; gitlab_write (create issue, comment, open MR, close an issue vps-mcp created)read; write_issues / write_mrs
CIgitlab_pipelines, gitlab_job_log; gitlab_ci (retry, cancel, trigger on trigger_refs)read; ci
Deploydeploy_targets, deploy_from_gitlab, rollback_deploydeploy

Assistants address projects by the alias you give them, never by GitLab path or ID, so projects you didn't declare are unreachable. There is no merge tool at all. Closing issues needs close_issues = true, and by default only covers issues vps-mcp created; they carry a _Posted via vps-mcp_ footer. Every write previews first, needs confirm=true, is audited, and is refused in read-only mode.

Deploying. deploy_from_gitlab without confirm returns a plan with:

  • the exact commit;
  • the version currently deployed and any files edited on the VPS since;
  • the files that change;
  • the pipeline status;
  • the services that will restart;
  • free disk space.

Confirming with the plan's plan_id deploys exactly that commit:

  1. Your laptop downloads the commit's archive from GitLab. The VPS never contacts GitLab, and the token never leaves your laptop.

  2. The laptop rebuilds it as a clean tar. Unsafe paths, links leaving the tree, special files and excluded paths are dropped, and ownership and modes are normalised.

  3. The tar is streamed over SSH into a new release directory on the VPS:

    /var/lib/vps-mcp/deploys/<target>/releases/<time>-<sha12>/   files + MANIFEST.sha256 + marker
    <destination>  ->  symlink to the active release
    
  4. The symlink is switched in one step, so readers see either the old version or the new one.

  5. The declared services are restarted and health-checked, including health_url if you set it. If anything is unhealthy, the previous release is switched back automatically.

Releases you didn't deploy through vps-mcp are moved aside to releases/pre-vps-mcp-<time>/, never deleted. The last keep_releases versions are kept, and rollback_deploy switches back to one of them. Deploys are refused:

  • while another deploy of the same target is running;
  • while a declared job that uses the same services is running;
  • while a rehearsal is running.

The deployed version of each target, and recent GitLab activity, appear in the memory, as facts that are kept up to date.

VPS setup (as root, after reviewing the output):

uv run vps-mcp bootstrap --print-sudoers --with-gitlab > gitlab.sudoers   # tar, ln, mv, rm, ...

Add the result to /etc/sudoers.d/vps-mcp. These binaries are root-equivalent. As with the rest of vps-mcp, the guarantee is that the server only issues its own validated commands, on paths under /var/lib/vps-mcp/deploys and the destinations you declared.

Memory

Memory is agent-memory, a managed knowledge store rather than a conversation log. It ships in this repo as its own package and command (agent-memory). Every agent and every project can share it. vps-mcp uses it as a library.

What a memory is. One concise piece of knowledge, stored as one Markdown file with structured front matter:

FieldMeaning
typesemantic (what is true), decision (why; with rejected alternatives), procedural (how to do something), episodic (what happened; open/done for issues and next steps)
scopeuser, project:<name>, environment:<name> or task:<id>; a session sees its own scopes plus user
subjecta dotted key such as postgres.version, used for duplicates and conflicts
provenancethe source (client, task, file, web, issue, tool_output, tool_generated, operator, …), the client, created/updated/last-confirmed times and a confirmation count
confidenceverified, inferred or unverified
lifecycleactive, superseded (linked to its successor), expired, invalidated or archived; an optional expiry; live_state facts carry a freshness window

The write policy is enforced by code on every save, not left to the agent:

  • Secrets are refused and never written. Store a reference to where a secret lives instead.
  • Duplicates (same subject, nearly the same text) become a confirmation of the existing memory, not a second copy.
  • Contradictions on the same subject are kept on both sides, linked, and flagged needs verification. Decisions are only replaced by an explicit supersede with a reason, so nothing is overwritten silently.
  • Text from untrusted sources (READMEs, issues, web pages, tool output) is stored as unverified. If it reads like an instruction ("ignore previous…", "always run curl …") it is refused as a procedure or decision. Only the operator can save such text, with agent-memory save --operator. Agents cannot raise trust through the tools.
  • Facts about live state (for example "web is running") always come back with a "verify live" flag, and a "possibly stale" flag once they are older than their freshness window.

Retrieval is task-aware. When a session connects it gets only a small pinned core (~500 tokens): pinned procedures and decisions, plus open issues. Everything else is searched for. memory_search ranks matches by keyword relevance, recency, importance, confidence and scope (task > environment > project > user). It returns at most 8 by default, grouped as facts, decisions, experiences and procedures, and says "nothing relevant" instead of padding. Superseded, expired and invalidated memories stay out of results unless you ask for history.

ToolWhat it does
memory_searchRanked, scope-aware search, grouped by type, with flags (verify live, stale, conflict, inferred, open)
memory_getOne memory with full provenance: history, what it superseded, conflicts, related memories
memory_saveA validated save: created, confirmed (duplicate) or conflict (flagged)
memory_updateupdate metadata, supersede, invalidate, expire, confirm, close, resolve_conflict
memory_archiveForget a memory. It previews first and moves the file to archive/

vps-mcp's own facts. vps-mcp writes generated, live-state facts into environment:<vps name>: service states, the deployed version per GitLab target, the last outcome of each job and rehearsal, and the latest report verdict. They are updated in place, never duplicated. Agents can search them like any other memory. If the store can't be opened, vps-mcp keeps working and says memory is unavailable.

The store. By default it lives in ~/.local/share/agent-memory/ (or $AGENT_MEMORY_HOME):

agent-memory/
β”œβ”€β”€ memories/<scope>/   one .md file per memory: read, edit or delete by hand; noticed on next search
β”œβ”€β”€ archive/            archived memories
β”œβ”€β”€ events/             append-only history and audit (no memory content)
└── index.sqlite        search index (SQLite FTS5), rebuilt from the files automatically

Use it from any agent, not only through vps-mcp:

claude mcp add --scope user memory -- "$(which uv)" run --directory "$PWD" \
  agent-memory serve --project my-project --client claude-code

The same works in OpenCode, Antigravity or LM Studio (agent-memory serve --project …). Each session sees its project's memories plus user scope, and never other projects' memories.

Operator commands:

uv run agent-memory search "database backup" --project my-project
uv run agent-memory save --operator --type procedural --scope project:my-project \
  --subject deploy.order --title "Stop the app first" --content "…" --pinned
uv run agent-memory doctor            # counts, malformed files, conflicts, stale facts, warnings
uv run agent-memory bench             # recall / precision / stale hits / conflicts / token cost
uv run agent-memory migrate-004 ~/.config/vps-mcp/myvps.memory --project vps-myvps \
  --environment myvps                 # dry run; add --apply to import feature-004 notes

Benchmark (built-in fixtures: 289 memories, 22 tasks). Compared with plain keyword search, ranked retrieval keeps recall and never returns an outdated memory:

ConfigurationRecall@8Precision@8Stale hitsConflicts flaggedTokens per result
naive keyword search0.950.36100%0%25
agent-memory0.970.800%100%208

The pinned core costs about 150 tokens.

Personal assistant

assistant is a background process that is its own agent. It runs on your laptop and talks to you through a Telegram bot. It thinks with a language model (Claude, or a local model via LM Studio or Ollama, or anything else with an OpenAI-compatible API), uses MCP servers such as vps-mcp as its tools, and shares agent-memory with your other clients.

Documentation truncated β€” see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!