Skip to main content
Glama
PlanRelay MCP Server
by bphkns
README.md
# PlanRelay MCP Server

> **Agents build. Humans decide.**
> Slack-first product decision, Workspace Product Memory, and exact-SHA GitHub sign-off MCP server for AI coding agents.

[![Website](https://img.shields.io/badge/website-planrelay.com-526d38)](https://planrelay.com)
[![MCP Transport](https://img.shields.io/badge/MCP-Streamable%20HTTP-26352b)](https://api.planrelay.com/.well-known/mcp.json)
[![Protocol](https://img.shields.io/badge/protocol-2026--07--28-58665c)](https://api.planrelay.com/llms.txt)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

Coding agents ship code 5× faster — which makes **product decisions and visual PR sign-off** the bottleneck. Instead of letting Claude Code, Codex, Pi, Antigravity, or T3 Code silently guess UX edge cases (or block your terminal), **PlanRelay** routes product questions to Slack while the agent keeps building on a marked reversible default, saves every confirmed answer to **Workspace Product Memory**, and posts a green **`planrelay/sign-off`** GitHub commit check on the **exact reviewed commit SHA** when a teammate clicks **Accept**.

```mermaid
flowchart LR
  A["Coding Agent<br/>(Claude Code · Codex · Pi · Antigravity · T3 Code)"] -->|MCP ask_decision + provisionalDefault| B["PlanRelay Edge<br/>Streamable HTTP MCP"]
  B -->|Batched Slack card| C["Product Lead / Designer<br/>in Slack"]
  C -->|1-click Confirm / Switch| B
  B -->|Instant wakeup /events/wait| A
  A -->|link_pr + screenshots + HEAD SHA| B
  C -->|1-click Accept| B
  B -->|Exact-SHA planrelay/sign-off| D["GitHub Pull Request"]
```

---

## 30-Second Quickstart

### Option A — Team Workspace (Slack + GitHub + 1-Line Agent Setup)

1. **[Connect PlanRelay to Slack](https://api.planrelay.com/slack/install?ref=github_mcp)** *(Free forever: 1 seat · 50 Slack executions/month · no credit card required)*.
2. Copy your personal `pr_mcp_...` setup command from the onboarding portal and run it in your repo root:

```sh
curl -fsSL https://api.planrelay.com/setup.sh?ref=github_mcp | sh -s -- <YOUR_PR_MCP_TOKEN>
```

That single command configures **Claude Code, Codex, Pi, Antigravity (AGY), and T3 Code** (pass `--agent claude|codex|pi|agy|t3` to target one), installs the `planrelay` Agent Skill, and wires non-blocking Slack auto-resume hooks.

### Option B — Direct Streamable HTTP MCP Config

Use the hosted endpoint **`https://api.planrelay.com/mcp`** directly in any Streamable HTTP MCP client:

**Claude Code CLI:**
```sh
claude mcp add --transport http planrelay https://api.planrelay.com/mcp \
  --header "Authorization: Bearer <YOUR_PR_MCP_TOKEN>"
```

**Generic MCP JSON (Cursor, Antigravity, Pi, Windsurf, etc.):**
```json
{
  "mcpServers": {
    "planrelay": {
      "url": "https://api.planrelay.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_PR_MCP_TOKEN>"
      }
    }
  }
}
```

**Codex CLI (`~/.codex/config.toml`):**
```toml
[mcp_servers.planrelay]
url = "https://api.planrelay.com/mcp"

[mcp_servers.planrelay.http_headers]
Authorization = "Bearer <YOUR_PR_MCP_TOKEN>"
```

### Option C — Autonomous Agent Self-Registration (Zero-Click Sandbox)

Coding agents can self-provision a Free workspace and personal `pr_mcp_...` Bearer token in one HTTP call:

```sh
curl -sS -X POST https://api.planrelay.com/agent/register \
  -H "Content-Type: application/json" \
  -d '{"workspaceName":"My App","agentName":"Claude Code","toolName":"Claude Code","repo":"org/repo"}'
```

Returns `{ workspaceId, token, mcpUrl, mcpConfig, setupCommand, slackInstallUrl, onboardingUrl }`.

---

## Install the Agent Skill

Teach your coding agent when to check Product Memory, raise non-blocking provisional decisions, upload screenshots via R2 pre-signed URLs, and wake automatically on Slack replies:

```sh
npx skills add bphkns/planrelay-mcp
```

The skill lives at [skills/planrelay/SKILL.md](skills/planrelay/SKILL.md) and is also served over MCP Skills (`io.modelcontextprotocol/skills` / SEP-2640).

---

## MCP Tools (10)

| Tool | Purpose |
| :--- | :--- |
| `get_spec` | Read the active feature spec, `specVersion`, decisions, linked PRs, and confirmed GitHub CI checks. |
| `get_product_memory` | Search verified Workspace Product Decision Memory by area (`billing`, `settings`, `emails`, etc.) before coding. |
| `start_feature` | Propose a Draft Spec v0 and sync an interactive card to Slack. |
| `ask_decision` | Surface a product/UX ambiguity with 2–4 options and a reversible `provisionalDefault` so coding never stalls. |
| `check_updates` | Check for Slack confirmations, switched decisions, thread replies, or review feedback since `sinceVersion`. |
| `wait_for_updates` | Zero-CPU long-poll wakeup that returns the moment a human acts in Slack. |
| `create_upload_url` | Mint a short-lived pre-signed R2 HTTPS `PUT` URL for Desktop/Mobile UI screenshots (zero base64 in context). |
| `link_pr` | Attach a GitHub PR, exact `HEAD` commit SHA, summary, and screenshots; immediately backfills existing GitHub CI checks. |
| `get_billing_status` | Inspect workspace plan, seats, monthly runs, prepaid x402 agent credits, and upgrade rails. |
| `request_plan_upgrade` | Return a Polar checkout URL and post a 1-tap Team/Scale upgrade card directly to the workspace admin in Slack. |

### Machine-Readable Discovery

- **MCP Discovery:** https://planrelay.com/.well-known/mcp.json
- **Agent Capability Card:** https://planrelay.com/.well-known/agent.json
- **LLM Guide:** https://planrelay.com/llms.txt
- **Official Registry Manifest:** [server.json](server.json)

---

## Pricing (Dual-Rail: Polar + x402)

| Plan | Price | Limits |
| :--- | :--- | :--- |
| **Free** | **$0 / month** | 1 user seat · 50 Slack executions/month (resets 1st UTC) · GitHub exact-SHA `planrelay/sign-off` |
| **Team** | **$50 / month** | Up to 10 people (PMs + designers + engineers) · Unlimited Slack executions · Workspace Product Memory |
| **Scale** | **$100 / month** | Up to 25 people · Unlimited Slack executions · Multi-repo GitHub App routing · Priority queues |
| **x402 Agent Credits** *(optional)* | **$0.02/run** or **$1 / 100 · $5 / 600 runs** | Autonomous USDC on Base settlement on HTTP `402` or `POST /billing/x402/topup` (when enabled) |

---

## Security & Trust Boundaries

- **Per-workspace isolation:** Every workspace runs in its own isolated Cloudflare Durable Object SQLite database.
- **Encrypted credentials:** Slack bot tokens are encrypted at rest with AES-256-GCM; MCP bearer tokens are stored only as SHA-256 hashes.
- **Ephemeral screenshots:** Staging UI screenshots in Cloudflare R2 expire automatically after 24 hours.
- **Humans stay in control:** Clicking **Accept** in Slack sets an advisory `planrelay/sign-off` commit status on that exact SHA — **PlanRelay never auto-merges PRs or deploys code**.

---

## Links & Support

- **Website:** https://planrelay.com
- **GitHub App:** https://github.com/apps/planrelay
- **Support & Setup Help:** https://planrelay.com/support · support@planrelay.com
- **Privacy Policy:** https://planrelay.com/privacy
- **Terms of Service:** https://planrelay.com/terms