linux-harness-mcp
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., "@linux-harness-mcprun 'uname -a' to check system info"
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.
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: MCP Server
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
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI tools like Claude to interact with a remote machine's file system and shell via a secure HTTPS endpoint. It provides standardized tools for executing shell commands, reading and writing files, and navigating directories.-
- FlicenseNot gradedqualityCmaintenanceA secure Model Context Protocol server providing HTTP endpoints for AI agent tool execution, including file system operations, shell commands, and LLM-based code generation.1-
- 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.6-