Skip to main content
Glama
README.md
# askpeer v0.2

**Ask your teammate's coding agent, without interrupting them.**

`askpeer` v0.2 is a **Zero-CLI Pure Remote MCP server** (`https://askpeer.dev/mcp`) powered by **Cloudflare Workers + Hono + Durable Objects (SQLite) + D1 + KV + Gemini Flash**:

1. **Zero-CLI Remote MCP + 1-Click OAuth 2.1**: Add `https://askpeer.dev/mcp` to Claude Code, Cursor, Codex, or Orca, click once in your browser to claim your `@handle` (PKCE `S256` + anti-hijack Recovery Key), and start collaborating immediately.
2. **10-Second Peer Sessions (6-Digit Pairing Codes)**: Create a Room (`session(action: "create")`) to get a 6-digit invite code (`482-910` + `https://askpeer.dev/join/482-910`), have your teammate's agent join (`session(action: "join", code: "482-910")`), publish server-scrubbed checkpoints via `share(...)`, and query your peer with `ask(question: "...")` (2-peer auto-targeting!).
3. **100% v0.1 CLI & GitHub `owner/repo` Compatibility**: Optional MIT local CLI (`curl -fsSL https://askpeer.dev/install.sh | sh`, `askpeer sync`) continues working seamlessly with `Bearer ap_...` tokens and GitHub collaborator rooms.

## Quick Setup (Zero-CLI Remote MCP)

```bash
# Claude Code
claude mcp add --transport http askpeer https://askpeer.dev/mcp

# Codex
codex mcp add askpeer --url https://askpeer.dev/mcp
```

Or in Cursor / Orca / Windsurf (`mcp.json`):

```json
{
  "mcpServers": {
    "askpeer": {
      "url": "https://askpeer.dev/mcp"
    }
  }
}
```

Or paste into any coding agent:

```text
set up askpeer — https://askpeer.dev/llms.txt
```

## Five MCP Tools (`https://askpeer.dev/mcp`)

1. **`session(action, code?, name?, session_id?)`** — Create, join (by 6-digit code `NNN-NNN`), inspect, list, or leave a Server-Side Peer Session Room (`PeerRoomDO` + D1).
2. **`share(summary, decisions?, open_questions?, files?, branch?, title?, session_id?, repo?)`** — Save a server-scrubbed context checkpoint directly from your agent (zero CLI needed).
3. **`peers(session_id?, repo?)`** — View Room members (or `owner/repo` collaborators), `@handle`, live online status, `last_seen_at`, branch, files, and latest checkpoint.
4. **`ask(question, to?, session_id?, repo?)`** — Grounded ~2s answers with citations via Gemini Flash (auto-targets the other peer in a 2-person Room when `to` is omitted; supports `@all`; escalates `needs_human: true` to `inbox` when undecided).
5. **`inbox(action, question_id?, answer?, session_id?, repo?)`** — List pending peer questions (surfaced proactively via `[Notice: You have N pending peer question(s) in askpeer inbox]`) and record answers into persistent Decision Memory.

## Optional Local CLI Hook

```bash
curl -fsSL https://askpeer.dev/install.sh | sh
askpeer sync
```

## Development

```bash
pnpm install
pnpm build
pnpm typecheck
pnpm test
pnpm dev   # Starts Hono server locally on http://127.0.0.1:8787
```

## License

MIT — see [LICENSE](./LICENSE).