Knossos
Enables remote filesystem and CLI access to a Windows machine over LAN through MCP, with file read/write and command execution capabilities.
README
Knossos — remote LAN filesystem + CLI access over MCP
The Minoan palace whose labyrinth guarded the center. The server machine is the labyrinth; this MCP server is the thread of Ariadne that leads an AI agent to its files and CLI — from another machine on the same network.
Knossos is a small MCP server (Streamable HTTP) that runs on one Windows machine (the server, e.g. a powerful box that runs your local models) and exposes its filesystem and command-line to an MCP client running on another machine (the client, e.g. your daily-driver laptop) over the LAN — authenticated and restricted.
- Transport: Streamable HTTP (
/mcp), stateless, JSON responses. - Auth: Bearer token in a header, validated by middleware (constant-time compare).
- Safety: directory allowlist (anti path-traversal), binary allowlist, command
timeout, never
shell=True.
⚠️ Security — read before running
Knossos exposes file read/write and arbitrary command execution of the server machine over the network. That is powerful and, if misconfigured, dangerous. Only run it on a trusted LAN, and always:
- Use a strong random token (
KNOSSOS_TOKEN), kept out of any repository.- Keep the directory allowlist (
KNOSSOS_ALLOWED_DIRS) as small as possible.- Keep the binary allowlist (
KNOSSOS_ALLOWED_BINS) specific. Allowing a general shell (powershell,cmd,bash) effectively allows any program, because a shell can spawn other programs — so the allowlist stops being a real boundary.- Lock the port to the client's IP with a firewall rule (
scripts/setup-firewall.ps1).- Never port-forward this port on your router. Knossos is LAN-only.
No transport encryption is used by default (plain HTTP on the LAN). For stronger setups, see Future work below.
Tools
| Tool | What it does |
|---|---|
health |
version, hostname, time, active allowlist — connection test |
system_info |
OS, CPU, RAM, GPU (via nvidia-smi) |
list_dir |
list a directory inside the allowlist |
read_file |
read a file (text or base64), with a byte cap |
write_file |
write/append, creating parent dirs inside the allowlist |
stat_path |
metadata for a path |
run_command |
run argv (list or string) with restricted cwd, timeout, bin allowlist |
delete_path |
delete a file/empty dir — only if KNOSSOS_ALLOW_DELETE=true, needs confirm=true |
Choosing what to expose (access control)
Knossos gives you three independent dials to decide exactly how much of the server machine an authenticated client can touch. Tighten or loosen each to taste — start restrictive and open only what you actually need.
1. Which folders — KNOSSOS_ALLOWED_DIRS (the strongest boundary).
Every file tool (list_dir, read_file, write_file, stat_path, delete_path) and
the working directory of run_command are confined to these roots. Anything outside is
rejected, and ../symlink escapes are resolved away. This is the boundary that actually
contains the agent — keep the list as small as the task allows.
- Read-only-ish exposure: point it at a single project or models folder.
- Broad exposure: add more roots; each one is fully readable and writable.
2. Which programs — KNOSSOS_ALLOWED_BINS (a convenience filter, not a sandbox).
run_command will only launch an executable whose name is on this list. Important caveats
so you choose deliberately:
- The match is by name, not path —
pythonallowsC:\anywhere\python.exe, not a specific binary. - Some "binaries" are effectively a general shell.
powershell,cmd,bash— and alsopython(python -c "...") — can launch any other program. Putting any of these on the list meansrun_commandcan run essentially anything, so the bin allowlist stops being a real restriction. That may be exactly what you want (full automation) or exactly what you don't (least privilege). Decide on purpose. - Leaving the list empty allows any binary (the server prints a warning at startup).
- Most restrictive useful setup: list only the specific tools you'll call, none of which
is a shell or interpreter (e.g.
nvidia-smi;ollama). - Full-power setup: add
powershell(orpython) and accept that the client can run anything within the allowed directories.
3. Whether deletion is possible — KNOSSOS_ALLOW_DELETE (off by default).
The delete_path tool isn't even registered unless this is true, and even then it only
removes a single file or an empty directory and requires confirm=true. Leave it false
unless you specifically need remote deletion.
The real security perimeter is the token + the firewall rule, not the bin allowlist.
Any client holding KNOSSOS_TOKEN is trusted by design and — if a shell/interpreter is
allowed — can run arbitrary code within the allowed directories. So: guard the token,
restrict the port to the client's IP (scripts/setup-firewall.ps1), and treat the
allowlists as how much you delegate to that already-trusted client.
Requirements
- Server machine: Windows, Python 3.10+. (Optional: NSSM to run as a service.)
- Client machine: an MCP client (e.g. Claude Desktop) with Node.js /
npxavailable (used by themcp-remotebridge — see Client setup).
Server setup (the machine being accessed)
-
Clone and configure:
git clone https://github.com/flaviofujita/knossos_mcp.git cd knossos_mcp copy .env.example .env # generate a strong token: python -c "import secrets;print(secrets.token_urlsafe(48))"Edit
.env:KNOSSOS_TOKEN= the generated token (never commit it).KNOSSOS_ALLOWED_DIRS= allowed root folders,;-separated (e.g.D:\models;D:\projects).KNOSSOS_ALLOWED_BINS= allowed executables (e.g.python;ollama;whisper;nvidia-smi).
-
Run: double-click
start-knossos.bat, or:.\scripts\run.ps1First run creates the venv (
.venv), installs the package, and serves onhttp://0.0.0.0:8765/mcp. While the.batwindow is open the machine won't sleep from inactivity (viaSetThreadExecutionState); closing the window releases that.Laptop: keep-awake prevents idle sleep but does not override closing the lid. To keep the server awake on lid-close (while plugged in), in an elevated PowerShell:
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0 powercfg /setactive SCHEME_CURRENT -
Start on login (optional):
.\scripts\add-to-startup.ps1 # add (undo with -Remove)Or run as a boot service via
scripts\install_service.ps1(NSSM, elevated shell). -
Lock the firewall to the client's IP (elevated PowerShell):
.\scripts\setup-firewall.ps1 -ClientIp <CLIENT_IP>Find IPs with
ipconfig. Ideally reserve the server's IP via DHCP on your router. -
Smoke test (server running, in another terminal):
.\.venv\Scripts\python.exe scripts\smoke_test.pyChecks:
healthwith the token, a bad token rejected (401), and a path outside the allowlist refused.
Client setup (the machine running the agent)
Most MCP clients (including Claude Desktop) only launch stdio servers from their
config — they do not accept a remote HTTP URL directly. Bridge to Knossos with
mcp-remote, which speaks stdio to the client
and Streamable HTTP to the server.
Install it once on the client:
npm install -g mcp-remote
Then add Knossos to the client config (for Claude Desktop:
%APPDATA%\Claude\claude_desktop_config.json). Using npx:
{
"mcpServers": {
"knossos": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"http://<SERVER_IP>:8765/mcp",
"--allow-http",
"--header",
"Authorization: Bearer <KNOSSOS_TOKEN>"
]
}
}
}
--allow-httpis required because this is plain HTTP on the LAN (not HTTPS).<KNOSSOS_TOKEN>must match the server's.env. Treat this config file as a secret.
Windows note: if
npxfails to launch (e.g. a "'C:\Program' is not recognized" error from a space in the Node path), callnodedirectly on the installed script:"command": "C:\\Program Files\\nodejs\\node.exe", "args": ["<npm-root-g>\\mcp-remote\\dist\\proxy.js", "http://<SERVER_IP>:8765/mcp", "--allow-http", "--header", "Authorization: Bearer <KNOSSOS_TOKEN>"]Find
<npm-root-g>withnpm root -g.
Restart the client, then call the health tool to confirm the bridge works.
Environment variables
| Var | Default | Description |
|---|---|---|
KNOSSOS_TOKEN |
— | required. Bearer token. |
KNOSSOS_HOST |
0.0.0.0 |
listen interface. |
KNOSSOS_PORT |
8765 |
TCP port. |
KNOSSOS_ALLOWED_DIRS |
— | required. Allowed roots, ;-separated. |
KNOSSOS_ALLOWED_BINS |
empty | allowed binaries; empty = any (not recommended). |
KNOSSOS_CMD_TIMEOUT |
300 |
max seconds per command. |
KNOSSOS_MAX_READ_BYTES |
5000000 |
default read_file cap. |
KNOSSOS_ALLOW_DELETE |
false |
enable the delete_path tool. |
Security checklist
- [ ] Token ≥ 32 bytes, kept out of any repo (
.envis gitignored). - [ ] Directory allowlist minimal and tested (path traversal blocked).
- [ ] Binary allowlist specific (no general shell unless you accept the trade-off).
- [ ] Command timeout configured.
- [ ] Firewall rule restricting the port to the client's IP.
- [ ] No router port-forwarding.
- [ ]
healthworks with the token and is rejected (401) without it.
Future work
- SSH tunnel (OpenSSH on Windows) + bind to
127.0.0.1for transport encryption. - Native TLS (self-signed cert on the LAN).
- Streaming for long-running jobs (
run_command_stream). - Per-call audit logs (who, when, which tool, which path/command).
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。