
Universal Host Manager Mcp
io.github.Abktya由 GitHub 账号 Abktya 发布v0.1.15更新于 Oct 25, 2026
Cross-platform FastMCP server for authenticated remote Linux/macOS host administration
概览
一个 FastMCP 服务器,让 AI 助手管理 Linux 或 macOS 主机:执行 shell 命令、读写工作区文件并查看系统指标。
- 可以做什么
- 在主机上执行任意 shell 命令,可设置超时,以工作区为工作目录,并对输出做截断和大小限制。在配置的工作区目录内读取、写入和列出文件。报告磁盘、内存和占用最高的进程等系统指标。通过 Streamable HTTP 端点配合 Auth0 OAuth 登录提供服务,多个 MCP 客户端可连接同一个运行中的服务器。
- 适用场景
- 当你希望 ChatGPT 或 Claude 等助手远程查看和操作一台 Linux 或 macOS 机器——执行命令、在受限工作区内编辑文件或查看资源占用——并且能把服务器置于 HTTPS 和 Auth0 认证之后时使用。
- 运行要求
- Linux 或 macOS 上的 Python 3.10+,从 PyPI 安装或用 uvx 运行;安装向导会生成 .env 文件,服务器必须从该目录启动。必需环境变量:AUTH0_DOMAIN、AUTH0_CLIENT_ID、AUTH0_CLIENT_SECRET、AUTH0_AUDIENCE 和 MCP_WORKSPACE_DIR。远程使用需要 Auth0 账户和稳定的 HTTPS 端点(Cloudflare Tunnel、ngrok 静态域名或负载均衡器)。
安装
在 SourceWeft 中
- 打开 控制台中的 Universal Host Manager Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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.
[Abktya/universal-host-manager-mcp MCP server] [tests]
It uses FastMCP Streamable HTTP transport, Auth0 OAuth, bounded file tools, output limits and command timeouts.
[!CAUTION] This project exposes arbitrary shell execution. Authentication decides who may use it; it does not make commands harmless. Read SECURITY.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_DIR - Configurable command timeouts and output truncation
- File-size limits and decoding fallback
- Fail-closed startup when authentication is not configured
- Example systemd and launchd services
Tools
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)
Next: run uhm-setup to generate your .env — see Configure below.
uv / pipx
Without polluting a project environment:
This installs into a throwaway environment, runs the setup wizard, and writes .env in the current directory. From then on, run the server itself the same way: uvx universal-host-manager-mcp.
From source (for development)
Next: run uhm-setup to generate your .env — see Configure below.
Configure
The easiest way is the interactive setup wizard, installed alongside the server:
Run it from the directory where you want to keep the configuration. The server must later be started from that same directory so it can find .env.
For a first test, choose 1 — Local-only test. Press Enter to accept the port 8765; the port prompt expects a number, not y or n. This mode:
- creates a separate
workspacedirectory by default; - listens only on
127.0.0.1, so other computers cannot connect; - requires no domain, tunnel, or Auth0 account;
- enables unauthenticated access only for that local test.
The wizard also offers Cloudflare Tunnel, an ngrok static domain, and an existing HTTPS URL for remote use. Remote modes require Auth0 and will not write a misleading, unusable configuration if Auth0 is skipped. It validates domains and URLs, then writes .env with 600 permissions—backing up an existing file to .env.bak first.
If a virtual environment is active, install and run both commands through that environment:
To verify that the command belongs to the active environment on macOS/Linux:
The first two paths should normally point inside .venv/bin. If they point to /opt/homebrew/bin while a virtual environment is active, reinstall with python -m pip install universal-host-manager-mcp.
Prefer to do it by hand? Create a .env file (copy .env.example if you installed from source) with an explicitly restricted workspace:
Never commit .env.
Auth0 setup
This project uses FastMCP's Auth0Provider fixed-client OAuth integration.
-
Open auth0.com, create an account, and open the Auth0 Dashboard.
-
Go to Applications → APIs → Create API.
-
Use your public MCP URL as its Identifier (audience), for example
https://mcp.example.com/. Keep RS256 as the signing algorithm. -
Go to Applications → Applications → Create Application, enter a name, select Regular Web Application, and create it.
-
Set Application Ownership to First-party. Open Application > API Access, select the API you created, and enable User-delegated Access.
-
On Auth0's Integrate into your application page, click Copy above the
.envblock. The wizard can importAUTH0_DOMAIN,AUTH0_CLIENT_ID, andAUTH0_CLIENT_SECRETfrom your clipboard or from a pasted block. If Auth0 displaysMASKED, reveal and copy the real Client Secret from the application's Settings tab; masked secrets are rejected. -
Copy the API's Identifier into
AUTH0_AUDIENCEwhen the wizard asks for it. It is intentionally separate because Auth0's application.envblock does not contain the API audience. -
In the Auth0 application's Settings, use the MCP server's public origin (without
/mcp) as follows: -
Save the Auth0 application settings, then run the wizard. Never share the Client Secret or commit
.envto Git.
The callback above is FastMCP's fixed upstream callback. Do not put Claude, ChatGPT, or Grok callback URLs into Auth0: those products are downstream MCP clients and FastMCP validates their redirect URIs separately during MCP client registration. Connect each product to https://mcp.example.com/mcp.
Auth0's Python quickstart also shows AUTH0_SECRET, APP_BASE_URL, PORT, and sample Flask code. They belong to Auth0's standalone sample web application and are not used by this MCP server; the wizard safely ignores them when importing the copied block.
Client notes:
- ChatGPT supports MCP OAuth client registration with CIMD and DCR. The server allows
https://chatgpt.com/connector_platform_oauth_redirect; add the public/mcpendpoint in ChatGPT developer mode. - Claude custom connectors accept the public
/mcpendpoint and start OAuth when you connect. - Grok custom connectors accept a publicly reachable MCP server URL and complete any required authentication. Grok availability may depend on the current Grok plan and workspace controls.
FastMCP also supports an Auth0 MCP-native/DCR path through Auth0MCPProvider. This repository currently uses the manually managed, fixed-client Auth0Provider path.
Run
(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:
For an intentional local-only test without Auth0:
Do not use insecure mode on a publicly reachable endpoint.
After starting the server (and the tunnel for remote mode), verify it:
The server and tunnel must remain running; closing either makes a tunneled endpoint unavailable.
Cloudflare Tunnel
Install cloudflared, authenticate it and create a named tunnel:
Create ~/.cloudflared/config.yml:
Validate and run it:
Keep both universal-host-manager-mcp and cloudflared running. Closing either process takes the public endpoint offline. The setup wizard can create an executable uhm-enable-autostart.sh installer. It writes Linux systemd-user services or macOS LaunchAgents for both processes and shows one command to run.
Your remote MCP URL will be:
Set MCP_BASE_URL=https://mcp.example.com; do not include /mcp in MCP_BASE_URL.
No domain? Use ngrok's free static domain
Auth0 OAuth needs a stable HTTPS URL, but you don't need to own a domain to get one. Unlike ngrok's old random URLs (which changed every restart) or Cloudflare's login-free quick tunnels (same problem), ngrok's free tier includes one static subdomain per account that never changes, at no cost.
-
Create a free account at ngrok.com. On macOS install it with
brew install ngrok/ngrok/ngrok; on Ubuntu usesudo snap install ngrok. Other Linux distributions can use ngrok's official download instructions. -
Open the ngrok authtoken page, copy your token, and run:
Use the authtoken, not the domain ID. Never share it; reset it in the dashboard if it is exposed.
-
Claim your free static domain from the ngrok dashboard (Domains → New Domain). You'll get something like
your-name.ngrok-free.dev. -
Start
universal-host-manager-mcpfrom the directory containing.env. -
In a second terminal, start the tunnel:
Both processes must remain running. Closing either one takes the public endpoint offline. The wizard can create
uhm-enable-autostart.sh, which installs Linux systemd-user services or macOS LaunchAgents for both processes. -
Set
MCP_BASE_URL=https://your-name.ngrok-free.devin.env(keepHOST=127.0.0.1; ngrok forwards to the local port while the server listens only on loopback). -
In Auth0, set the application's callback URL to
https://your-name.ngrok-free.dev/auth/callback; set web origins and logout URLs tohttps://your-name.ngrok-free.dev(see Auth0 setup).
Your remote MCP URL is:
This is a good fit for personal use or a small number of clients. For production traffic at scale, ngrok's free tier applies connection/bandwidth limits — check their pricing page if you outgrow it, or switch to the domain-based Cloudflare Tunnel setup above.
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 workloads - Security 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:
3. Configure
Keep 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.
Don't own a domain? Run the steps from No domain? Use ngrok's free static domain above instead — same outbound-only, no-inbound-port setup, just from the EC2 instance.
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
PORT - Security group on the instance: allow inbound
PORTonly from the ALB's security group, never from0.0.0.0/0 - Point 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):
6. 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:
Complete 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:
The 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:
macOS Remote Access Readiness Test
For a remote macOS installation, uhm-setup ends by asking:
Run this while you are physically beside the Mac. Select only the capabilities you expect to use remotely. The wizard can test workspace read/write access, trigger a read-only Google Chrome Automation request, and open the exact macOS Privacy & Security panes for protected files, Accessibility, and Screen Recording. Opening an application or an ordinary URL does not itself require an extra privacy permission.
macOS deliberately requires the user to approve TCC privacy prompts. The wizard does not bypass or click them. It shows the exact server executable path, asks you to approve each selected permission, and prints a readiness report. If a permission is not prepared before unattended use, a later remote task can stop at a dialog that requires somebody at the Mac.
Full Disk Access, Automation, Accessibility, and similar grants may be tied to the executable or installation path involved. Recreating a virtual environment, switching Python versions, or reinstalling elsewhere can require approval again. After changing a privacy permission, restart the MCP LaunchAgent before relying on it remotely.
Configuration
Testing
CI runs the suite against fastmcp 2.13, 3.x and 4.x on every push (see the badge above), since @mcp.tool()'s return type changed between major versions and tests call tools through a small version-agnostic helper (tests/conftest.py::call_tool) to cover all three.
Download
Clone with Git:
Or use Code → Download ZIP on GitHub.
License
来源:README.md,提交 b66f766
工具
0版本历史
7- v0.1.15最新Sep 29, 2026
- v0.1.12Sep 23, 2026
- v0.1.11Sep 22, 2026
- v0.1.10Sep 22, 2026
- v0.1.7Sep 21, 2026
- v0.1.4Sep 21, 2026
- v0.1.2Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Host 集成

Host.al: .al domains and servers in Albania
al.host官方发布者
Host.al 的远程 MCP 服务器,用于实时查询 .al 域名可用性、欧元价格、主机产品目录、购物车链接与帮助中心解答。
File2Host
io.f2h官方发布者
File2Host 让助手上传文件并生成任何人都能打开的分享链接,还可整理文件夹、设置密码和收集文件。

AI Host Optimizer
由 GitHub 账号 williamdoring-prog 发布
分析本机硬件,给出带可信度分级的本地 AI 模型优化清单,并可对本地推理做基准测量。

host-html
由 GitHub 账号 phanosh 发布
把 AI 生成的 HTML 发布为公开链接,并在同一链接上原地更新,便于分享报告、仪表盘或演示文稿。

CMO Studio: deploy and host AI-built apps
由 GitHub 账号 cmo-partners-as 发布
远程 MCP 服务器,让助手部署并托管 AI 构建的应用,同时提供 Postgres、文件存储、域名和邮件。