Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 92 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,112 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="web/public/brand/outpost-dark.svg">
<img src="web/public/brand/outpost-light.svg" alt="Outpost icon" width="80">
</picture>

# Outpost

Drive coding sessions on your own machines from a browser, with content
end-to-end encrypted between the browser and the machine.
Run Claude Code or Codex on your own machine and pick up the session from a phone or desktop browser. End-to-end encryption keeps your prompts, Git diffs and terminal output private from the Outpost relay.

Start a change in its own Git worktree, close the tab and come back when the agent needs you. You can review its diff, approve a command or finish a tool’s sign-in from the same conversation.

[Open Outpost](https://outpost.andrewmorgan.ai) · [Run it locally](#run-outpost-locally) · [Connect an MCP client](#connect-an-mcp-client)

## Start your first session

1. On the Mac or Linux machine where you work, install and sign in to the Claude Code or Codex CLI you want to use.
2. Sign in to Outpost. Under **Machines**, choose **Add a machine**. Run the command it shows in a terminal on that machine.
3. Follow the installer’s sign-in link using the same account. The host agent runs as your user and connects outward to the relay.
4. Under **Sessions**, choose **New session**. Pick your machine, agent and project folder, then send your first prompt.

## What end-to-end encryption protects

Your browser encrypts each message before it reaches the relay. The host agent decrypts it on your machine, runs the coding CLI there and encrypts the reply. The machine keeps the session history in a local SQLite database. The CLI still communicates with its model provider as usual.

```mermaid
flowchart LR
accTitle: The encrypted session channel
accDescr: The browser and host agent exchange encrypted messages through the relay.
B["Your browser"] <--> R["Relay forwards ciphertext"]
R <--> H["Your machine"]
```

The relay can see which account connects to which machine, when it connects and how much data moves. Only the endpoints hold the keys that decrypt session traffic.

On first connection, the browser pins the machine’s public key supplied by the relay. The machine checks that your identity provider signed a token for both your account and this browser’s key. On later connections, the two ends use their remembered keys for a mutual Noise handshake. This design trusts the identity provider, the first host key and the server that delivers the browser’s JavaScript.

## Answer MCP requests in the session

A tool can pause a task to ask you for input. The Model Context Protocol (MCP) calls this elicitation. For example, if a tool needs you to sign in, Outpost shows its destination in the conversation. Open the link, finish on the service’s site and choose **I’m done, continue** when you return.

<img src="docs/images/mcp-sign-in.png" width="520" alt="A GitHub sign-in request in Outpost shows the destination, a button to open it and controls to continue or decline.">

Status: early, and running. Add a machine with one command, sign in, and start and steer Claude
Code sessions on it from a browser, through a relay that only sees ciphertext.
Both Claude Code and Codex sessions support these URL requests. Codex sessions can also show simple forms. A tool can ask which project to use, for example, and receive your selection as a structured answer.

## Layout
## Connect an MCP client

- `cmd/outpost`: the server. Machines dial out to it, browsers connect to it, it relays between them.
- `cmd/outpost-host`: the host agent. Runs as you, dials out, serves sessions to your browsers.
- `cmd/outpost-mcp`: the MCP service, for claude.ai. A browser grants it a time-boxed key: see [docs/mcp.md](docs/mcp.md).
- `internal/securechannel`: the Noise layer and its record format.
- `internal/host`: the agent's packages. `peer` holds the host key and the browser keys it trusts.
- `internal/server`: the relay, sign-in, enrolment and the installer. It holds no content keys.
- `internal/client`: reference client in Go, the same contract the browser speaks.
- `web`: the browser client (React). `web/src/outpost` is the encrypted transport.
- `wire/host.openrpc.json`: the application wire contract.
To check your machines from claude.ai or another MCP client, add `https://outpost-mcp.andrewmorgan.ai/mcp` and sign in. Then ask, “Which sessions are waiting for me?”

## How trust works
The first time a tool needs machine access, a client that supports URL elicitation presents the approval link directly to you. Other clients receive the link in the tool result. Open it in a trusted Outpost browser to pick the machines, permissions and expiry.

There is no pairing step. Two sign-ins do everything.
```mermaid
sequenceDiagram
accTitle: How a machine grants MCP access
accDescr: You approve the service key from a trusted browser before the service can read sessions.
participant C as MCP client
participant S as MCP service
participant B as Browser
participant H as Machine
C->>S: List sessions
S-->>C: Request approval by URL
C-->>B: You open the link
B->>H: Trust the service key
C->>S: Retry the request
S->>H: Read via encrypted channel
H-->>S: Granted session data
S-->>C: Session list
```

1. A machine runs `outpost-host enrol` and signs in (device flow). It now knows which account
owns it, and the server will route to it for that account.
2. A browser signs in. The request carries a fingerprint of the browser's own key as the
OpenID Connect nonce, so the identity token that comes back says "this account, on this key".
3. The first time that browser opens a machine, it shows the machine that token inside a Noise
handshake. The machine checks the issuer's signature itself, that the token is for its
owner, and that it was issued for exactly the key in the handshake. Then it remembers the key.
4. Later connections are a mutual-key handshake with no token.
| Access you grant | What the client can do |
| --- | --- |
| View sessions | List sessions and recent folders. Read messages, step summaries and pending requests. |
| View and steer sessions | Also read tool output and diffs, send instructions, answer requests and start sessions. Create named agents and schedule their next wake. |

The server relays all of this and cannot produce a token, so it cannot add a browser to a
machine. It can see who talks to which machine, sizes and timing.
The MCP service can read the data it returns to the client. A grant gives it no direct access to files, terminals or access settings. Each machine enforces an idle timeout and a maximum grant lifetime of 90 days. You can revoke access sooner in **Preferences**. See the [MCP tools and grant rules](docs/mcp.md).

A trusted browser can also grant a service (the MCP service) a key of its own, for a while and
for viewing or steering only. That service sees what it reads: see [docs/mcp.md](docs/mcp.md).
## Run Outpost locally

What is taken on trust: the identity provider (whoever can sign in as you reaches your
machines), and the server for a machine's key on first contact (the browser pins it and refuses
a different one later). The page's own JavaScript is trusted too: whoever serves the web client
can change it.
From the repository root, build the server, host agent and web client with Go 1.26.4 and Node.js 22 LTS.

