How supanut-p/mcp-linux works
Baitonghub-Linux-mcp is a headless Linux runtime that lets an MCP client perform bounded, policy-controlled work in registered workspaces and on explicitly registered hosts. The main path is MCP transport to server/tool dispatch, then workspace or system-operation services, with results and durable task state returned to the client. The README documents a broad tool surface; unsampled capabilities are represented at their existing subsystem paths. Edges are limited to README statements and shown source references, so some internal tool-to-service wiring is intentionally omitted.
Main entry points: workspace-service.ts Workspace roots · file-service.ts File operations · server.ts MCP server · stdio.ts STDIO transport
Components 21
MCP interfaces
- STDIO transport
packages/mcp-server/src/stdio.ts - HTTP transport
packages/mcp-server/src/http.ts - MCP server
packages/mcp-server/src/server.ts - Tool registry
packages/mcp-server/src/tool-registry.ts - Task protocol
packages/mcp-server/src/tasks-protocol.ts
Workspace work
- Workspace roots
packages/workspace/src/workspace-service.ts - File operations
packages/application/src/file-service.ts - Search and context
packages/application/src/search-service.ts - Workspace tree
packages/application/src/workspace-query-service.ts - Workspace snapshots
packages/mcp-server/src/workspace-snapshot-service.ts - Workspace checkpoints
packages/mcp-server/src/workspace-checkpoint-service.ts
Linux and remote operations
- Owned processes
packages/process/src/process-manager.ts - Linux capabilities
packages/capabilities/src - Remote hosts and rollout
packages/mcp-server/src/remote-rollout-runtime.ts - MCP extensions
packages/extensions/src/extensions-service.ts
State and safeguards
- Runtime database
packages/storage/src/database.ts - Backup bundles
packages/storage/src/backup-service.ts - Audit records
packages/audit/src/audit-service.ts - Permission policy
packages/permissions/src/permission-engine.ts - Workspace boundaries
packages/workspace/src/workspace-path-guard.ts
Other components
- MCP client
Connections 24
- MCP client → STDIO transport: connects via
- MCP client → HTTP transport: connects via
- STDIO transport → MCP server: serves requests
- HTTP transport → MCP server: serves requests
- MCP server → Tool registry: uses registry
packages/mcp-server/src/server.ts - MCP client → Task protocol: submits tasks
- MCP client → Workspace roots: registers roots
- MCP client → File operations: manages files
- MCP client → Search and context: searches workspace
- MCP client → Workspace tree: inspects tree
- MCP client → Workspace snapshots: compares snapshots
- MCP client → Workspace checkpoints: creates checkpoints
- MCP client → Owned processes: runs tasks
- MCP client → Linux capabilities: uses tools
- MCP client → Remote hosts and rollout: administers hosts
- MCP client → MCP extensions: calls extensions
- MCP client → Backup bundles: manages backups
- MCP client → Audit records: queries audit
- MCP client → Permission policy: explains policy
- File operations → Workspace roots: resolves roots
packages/application/src/file-service.ts - File operations → Workspace boundaries: checks paths
packages/application/src/file-service.ts - Search and context → Workspace roots: resolves roots
packages/application/src/search-service.ts - Workspace tree → Workspace roots: resolves roots
packages/application/src/workspace-query-service.ts - Backup bundles → Runtime database: backs up
packages/storage/src/database.ts