# askpeer — Ask your teammate's coding agent, without interrupting them. > Agent-executable setup & MCP tool reference for askpeer (https://askpeer.dev). ## What askpeer does askpeer lets coding agents (Claude Code, Codex, Cursor, Gemini CLI) answer teammates' technical questions on shared GitHub repositories in ~2 seconds using locally secret-redacted session summaries, active branch state, and durable decision memories — escalating to an async inbox only when a human decision hasn't been made yet. ## Step 1: Authenticate & Auto-Configure Your Harness Run in the user's terminal: ```bash npx askpeer@latest init ``` Or install & initialize via one-line shell script: ```bash curl -fsSL https://askpeer.dev/install.sh | sh ``` What `askpeer init` does automatically: 1. Authenticates with GitHub via `gh auth token` (zero browser friction if `gh` is logged in, falling back to GitHub OAuth Device Flow) against `POST https://askpeer.dev/api/v1/auth/github`. 2. Saves an `ap_...` API token to `~/.askpeer/config.json` (`chmod 600`). 3. Registers the remote Streamable HTTP MCP server (`https://askpeer.dev/mcp` with `Authorization: Bearer `) and installs the `askpeer` skill/rule across detected harnesses: - Claude Code: `~/.claude.json`, `~/.claude/skills/askpeer/SKILL.md`, and a non-blocking `Stop` hook (`askpeer sync --quiet`) in `~/.claude/settings.json` - Codex: `~/.codex/config.toml` + `~/.codex/skills/askpeer/SKILL.md` - Cursor: `~/.cursor/mcp.json` + `~/.cursor/rules/askpeer.mdc` - Gemini CLI: `~/.gemini/settings.json` + `~/.gemini/skills/askpeer/SKILL.md` ## Step 2: Sync Your Current Repository Inside any shared GitHub repository checkout: ```bash npx askpeer@latest sync --dry-run # Optional: verify [REDACTED] local secret scrubbing first npx askpeer@latest sync ``` ## Step 3: Use the 3 MCP Tools (`https://askpeer.dev/mcp`) 1. `peers(repo: "owner/repo")` Returns teammates with synced snapshots on `owner/repo` (username, current branch, touched files, latest session title, updated_at). Run this before modifying shared subsystems to avoid merge conflicts. 2. `ask(to: "@username", question: "...", repo: "owner/repo")` Queries `@username`'s coding agent twin grounded strictly in their synced sessions, git state, and decision memories. - Returns grounded answers in ~2s with branch + session timestamp citations. - If `@username` hasn't connected askpeer yet, returns an invite CTA (`set up askpeer — https://askpeer.dev/llms.txt`). - If genuinely undecided in synced context, returns `needs_human: true` and queues `question_id` in `@username`'s inbox. 3. `inbox(action: "list" | "reply", question_id?: "q_...", answer?: "...")` - `action: "list"` — view pending & recent answered teammate questions. - `action: "reply"` — answer `question_id` and persist a durable `decision_memory` for `owner/repo` so future `ask` calls resolve immediately without interrupting you again. ## Security Guarantees - Open-source MIT CLI: local secret redaction runs BEFORE any bytes leave your laptop (`.env` assignments, `sk-*`, `ghp_*`, `github_pat_*`, `AIza*`, `xoxb-*`, `AKIA*`, JWTs, Bearer tokens, PEM private keys, credentialed URLs, and high-entropy tokens -> `[REDACTED]`). - Zero-admin GitHub access control: every `sync`, `peers`, and `ask` verifies collaborator permissions on `owner/repo` via GitHub API (random public GitHub users cannot read sessions on public repositories).