Skip to content

Infra-ops MCP (custom)

Thin MCP server that wraps existing platform bash scripts — onboard, sync, health checks, VPS operations.

Build

cd infra-devops/mcp-server
npm install
npm run build

Cursor configuration

"infra-ops": {
  "command": "node",
  "args": ["C:/Users/anik0z/Documents/infra-devops/mcp-server/dist/index.js"],
  "env": {
    "INFRA_DEVOPS_DIR": "C:/Users/anik0z/Documents/infra-devops",
    "INFRA_LOCAL_ENV": "C:/Users/anik0z/Documents/infra-devops/local/.env",
    "SSH_CONFIG_HOST": "bioscan-vps"
  }
}

Adjust paths for your machine. Requires Git Bash (bash on PATH) for script execution.

Environment

Reads credentials from INFRA_LOCAL_ENV (local/.env):

Variable Used for
DOMAIN Health check URLs
FORGEJO_API_TOKEN Woodpecker API (pipeline status)
WOODPECKER_HOST CI API base URL
PLANE_API_KEY Plane API probe
SSH_CONFIG_HOST VPS SSH (default bioscan-vps)

Tools (v1)

Read-only

Tool Description
platform_health HTTP probe Forgejo, CI, Plane, MCP, bridge, status, docs
check_pipeline_status Latest pipeline status for a repo via Woodpecker API
get_pipeline_errors Failed step errors (runs on VPS via SSH)
audit_team_access Forgejo users/repos + Plane members audit
list_kuma_monitors Query Uptime Kuma monitors on VPS
probe_plane_api Test Plane API connectivity

Write (safe)

Tool Description
trigger_pipeline Trigger Woodpecker rebuild for a repo/branch
sync_to_server rsync infra-devops to VPS
onboard_project Run onboard-project.sh with profile/owner/repo/prefix

Excluded from v1 (manual only)

  • rotate-and-publish.sh, secrets-init.sh, SOPS edit
  • deploy_platform, run_backup (planned for v2 with confirm: true)

Safety tiers

Tier Behavior
read Always allowed
write Allowed; may change external state (sync, onboard, trigger CI)
destructive Not exposed in v1

Typical agent tasks

  • "Run platform_health and report any down services"
  • "Sync infra-devops to the VPS"
  • "Onboard a new static-sftp project called myapp under bioscan org"
  • "What's the latest pipeline status for infra/devops?"

Windows notes

Scripts run via Git Bash. Ensure:

  1. bash --version works in terminal
  2. ssh bioscan-vps works (bash scripts/setup-local-ssh.sh)
  3. local/.env is filled

VPS-only scripts (audit-team-access.sh, kuma-query-monitors.sh) execute via:

ssh bioscan-vps 'cd /opt/devops && bash scripts/...'

Troubleshooting

Issue Fix
bash: command not found Install Git for Windows; add Git Bash to PATH
SSH failures Run bash scripts/setup-local-ssh.sh
Missing local/.env Copy from local/.env.example
onboard_project fails Check PyYAML installed: pip install pyyaml