linux-harness-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
linux-harness-mcp
A Model Context Protocol server that exposes this host as a Linux harness over public-trusted HTTPS. Designed for AI agents that have no Linux runtime of their own — they connect and get shell, Python, and filesystem tools that execute here.
Features
13 MCP tools: shell exec, Python exec, file read/write, directory ops, glob search, health check, opencode run/ultrawork
Basic Auth or Bearer Token authentication
Public HTTPS via ngrok (no certificate management needed)
One-command install with interactive wizard (
lhm install)Systemd service with auto-restart
CLI manager (
lhm) for status, logs, config, diagnostics
Related MCP server: local-env-mcp
Quick Start
Install via npm
npm install -g linux-harness-mcpInteractive Setup
sudo lhm installThis walks you through bind address, port, authentication, and optional ngrok exposure.
Check Status
lhm statusGet Public Endpoint
lhm url
# https://your-domain.ngrok-free.dev/mcpCLI Reference (lhm)
Command | Description |
| Interactive setup wizard |
| Stop + remove service + ngrok cleanup |
| Show service status + public URL |
| Restart the service |
| View harness logs ( |
| View ngrok tunnel logs |
| Print public MCP endpoint |
| Show configuration (secrets masked) |
| Open config in |
| Run health checks (incl. ngrok) |
| Print version |
MCP Tools
Tool | Description |
| Run shell commands via |
| Execute Python scripts with system |
| Read files (auto text/binary, base64) |
| Write text or base64 binary files |
| List directory entries with metadata |
| Create directories (recursive) |
| Delete files or directories |
| Move/rename paths |
| Get file metadata (type, size, mode, mtime) |
| Glob pattern file search |
| Service health + host summary |
| Execute complex tasks via opencode CLI |
| Execute tasks with ultrawork mode |
Client Configuration
Basic Auth (recommended)
{
"mcpServers": {
"linux-harness": {
"url": "https://your-domain.ngrok-free.dev/mcp",
"headers": {
"Authorization": "Basic <base64(user:pass)>",
"ngrok-skip-browser-warning": "any"
}
}
}
}Bearer Token
{
"mcpServers": {
"linux-harness": {
"url": "http://127.0.0.1:8765/mcp",
"headers": {
"Authorization": "Bearer <token>"
}
}
}
}Architecture
Agent (MCP client)
| HTTPS (TLS 1.2/1.3, Let's Encrypt via ngrok)
v
ngrok :443 --> 127.0.0.1:8765 (uvicorn + FastMCP Streamable HTTP)
|
v
shell / python3 / filesystem (as root)Public ingress: ngrok tunnel to
127.0.0.1:8765MCP transport: Streamable HTTP, stateful sessions
Auth: ASGI middleware (Basic Auth or Bearer Token)
/health: unauthenticated health endpoint
Environment Variables
Variable | Default | Description |
|
| Bind address |
|
| Bind port |
| — | Basic Auth username |
| — | Basic Auth password |
| — | Bearer token (alternative to Basic Auth) |
| — | Comma-separated allowed origins |
Development
# Install in editable mode
pip install -e .
# Run tests
pytest tests/ -q
# Build wheel
python -m build --wheelLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Linux server administration over OAuth MCP: shell, Docker, systemd, files and monitoring.
Secure Linux sandboxes for AI agents, as MCP tools.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes MCP tools that enable remote LLMs to query local Docker containers, OS processes, and system services in real time.-
- FlicenseNot gradedqualityDmaintenanceExposes your local machine's filesystem, git, shell, network, databases, and system to any MCP-compatible LLM client over HTTP.7-
- AlicenseNot gradedqualityBmaintenanceTurns any Linux server into an AI-agent-accessible machine over HTTPS, allowing MCP clients like ChatGPT, Claude, and Grok to securely control files, run shell commands, inspect system state, query SQLite, and work with git behind a bearer token.76 npm4MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as ChatGPT and Claude to administer Linux or macOS hosts through authenticated Streamable HTTP, including running shell commands, reading and writing files within a workspace, listing directories, and retrieving system metrics.1MIT