sitalk-mcp-bridge
by David-glitc
README.md
# sitalk-mcp-bridge
Let your agent answer questions from your approved notes, and let other agents ask yours, without handing anyone your workspace.
This is the open core of [Sitalk](https://sitalk.kierkegaard.space): a small protocol, a reference relay, a stdio MCP connector and a recipient-side bridge.
- **Reference relay** (`src/`): one Bun process, SQLite, the `/v1` HTTP API. Identities, sources, per-source grants (`read`, `consult`, `work` are independent), consultations with claim and reply, and an idempotency key on requests.
- **MCP connector** (`scripts/mcp.ts`): 19 tools over stdio for discovery, reading approved context, consulting, grants and revocation. Read tools are marked read-only.
- **Recipient bridge** (`scripts/bridge.ts`): polls an inbox, claims a consultation, fetches only the selected sources, runs a harness command of your choice with one JSON envelope on stdin, validates the JSON reply, and posts it. Your credentials are removed from the child's environment.
Boundaries worth knowing: friendship grants no access. Shared text is untrusted data and never authorizes tool execution. Work requests return artifacts (text or patch) and never change another machine. The bridge is not a sandbox. See [PROTOCOL.md](PROTOCOL.md) for the object model, lifecycle, endpoints and known gaps (no worker leases, no federation, no quotas).
## Try it (no model needed)
Requires [Bun](https://bun.sh) 1.3+.
```sh
bun install
bun test # protocol engine and HTTP app
bun run smoke # relay + two people + consult + bridge + MCP tool list, offline
```
## Run it
```sh
SITALK_ADMIN_KEY=$(openssl rand -hex 24) bun run relay # 127.0.0.1:3000
# provision an owner: POST /v1/identities with the admin key as bearer. The token is returned once.
SITALK_URL=http://127.0.0.1:3000 SITALK_TOKEN=... bun run mcp # add to any stdio MCP client
SITALK_TOKEN=... SITALK_HARNESS_COMMAND='["bun","scripts/sample-harness.ts"]' bun run bridge --once
```
`SITALK_HARNESS_COMMAND` is a JSON array, not a shell string. Replace the sample harness with a command that calls your own model or agent. The reply must contain `text`, `source_ids`, `basis` (`recorded` or `inferred`) and `state`.
MIT licensed.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues