Connect a client
Add the LoginWith MCP server to Claude Code or any MCP client.
Claude Code
claude mcp add --transport http loginwith https://mcp.loginwith.dev/mcp
Then run /mcp in Claude Code and authenticate loginwith. A browser opens on
the LoginWith console sign-in.
Other clients
Any client that speaks Streamable HTTP and the MCP authorization spec works the same way: give it the URL and nothing else.
https://mcp.loginwith.dev/mcp
No client id, no secret, no token to paste — the client discovers the authorization server and registers itself. See Authentication.
Local server (stdio)
@loginwith/mcp runs the same tools as a local stdio server (bin:
loginwith-mcp), presenting an access token you give it.
| Variable | What |
|---|---|
LGW_API | Your API origin, e.g. https://acme.loginwith.dev. Required |
LGW_ACCESS_TOKEN | A user access token. Every tool presents it as-is |
claude mcp add loginwith \
--env LGW_API=https://acme.loginwith.dev \
--env LGW_ACCESS_TOKEN=<a user access token> \
-- npx -y @loginwith/mcp
Logs go to stderr; stdout is the protocol channel.