Agent infrastructure / Self-hosted architecture

Local MCP

One entry point. Tools across machines.

My role

Designer, builder & operator

Period

2026

Focus

MCP · OAuth / PKCE · macOS / Linux

Local MCP is a tool gateway connecting web-based AI agents to computers you control. A single MCP entry point routes file, command and terminal operations to explicitly selected macOS or Linux workers.

The work, in brief

Self-hosted multi-machine agent infrastructure with authentication, session isolation and build-provenance checks. Deployed and validated on my six-machine environment; a public installation package and multi-user hosted service have not been released.

On this page+

01

Separating control from execution

The gateway handles authentication, machine selection and stable tool discovery. Workers handle files, commands and terminal operations. The execution target is explicit rather than hidden in a tool description.

  1. 01Web-based agent
  2. 02Authentication & routing
  3. 03macOS / Linux workers

02

Identity, sessions and versions need boundaries

I implemented OAuth / PKCE authentication and session ownership tied to authenticated context. Build-provenance checks reject workers that do not match the accepted release instead of silently weakening validation.

  • Separate gateway and worker responsibilities.
  • Isolate sessions across clients.
  • Keep tool discovery stable and verify worker builds.

03

Beyond a successful command

Long tasks also need readable output, persistent task handling and lifecycle cleanup. I worked on UTF-8-safe output pagination, stable tool discovery and resource cleanup, using real commands and PTY smoke tests to check cross-platform behaviour.

04

Your machines, not a shared execution fleet

The intended model is to connect machines that a user owns or is authorised to operate, not to give visitors access to my execution environment. The October 2026 deployment record confirms real commands across six workers; that does not establish a public hosted service.

A public self-hosted release still needs packaging, credential isolation, restricted default permissions and deployment documentation. This page presents the architecture and engineering work, not a sign-up or a production gateway.

Have a project, research question or collaboration in mind?

peterhpywk@gmail.com