Universal Host Manager MCP
Allows administering a Linux host by running shell commands, reading, writing, and listing files within a configured workspace, and retrieving system metrics such as disk, memory, and top processes.
Allows administering a macOS host by running shell commands, reading, writing, and listing files within a configured workspace, and retrieving system metrics such as disk, memory, and top processes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Universal Host Manager MCPcheck system metrics and show disk, memory, and top processes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Universal Host Manager MCP
A cross-platform Model Context Protocol server for administering a Linux or macOS host through MCP clients such as ChatGPT and Claude.
It uses FastMCP Streamable HTTP transport, Auth0 OAuth, bounded file tools, output limits and command timeouts.
This project exposes arbitrary shell execution. Authentication decides who may use it; it does not make commands harmless. ReadSECURITY.md before deploying it.
Features
Linux and macOS support
Streamable HTTP endpoint
Auth0 OAuth integration
File reads, writes and directory listings constrained to
MCP_WORKSPACE_DIRConfigurable command timeouts and output truncation
File-size limits and decoding fallback
Fail-closed startup when authentication is not configured
Example systemd and launchd services
Related MCP server: linux-harness-mcp
Tools
Tool | Parameters | Purpose |
|
| Runs an arbitrary shell command with the workspace as its working directory |
|
| Reads a text file inside the workspace |
|
| Writes UTF-8 text inside the workspace |
|
| Lists a directory inside the workspace |
| none | Reports disk, memory and top-process information |
The workspace boundary applies to the file tools. It does not sandbox run_command; commands retain all permissions of the service's OS user.
Requirements
Python 3.10+
Linux or macOS
Auth0 account for remote use
HTTPS endpoint for remote MCP clients
Install
PyPI (recommended)
pip install universal-host-manager-mcpuv / pipx
Without polluting a project environment:
uvx universal-host-manager-mcpFrom source (for development)
git clone https://github.com/Abktya/universal-host-manager-mcp.git
cd universal-host-manager-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .envConfigure
Create a .env file (copy .env.example if you installed from source) with an explicitly restricted workspace:
HOST=127.0.0.1
PORT=8765
MCP_BASE_URL=https://mcp.example.com
MCP_WORKSPACE_DIR=/home/youruser/workspace
AUTH0_DOMAIN=your-tenant.eu.auth0.com
AUTH0_CLIENT_ID=replace_me
AUTH0_CLIENT_SECRET=replace_me
AUTH0_AUDIENCE=https://mcp.example.com/Never commit .env.
Auth0 setup
This project uses FastMCP's Auth0Provider fixed-client OAuth integration.
In Auth0, create an API.
Use your public MCP URL as its identifier/audience, for example
https://mcp.example.com/.Create a Regular Web Application.
Put its domain, client ID and client secret in
.env.Add only the callback URLs required by your MCP clients to the Auth0 application's allowed callback URLs.
Set the application's allowed web origins and logout URLs as required by your clients.
Keep RS256 signing enabled.
FastMCP also supports an Auth0 MCP-native/DCR path through Auth0MCPProvider. This repository currently uses the manually managed, fixed-client Auth0Provider path.
Run
universal-host-manager-mcp(Running from a source checkout with the .venv activated works the same way — the console script is installed by pip install -e ..)
With the default port, the Streamable HTTP endpoint is:
http://127.0.0.1:8765/mcpFor an intentional local-only test without Auth0:
ALLOW_INSECURE_NO_AUTH=true universal-host-manager-mcpDo not use insecure mode on a publicly reachable endpoint.
Cloudflare Tunnel
Install cloudflared, authenticate it and create a named tunnel:
cloudflared tunnel login
cloudflared tunnel create universal-host-manager-mcp
cloudflared tunnel route dns universal-host-manager-mcp mcp.example.comCreate ~/.cloudflared/config.yml:
tunnel: YOUR_TUNNEL_ID
credentials-file: /home/youruser/.cloudflared/YOUR_TUNNEL_ID.json
ingress:
- hostname: mcp.example.com
service: http://127.0.0.1:8765
- service: http_status:404Validate and run it:
cloudflared tunnel ingress validate
cloudflared tunnel run universal-host-manager-mcpYour remote MCP URL will be:
https://mcp.example.com/mcpSet MCP_BASE_URL=https://mcp.example.com; do not include /mcp in MCP_BASE_URL.
AWS EC2 Deployment
These steps deploy the server on an EC2 instance and expose it safely to remote MCP clients.
1. Launch the instance
AMI: Ubuntu 24.04 LTS (the commands below are for Ubuntu/
apt; on Amazon Linux 2023 usesudo dnf install -y python3-pipinstead)Instance type:
t3.micro/t3.smallis enough for typical management workloadsSecurity group: allow inbound SSH (22) from your own IP only. No other inbound port is required if you use the Cloudflare Tunnel option below.
2. Install the server
SSH into the instance, then install from PyPI:
sudo apt update && sudo apt install -y python3-pip python3-venv
python3 -m venv ~/uhm-venv
source ~/uhm-venv/bin/activate
pip install universal-host-manager-mcp3. Configure
mkdir -p ~/workspace
cat > ~/.env << 'EOF'
HOST=127.0.0.1
PORT=8765
MCP_BASE_URL=https://mcp.example.com
MCP_WORKSPACE_DIR=/home/ubuntu/workspace
AUTH0_DOMAIN=your-tenant.eu.auth0.com
AUTH0_CLIENT_ID=replace_me
AUTH0_CLIENT_SECRET=replace_me
AUTH0_AUDIENCE=https://mcp.example.com/
EOF
chmod 600 ~/.envKeep HOST=127.0.0.1. The server should never listen directly on the instance's public interface — internet exposure is handled entirely by the tunnel or load balancer described below, not by opening the instance's own port.
4. Networking: get an HTTPS URL to the instance
Auth0 OAuth requires HTTPS. Pick one option:
Option A — Cloudflare Tunnel (recommended, no inbound port needed)
Run the steps from the Cloudflare Tunnel section above, from the EC2 instance. Because the tunnel is an outbound-only connection, you don't need to open any inbound port beyond SSH, don't need an Elastic IP, and the instance can even sit in a private subnet behind a NAT gateway.
Option B — Application Load Balancer with an ACM certificate
Request an ACM certificate for your domain and attach it to an ALB
Create an HTTPS (443) listener on the ALB forwarding to the instance's
PORTSecurity group on the instance: allow inbound
PORTonly from the ALB's security group, never from0.0.0.0/0Point your DNS at the ALB and set
MCP_BASE_URLto that hostname
5. Run as a systemd service
Reuse the included unit (see Background service below):
sudo cp examples/mcp-manager.service /etc/systemd/system/
# edit User=, WorkingDirectory=, EnvironmentFile= and ExecStart= to point at
# ~/uhm-venv/bin/universal-host-manager-mcp and ~/.env
sudo systemctl daemon-reload
sudo systemctl enable --now mcp-manager
sudo systemctl status mcp-manager --no-pager6. Elastic IP
Not required for either networking option. The Cloudflare Tunnel connects outbound regardless of the instance's address, and an ALB registers targets by instance ID or private IP, so it doesn't need one either. Only add an Elastic IP if something else in your setup depends on a fixed public IP for this instance.
ChatGPT and Claude
Add the public Streamable HTTP URL to the client's MCP/connector configuration:
https://mcp.example.com/mcpComplete the Auth0 sign-in when the client opens the authorization flow. The exact settings screens and supported connector options can change, so follow the current client documentation rather than using legacy SSE instructions.
Multiple clients can connect to the same running HTTP server. Each client authenticates independently; no separate server process or port is required.
Background service
Linux systemd
Copy and edit the included unit:
sudo cp examples/mcp-manager.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now mcp-manager
sudo systemctl status mcp-manager --no-pagerThe example uses systemd hardening directives. Adjust ReadWritePaths, ProtectHome, the user, paths and permissions to match the resources the MCP server genuinely needs.
macOS launchd
Edit paths in examples/com.user.mcpmanager.plist, then:
cp examples/com.user.mcpmanager.plist ~/Library/LaunchAgents/
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.user.mcpmanager.plist
launchctl kickstart -k gui/$(id -u)/com.user.mcpmanagerConfiguration
Variable | Default | Description |
|
| Listen address |
|
| Listen port |
| local URL | Public OAuth base URL, without |
| user home | Boundary for file tools and command working directory |
|
| Maximum returned tool-output characters |
|
| Default command timeout in seconds |
|
| Maximum accepted command timeout |
|
| Maximum file size read by |
|
| Maximum content size written by |
|
| Python log level |
|
| Explicit local-development authentication bypass |
Download
Clone with Git:
git clone https://github.com/Abktya/universal-host-manager-mcp.gitOr use Code → Download ZIP on GitHub.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
Hosted MCP server for AI agent identity, permissions, verification, and reusable proof.
Remote MCP server to read and manage your Atako AI agents, messages, files, and integrations.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAI-native SSH orchestration server enabling Claude or any MCP agent to execute commands, manage files, tunnels, and fleet operations across multiple hosts with security policies and audit logs.2Apache 2.0
- AlicenseNot gradedqualityCmaintenanceExposes a Linux host with shell, Python, and filesystem tools as MCP tools over HTTPS, enabling AI agents to execute commands and manage files remotely.14MIT
- AlicenseNot gradedqualityAmaintenanceExposes a Windows or Linux host terminal to remote MCP clients via Streamable HTTP, enabling command execution, tunnel management, and privileged operations with security features like OAuth and audit logging.392MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI clients to invoke CLI-driven agent tools over Streamable HTTP, including shell execution, file operations, patching, image viewing, web search, and nested agent tasks, with permission modes and real-time progress streaming.-