Developer Setup: MCP Servers
What is an MCP server. How to add MCP servers to Claude Code and Codex. Explains where the settings go, how to check, change or remove an MCP server.
An MCP server is a small connector that gives an AI agent an ability it doesn't have on its own. AI agents are powerful but limited to training data and capabilities built into the "harness" (the program, such as Claude Code or Codex, that connects the AI model to your Mac and carries out its requests to read files and run commands). MCP servers add capabilities from specialized software and external services, such as better ability to fetch web pages or work with documents in proprietary formats. See our article for more information about MCP Servers on Mac.
The "Set Up Your Mac" apps can add and configure MCP servers, in addition to installing Claude Code and Codex. This page explains what the app adds, where the settings go, and how to check, change, or remove a server afterward. It is one topic in "Set Up Your Mac", my guide to setting up a Mac for software development.
MCP servers in the "Set Up Your Mac" apps
After the "Set Up Your Mac" app adds Claude Code or Codex, it offers MCP servers.
MCP servers often need extra configuration to enable access to their servers. The "Set Up Your Mac" app will help so you don't need to edit configuration files.
Some servers need a free API key (a password-like code that identifies you to the service). The screen tells you which ones, gives you a box to paste the key into, and links to the page where you can get one. Other servers need no key at first, but ask you to sign in with your own account the first time your agent uses them.
When you choose a server, the app adds it to every AI coding agent it finds on your Mac:
- Claude Code - the app adds the server to
~/.claude.json, so it works in every project. - Codex - the app adds the server to
~/.codex/config.toml, which the Codex command-line tool and the ChatGPT desktop app share.
Before it changes either file, the app saves a copy of the old one with .bak added to its name. The app adds only remote MCP servers, which run on the service's own computers, so nothing extra runs on your Mac and you don't need to install Node.js.
If you use Chat sessions separately in Claude Desktop (not just Claude Code), there's a final step you'll need to complete if you want to use MCP servers from a Chat session. Its Code tab runs its own copy of Claude Code and reads the same settings files, so it already has the servers the app added for Claude Code. But for the Desktop Chat tab, add the same service as a connector in Settings > Connectors.
Web Fetch for AI agents
Every developer will see a screen for Web Fetch MCP servers.
AI agents can fetch web pages on their own, but they often get raw page code, a page that blocks them, or nothing at all. That is a problem when you ask your agent to read documentation, check an error message, or research how to do something. A web-reading MCP server fetches the page for the agent and gives it clean text, the way you see the page in a web browser.
It is an important capability and so far, the AI agents tend to fail often at web fetch, so an MCP server is essential.
Team tools for AI agents
If you answered a preliminary question that you are on a team at work (not a solo developer), you'll see a screen that offers MCP servers for team tools. So far, the app offers MCP servers for Slack and Notion.
The app adds a tool's web address, and you sign in later from inside your agent. Restart the agent first, so it loads the new server. Then sign in:
- Claude Code - type
/mcp, choose the server, and choose Authenticate. Your web browser opens so you can sign in. - Codex - run
codex mcp login <name>in a terminal application, using the server's name from~/.codex/config.toml.
Your company may need to allow AI tools to connect before the sign-in works. If it fails, ask whoever manages your team's account.
Restart the AI harness to load new servers
Your AI agent reads its list of MCP servers when it starts, so it won't see a new server until you restart it. Quit Claude Code (type /exit) and run claude again. Quit Claude Desktop or the ChatGPT desktop app completely (Quit from the app menu, not just closing the window) and open it again. For the Codex command-line tool, quit and run codex again.
Check that an MCP server is working
To check your Claude Code servers, run this command in a terminal application:
$ claude mcp list
Claude Code connects to each server and shows "✔ Connected", "! Needs authentication" (sign in from /mcp), or "✘ Failed to connect". For Codex, run codex mcp list, or type /mcp inside Codex.
To try it, ask your agent to read a web page you know and summarize it. If the agent mentions the MCP server or asks permission to use one of its tools, the server works.
Add an MCP server by hand
You can add any MCP server yourself, without the app. You'll need a name for it (any short word) and its web address, from the server's own instructions.
In Claude Code, claude mcp add adds a server. --scope user makes it work in every project, as the app does:
$ claude mcp add --scope user --transport http <name> <url>
If the server needs an API key, add it as a header:
$ claude mcp add --scope user --transport http <name> <url> --header "Authorization: Bearer YOUR_API_KEY"
In Codex, codex mcp add adds a server:
$ codex mcp add <name> --url <url>
Codex has no option to add an API key this way. For a server that needs a key, open ~/.codex/config.toml in a text editor and add the key under the server's name:
[mcp_servers.<name>]
url = "<url>"
http_headers = { "Authorization" = "Bearer YOUR_API_KEY" }
For everything else about Claude Code and Claude Desktop, including local servers and project settings, see Add MCP Servers to Claude Code and Claude Desktop.
Change or remove an MCP server
The app never changes a server that's already set up. On the MCP screens, a server you already have shows "Already added". So if you need to change a server's API key, remove the server first.
To remove a server from Claude Code:
$ claude mcp remove <name> --scope user
To remove it from Codex:
$ codex mcp remove <name>
Use the server's name as it appears in claude mcp list or codex mcp list. Then add it again, by hand or with the app.
Keep your API keys private
The app saves API keys in ~/.claude.json and ~/.codex/config.toml, and only your Mac account can read those files. Don't copy them into a project folder, commit them to Git, or share them.
Be careful with screenshots, too. claude mcp list and claude mcp get <name> show each server's web address and settings, which can include its API key. Don't paste their output into a chat or an issue.
Find more MCP servers
The app offers a few servers I chose to get you started. There are thousands more. See MCP Server Directories and Lists for where to find them and how to judge whether a server is safe to use. For my picks for coding, see Best MCP Servers for Coding on Mac.
You can also ask your agent to add a server for you. Give it the server's instructions page and ask it to add the server to Claude Code or Codex. Check what it plans to run before you approve it.
Learn more about MCP servers
- MCP Servers on Mac explains what MCP is, how it works, and how to use MCP servers safely.
- Add MCP Servers to Claude Code and Claude Desktop covers every way to add and manage servers in Claude's apps.
- MCP or Skills or CLI explains when an agent is better off with a skill or a command-line tool.
Continue setting up your Mac
Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.