sitek94
MCP Serversitek94public

homelab mcp

用于管理运行在 VPS 上的家庭实验室的 MCP 服务器。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
TypeScript
Language
MIT License
License

About This Server

用于管理运行在 VPS 上的家庭实验室的 MCP 服务器。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Homelab MCP

MCP server for helping with managing homelab running on a VPS.

Usage

  • Requires Bun
  • Install: bun install
  • Build: bun run build

Add the following to your mcp.json:

{
  "homelab-mcp": {
    "name": "Homelab MCP",
    "command": "node",
    "args": [
      "<PATH_TO_THIS_REPO>/build/index.mjs"
    ],
    "env": {
        "VPS_HOST": "",
        "VPS_PORT": "",
        "VPS_USERNAME": "",
        "VPS_PRIVATE_KEY_PATH": "",
        "HOMELAB_DIR": "",
        "POSTGRES_USER": "",
        "POSTGRES_PASSWORD": "",
        "POSTGRES_HOST": "",
        "POSTGRES_PORT": "",
        "POSTGRES_DATABASE": "",
        "POSTGRES_SCHEMA_PATH": ""
    }
  }
}

Development

  • Watch: bun run build:watch
  • Inspector: bun inspector

Postgres Connection Flow via Cloudflare Tunnel

This diagram describes the flow I use to connect to my VPS's PostgreSQL database from my local machine.

sequenceDiagram
  participant MCP_Server_macOS as MCP Server (macOS)
  participant Cloudflared_Client_macOS as Cloudflare Client (macOS)
  participant Cloudflare_Edge as Cloudflare Edge
  participant Cloudflared_Daemon_VPS as Cloudflared (VPS)
  participant Postgres_VPS as PostgreSQL (VPS)

  MCP_Server_macOS->>Cloudflared_Client_macOS: 1. SQL Query (via pg library to localhost)
  Cloudflared_Client_macOS->>Cloudflare_Edge: 2. Encrypted TCP connection (for pg.mydomain.com)
  Cloudflare_Edge->>Cloudflared_Daemon_VPS: 3. Encrypted TCP connection (via persistent tunnel)
  Cloudflared_Daemon_VPS->>Postgres_VPS: 4. TCP connection (to postgres:5432 on Docker network)
  Postgres_VPS-->>Cloudflared_Daemon_VPS: 5. SQL Result
  Cloudflared_Daemon_VPS-->>Cloudflare_Edge: 6. Encrypted SQL Result
  Cloudflare_Edge-->>Cloudflared_Client_macOS: 7. Encrypted SQL Result
  Cloudflared_Client_macOS-->>MCP_Server_macOS: 8. SQL Result (from localhost)

Quick Start

1

Clone the repository

git clone https://github.com/sitek94/homelab-mcp
2

Install dependencies

cd homelab-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownersitek94
Repohomelab-mcp
LanguageTypeScript
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation