# claude mcp login Command

> It signs you in to one MCP server from the shell.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude mcp login, claude mcp logout, MCP sign-in from the shell

## Think of it like

It is like you show your card at the door, and then they let you in.

## Definition

claude mcp login signs you in to one MCP server from the shell. You do not need to open /mcp in a session. It works for servers on the web and for claude.ai connectors. Over SSH, add --no-browser to print the sign-in link and not open a browser. claude mcp logout clears the sign-in it kept for that server.

## Example

Jack works on a remote machine over SSH. He runs claude mcp login with --no-browser, opens the link on his laptop, and pastes the result back.

## Example code

```bash
claude mcp login sentry --no-browser
```

Sign in to a server over SSH.

## Why it matters

A server that needs you to sign in can be set up by a script or over SSH too.

## Common mistake

Running it for a server that runs on your computer. Those do not sign in this way. Only web servers and connectors do.

## Three principles

- **One server.** By name.
- **--no-browser.** For SSH.
- **logout.** Clears it.

## Related terms

- [MCP Authorization](https://learn.benibix.com/term/ai/mcp-authorization)
- [/mcp Command](https://learn.benibix.com/term/ai/mcp-command)
- [claude mcp list Command](https://learn.benibix.com/term/ai/claude-mcp-list-command)
- [OAuth 2.0](https://learn.benibix.com/term/development/oauth)

## Taught in

- [The claude mcp Commands](https://learn.benibix.com/learn/ai-claude-code-commands/claude-mcp-commands): Claude Code Commands, 12/17

![The MCP client gets a token from the authorization server, then sends it with each request to the MCP server.](https://learn.benibix.com/diagrams/mcp-authorization.svg)

---

Source: https://learn.benibix.com/term/ai/claude-mcp-login-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
