[PR #4872] [MERGED] feat(cli): add mcp client configs from cli #22531

Closed
opened 2026-04-15 21:06:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4872
Author: @Kinfe123
Created: 9/24/2025
Status: Merged
Merged: 9/30/2025
Merged by: @himself65

Base: canaryHead: feat/cli-init-mcp


📝 Commits (6)

📊 Changes

5 files changed (+278 additions, -0 deletions)

View changed files

📝 docs/content/docs/introduction.mdx (+31 -0)
📝 packages/cli/package.json (+1 -0)
packages/cli/src/commands/mcp.ts (+241 -0)
📝 packages/cli/src/index.ts (+2 -0)
📝 pnpm-lock.yaml (+3 -0)

📄 Description

Summary by cubic

Adds a new mcp CLI command to quickly install and configure the Better Auth MCP server for Cursor, Claude Code, Open Code, or manually. Updates docs to show one-command setup options.

  • New Features

    • New cli mcp command with options: --cursor, --claude-code, --open-code, --manual.
    • Cursor: opens a deep link with a base64-encoded config (macOS, Windows, Linux).
    • Claude Code: prints the claude mcp add command.
    • Open Code: outputs an opencode.json config block.
    • Manual: outputs a minimal mcp.json snippet.
    • Docs updated (introduction) with CLI tabs for quick setup.
  • Dependencies

    • Added @better-auth/utils 0.3.0 for base64 encoding.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4872 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 9/24/2025 **Status:** ✅ Merged **Merged:** 9/30/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/cli-init-mcp` --- ### 📝 Commits (6) - [`8dcca09`](https://github.com/better-auth/better-auth/commit/8dcca09ef67cc1617fdbbc07f29385b6cce8141d) feat: add mcp client from cli - [`a115f42`](https://github.com/better-auth/better-auth/commit/a115f42bf3c76ea26c8ae90fd4c794b8efa509b2) lint - [`1921abd`](https://github.com/better-auth/better-auth/commit/1921abd99c9e7026d31821a1e2d16bf8779087ae) docs - [`ad2d221`](https://github.com/better-auth/better-auth/commit/ad2d22136948906068b917b889760d0ce3ff754a) add manual exec - [`faf460d`](https://github.com/better-auth/better-auth/commit/faf460da7502799437a832dfdcf7beb6db04820f) lint - [`0150e00`](https://github.com/better-auth/better-auth/commit/0150e00afc3804e542a28b108d9223d48f73db5e) fix: adding type ### 📊 Changes **5 files changed** (+278 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/introduction.mdx` (+31 -0) 📝 `packages/cli/package.json` (+1 -0) ➕ `packages/cli/src/commands/mcp.ts` (+241 -0) 📝 `packages/cli/src/index.ts` (+2 -0) 📝 `pnpm-lock.yaml` (+3 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds a new mcp CLI command to quickly install and configure the Better Auth MCP server for Cursor, Claude Code, Open Code, or manually. Updates docs to show one-command setup options. - **New Features** - New cli mcp command with options: --cursor, --claude-code, --open-code, --manual. - Cursor: opens a deep link with a base64-encoded config (macOS, Windows, Linux). - Claude Code: prints the claude mcp add command. - Open Code: outputs an opencode.json config block. - Manual: outputs a minimal mcp.json snippet. - Docs updated (introduction) with CLI tabs for quick setup. - **Dependencies** - Added @better-auth/utils 0.3.0 for base64 encoding. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:06:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#22531