## Run it locally
```sh
go build -o bin/ ./cmd/outpost ./cmd/outpost-host
(cd web && npm ci && npm run build)
bin/outpost --dev --addr 127.0.0.1:8080 --web web/dist
```

go build -o bin/outpost ./cmd/outpost && go build -o bin/outpost-host ./cmd/outpost-host
(cd web && npm install && npm run build)
bin/outpost --dev --addr 127.0.0.1:8080 --web web/dist
bin/outpost-host run --insecure-no-auth --hub ws://127.0.0.1:8080/api/v1/hosts/connect
In a second terminal at the repository root, start the host agent. This gives the local demo its own state directory.

Then open http://127.0.0.1:8080. `outpost-host browsers` lists the browsers a machine trusts.
```sh
OUTPOST_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/outpost-host-dev" \
bin/outpost-host run --insecure-no-auth --hub ws://127.0.0.1:8080/api/v1/hosts/connect
```

## Releases
Open [the local Outpost app](http://127.0.0.1:8080). This loopback setup skips Outpost sign-in. To run a coding session, use a CLI you’ve signed in to on this machine.

Every push to `main` that passes CI publishes a GitHub Release, and installed agents update
themselves: see [docs/releases.md](docs/releases.md).
## Explore the project

## Origin
| If you want to | Start here |
| --- | --- |
| Follow a message from browser to host | [Browser transport](web/src/outpost), [Noise protocol and record format](internal/securechannel), [host trust and grants](internal/host/peer) |
| Work on the relay or either coding CLI | [Relay server](internal/server), [Claude Code and Codex adapters](internal/host/harness), [host RPC contract](wire/host.openrpc.json) |
| Run your own MCP service | [MCP configuration](docs/mcp.md#configuration), [service entry point](cmd/outpost-mcp) |
| Install a released build or manage host updates | [GitHub releases](https://github.com/andyjmorgan/outpost/releases), [release and update guide](docs/releases.md) |

`internal/host`, `cmd/outpost-host` and `wire` were copied from
`andyjmorgan/DonkeyWork-Sandbox` at `5db4ed95` (`src/Fabric.Host`) and renamed.
Outpost uses its own config directory (`~/.config/outpost-host`), keychain
service, service unit and environment variables (`OUTPOST_*`), so it can run
beside `fabric-host` on one machine. It never adopts another product's state.
To run the Go and browser tests after building the local app, install tmux and run the following from the repository root. The browser suite uses stand-in coding CLIs.

## Test
```sh
go test ./...
(cd web && npx playwright install chromium)
node web/tests/e2e.mjs chromium
```

go test ./...
node web/tests/e2e.mjs # browsers against the real server and agent, fake claude
The host agent and wire contract originated in `andyjmorgan/DonkeyWork-Sandbox` at commit `5db4ed95`. Outpost keeps its own host configuration in `~/.config/outpost-host`.
Binary file added docs/images/mcp-sign-in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading