How-to guide
How to add an MCP server to Claude Code
Claude Code adds remote MCP servers with one terminal command. This guide covers the transport flag, scopes, OAuth sign-in and cleanup.
Last checked November 2026
Add a remote MCP server
-
Run the add command
In a terminal, from your project folder:
claude mcp add --transport http connectchats https://api.connectchats.com/mcp -
Pick a scope (optional)
- local (default): only you, only this project. Stored in ~/.claude.json.
- project: everyone on the repo, through .mcp.json. Claude Code asks each person to approve it.
- user: you, in every project. Also stored in ~/.claude.json.
claude mcp add --transport http --scope user connectchats https://api.connectchats.com/mcp -
Sign in with OAuth
Start claude, type /mcp, select connectchats and choose to authenticate. Your browser opens the sign-in page, and Claude Code stores the token when you finish. From the shell, claude mcp login connectchats does the same.
-
Check the connection
claude mcp list shows every server and whether it is connected.
claude mcp list
Use it in a session
-
Ask in plain words
- "Summarize the unread messages in my WhatsApp work group."
- "Search my chats for the staging URL Priya sent."
- Claude Code asks before it runs a tool, unless you allowed that tool.
Remove or reset a server
-
Sign out first
Removing a server does not revoke its token, so log out first.
claude mcp logout connectchats -
Remove it
claude mcp remove connectchats
Example: your WhatsApp chats in Claude Code
-
Create a ConnectChats account
Open https://connectchats.com/app and sign in with a passkey. There is no email or password to remember.
-
Link WhatsApp
Choose Link a chat app, then WhatsApp. Scan the QR code from WhatsApp on your phone (Linked devices, then Link a device), or switch to Use a pairing code.
-
Choose the chats your AI can read
Chats appear on the Chats page as they import. Turn on only the ones you want your AI app to see.
-
Add the server
Run the add command above with https://api.connectchats.com/mcp, then /mcp to sign in.
Tips
- The SSE transport is deprecated. Use --transport http for remote servers.
- For a server that takes an API key instead of OAuth, add a header with -H "Authorization: Bearer <token>".
- If a project server does not load, check that you approved it when Claude Code asked.
Questions
What is the command to add an MCP server to Claude Code?
claude mcp add --transport http <name> <url> for a remote server. A local server that runs as a process uses claude mcp add <name> -- <command> [args].
Where does Claude Code store MCP servers?
Local and user scopes are stored in ~/.claude.json. Project scope is stored in .mcp.json at the root of your repo, so it can be committed.
How do I sign in to an MCP server in Claude Code?
Type /mcp in a session and pick the server, or run claude mcp login <name>. Both open your browser for the OAuth sign-in.
Can I use ConnectChats in Claude Code and in claude.ai at the same time?
Yes. Each app signs in to your ConnectChats account separately, and both see the same chats you turned on.
Related pages
More guides
- Add a custom connector to Claude Customize, Connectors, Add custom connector. Every plan can do it; Free gets one.
- Add an MCP server to Cursor The mcp.json entry for a remote server, OAuth sign-in and where to switch it on.
- Add an MCP server to Codex codex mcp add with --url, the config.toml block and codex mcp login.
Connect your chats
More on ConnectChats
Stop switching apps. Ask your AI instead.
Add ConnectChats in one click. Your first two chat apps are free.
Get started free