diff --git a/README.md b/README.md index b750c80..027ae14 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,33 @@ Once connected, `beeper accounts add` walks each chat-network bridge through its own login — QR, code, OAuth, cookie, whatever the bridge requires — so WhatsApp, Telegram, Discord, iMessage, and the rest show up under `accounts list`. + +## MCP (agents) + +Beeper Desktop and Beeper Server both serve an MCP endpoint when enabled. +Confirm with `beeper api get /v1/info` — look for `"mcp_enabled": true`. The +default URL is: + +```text +http://127.0.0.1:23373/v0/mcp +``` + +On Beeper Server (headless), authenticate with a bearer token. The browser +OAuth approval UI needs Beeper Desktop; on Server, pass +`Authorization: Bearer …` instead. Use the token the CLI stores for your +target under `~/.beeper/targets/`, or set `BEEPER_ACCESS_TOKEN`. + +Example (Claude Code): + +```sh +claude mcp add beeper http://127.0.0.1:23373/v0/mcp -t http \ + -H "Authorization: Bearer " +``` + +A `beeper mcp` helper that performs this wiring is tracked with the docs/agent +CLI work in [#10](https://github.com/beeper/cli/pull/10). Until then, point +your MCP client at the URL above with the bearer header. + ## Documentation | Topic | Page | Commands | diff --git a/packages/cli/README.md b/packages/cli/README.md index 9545291..8b7a23b 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -204,6 +204,33 @@ Once connected, `beeper accounts add` walks each chat-network bridge through its own login — QR, code, OAuth, cookie, whatever the bridge requires — so WhatsApp, Telegram, Discord, iMessage, and the rest show up under `accounts list`. + +## MCP (agents) + +Beeper Desktop and Beeper Server both serve an MCP endpoint when enabled. +Confirm with `beeper api get /v1/info` — look for `"mcp_enabled": true`. The +default URL is: + +```text +http://127.0.0.1:23373/v0/mcp +``` + +On Beeper Server (headless), authenticate with a bearer token. The browser +OAuth approval UI needs Beeper Desktop; on Server, pass +`Authorization: Bearer …` instead. Use the token the CLI stores for your +target under `~/.beeper/targets/`, or set `BEEPER_ACCESS_TOKEN`. + +Example (Claude Code): + +```sh +claude mcp add beeper http://127.0.0.1:23373/v0/mcp -t http \ + -H "Authorization: Bearer " +``` + +A `beeper mcp` helper that performs this wiring is tracked with the docs/agent +CLI work in [#10](https://github.com/beeper/cli/pull/10). Until then, point +your MCP client at the URL above with the bearer header. + ## Documentation | Topic | Page | Commands | diff --git a/packages/cli/docs/setup.md b/packages/cli/docs/setup.md index dbcd2c5..d8d2289 100644 --- a/packages/cli/docs/setup.md +++ b/packages/cli/docs/setup.md @@ -66,6 +66,17 @@ beeper verify recovery-key -t server --key "$BEEPER_RECOVERY_KEY" --json If the email has no Beeper account yet, add `--username --yes` to `auth email response` to create one and accept the terms. +### MCP endpoint (bearer) + +When `GET /v1/info` reports `mcp_enabled: true`, Beeper Server serves MCP at +`/v0/mcp` on the selected target's actual base URL (shown by `beeper auth status`). +Managed Server targets may use a port other than Desktop's default 23373. Pass the target access +token as `Authorization: Bearer …` (`~/.beeper/targets/` or +`BEEPER_ACCESS_TOKEN`). Browser OAuth for MCP clients needs Desktop; on Server +use the bearer header. See the [MCP (agents)](../../../README.md#mcp-agents) +section in the repo README for a `claude mcp add` example. A `beeper mcp` +helper is tracked in [#10](https://github.com/beeper/cli/pull/10). + ## Examples ```sh diff --git a/packages/cli/scripts/generate-readme.ts b/packages/cli/scripts/generate-readme.ts index 6e61670..e72a4cc 100644 --- a/packages/cli/scripts/generate-readme.ts +++ b/packages/cli/scripts/generate-readme.ts @@ -239,6 +239,30 @@ Once connected, \`beeper accounts add\` walks each chat-network bridge through its own login — QR, code, OAuth, cookie, whatever the bridge requires — so WhatsApp, Telegram, Discord, iMessage, and the rest show up under \`accounts list\`. + +## MCP (agents) + +Beeper Desktop and Beeper Server both serve an MCP endpoint when enabled. +Confirm with \`beeper api get /v1/info\` — look for \`"mcp_enabled": true\`. Use \`/v0/mcp\` on the selected target's actual base URL (shown by +\`beeper auth status\`). Desktop normally uses \`http://127.0.0.1:23373\`; +managed Server targets may use a different port. + +On Beeper Server (headless), authenticate with a bearer token. The browser +OAuth approval UI needs Beeper Desktop; on Server, pass +\`Authorization: Bearer …\` instead. Use the token the CLI stores for your +target under \`~/.beeper/targets/\`, or set \`BEEPER_ACCESS_TOKEN\`. + +Example (Claude Code), substituting the base URL for your selected target: + +\`\`\`sh +claude mcp add beeper /v0/mcp -t http \\ + -H "Authorization: Bearer " +\`\`\` + +A \`beeper mcp\` helper that performs this wiring is tracked with the docs/agent +CLI work in [#10](https://github.com/beeper/cli/pull/10). Until then, point +your MCP client at the URL above with the bearer header. + ## Documentation | Topic | Page | Commands |