
homelab mcp
用于管理运行在 VPS 上的家庭实验室的 MCP 服务器。
Repository Info
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
Clone the repository
git clone https://github.com/sitek94/homelab-mcpInstall dependencies
cd homelab-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.