Merge pull request #3 from BillyOutlast/mcphub

feat: add mcphub LXC helper script
This commit is contained in:
BillyOutlast
2026-03-08 13:05:43 -04:00
committed by GitHub
4 changed files with 160 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
__ ________ ____ __ __ __
/ |/ / ____/ / __ \/ / / /_ __/ /_
/ /|_/ / / / /_/ / /_/ / / / / __ \
/ / / / /___ / ____/ __ / /_/ / /_/ /
/_/ /_/\____/ /_/ /_/ /_/\__,_/_.___/
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: BillyOutlast
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/samanhappy/mcphub | Docs: https://docs.mcphubx.com/
APP="MCPHub"
var_tags="${var_tags:-ai;automation;tooling}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/mcphub.service ]]; then
msg_error "No ${APP} Installation Found!"
exit 1
fi
if check_for_gh_release "mcphub" "samanhappy/mcphub"; then
msg_info "Stopping Service"
systemctl stop mcphub
msg_ok "Stopped Service"
msg_info "Updating MCPHub"
$STD npm update -g @samanhappy/mcphub
msg_ok "Updated MCPHub"
msg_info "Starting Service"
systemctl start mcphub
msg_ok "Started Service"
exit
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
+36
View File
@@ -0,0 +1,36 @@
{
"name": "MCPHub",
"slug": "mcphub",
"categories": [
20
],
"date_created": "2026-03-02",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://docs.mcphubx.com/",
"website": "https://github.com/samanhappy/mcphub",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/mcphub.webp",
"config_path": "/opt/mcphub/mcp_settings.json",
"description": "MCPHub is a unified hub for centrally managing and routing multiple Model Context Protocol (MCP) servers through a single dashboard and API endpoint.",
"install_methods": [
{
"type": "default",
"script": "ct/mcphub.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "admin",
"password": "CHANGE_ME"
},
"notes": [
]
}
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: BillyOutlast
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/samanhappy/mcphub | Docs: https://docs.mcphubx.com/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
NODE_VERSION="22" setup_nodejs
msg_info "Installing MCPHub"
$STD npm install -g @samanhappy/mcphub
msg_ok "Installed MCPHub"
msg_info "Creating Default Configuration"
mkdir -p /opt/mcphub
cat <<EOF >/opt/mcphub/mcp_settings.json
{
"mcpServers": {
"time": {
"command": "npx",
"args": ["-y", "time-mcp"]
}
}
}
EOF
msg_ok "Created Default Configuration"
msg_info "Creating Service"
NPM_GLOBAL_BIN="$(npm prefix -g)/bin"
MCPHUB_BIN="${NPM_GLOBAL_BIN}/mcphub"
cat <<EOF >/etc/systemd/system/mcphub.service
[Unit]
Description=MCPHub
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/mcphub
Environment=NODE_ENV=production
Environment=PORT=3000
Environment=MCPHUB_SETTING_PATH=/opt/mcphub/mcp_settings.json
ExecStart=${MCPHUB_BIN}
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now mcphub
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc