Skip to content

[FEATURE] Add claude mcp auth <name> command for on-demand MCP authentication #23512

Description

@travis-hoover-glean

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

There is currently no way to trigger MCP server authentication from the command line. The only way to authenticate an MCP server that requires OAuth is to start a session and initiate the flow via /mcp.

Proposed Solution

Add an auth (or login) subcommand to claude mcp:

# Trigger the OAuth flow for a specific MCP server
claude mcp auth <server-name>

Alternative Solutions

No response

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

# Add and authenticate an MCP server in one scripted flow
claude mcp add my-server --transport http --url https://example.com/mcp
claude mcp auth my-server
# Browser opens, user completes OAuth, token is stored
# Server is now ready to use in the next session

Additional Context

Other AI coding tools have already implemented this pattern:

  • Codex: codex mcp login <name> — triggers OAuth authentication for a named MCP server
  • Cursor: cursor mcp login <name> — same concept, authenticate an MCP server by name from the CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions