Sign in to a remote MCP server in Claude Code: /mcp and claude mcp login
Originally published at https://aicoding-guide.com . Hosted MCP servers like Sentry, Linear and Notion are not usable the moment you register their URL. They need a browser sign-in first, and claude mcp list shows them as ! Needs authentication until you do it. In short: add the server with claude mcp add --transport http <name> <url> , then either run /mcp in a session and choose Authenticate on…
To sign in to a remote MCP server in Claude Code, first add the server using the command `claude mcp add --transport http name url`. This will mark the server as needing authentication. Start a session and run `/mcp`, selecting the server from the list and choosing "Authenticate". This will open a browser sign-in page where you approve the connection. After successful authentication, the server status changes to "connected".
If a token expires or the browser never opens, you can sign in from the command line using `claude mcp login <name>`. This will clear stored credentials and force the URL prompt even when a browser is detected. If a server does not support Dynamic Client Registration, you will receive an error message indicating that the auth server does not support dynamic client registration. In this case, you must register an OAuth app through the service's developer portal and pass the credentials yourself.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.