Connecting MCP servers: how to plug tools into an AI app
Three ways to connect an MCP server to an AI app, step by step. Also covers the difference between remote and local servers, how to read the config file, troubleshooting, and a safety check.
한국어English

ON THIS PAGE
- 01A one-line review
- 02Two things to decide before connecting
- 03The same connection flow everywhere
- 04Method 1: adding a remote server in the chat app
- 05Method 2: adding a local server to the desktop app
- 06Method 3: registering with a command in Claude Code
- 07When the connection does not work
- 08Safety checklist before connecting
- 09Summary
- 10Read next
- 11References
Based on: the official Model Context Protocol and Claude Code documentation, checked in September 2026.
Connecting an MCP server means plugging a new tool into the USB-C port of an AI app. There are three main ways to connect, depending on the app you use and the kind of server: entering an address in the settings screen of a chat app, writing the server into the config file of a desktop app, and registering it with one command in Claude Code.
By the end of this post, you will be able to do the following.
- Choose the connection method that fits your situation.
- Write the config file without mistakes.
- Find where to look when the connection does not work.
- Know what to check before you connect.
The idea behind MCP is in What is MCP. This post covers how to actually plug it in.
A one-line review
MCP is a shared agreement that lets an AI app (the host) talk to a program that provides tools (an MCP server). The official MCP site compares it to a USB-C port. The AI app has a USB-C port, and an MCP server is a device you plug into that port. Because the standard is the same, a device from any company works when you plug it in.
| Analogy | In reality |
|---|---|
| USB-C port | The MCP connection feature of the AI app |
| A device you plug in | An MCP server (file tools, tools for work services, and so on) |
| Plugging in the device | Writing the server address or how to run it into the settings |
| The permission window that appears the first time you plug in | Approval and sign-in before a tool is used |
Two things to decide before connecting
1. Where the server runs: remote or local
| Local server | Remote server | |
|---|---|---|
| Where it runs | Inside your computer | On the service's side, on the internet |
| USB-C analogy | A device plugged straight into the port | A device connected wirelessly |
| How to connect | Write the run command into the settings | Enter the server address (URL) |
| What you need | Often a runtime such as Node.js (a base program that runs the server program) | An account with that service and a sign-in |
| Good for | Working with your files and your programs (for example a 3D program) | Working with online services (documents, calendars, work tools) |
A remote server does not need to be installed on each device. It works from any app as long as you are online. A local server reaches your computer's files and programs directly, but it runs with your account's permissions, so you need to be more careful.
2. The app you plug it into
| App you use | Usual method |
|---|---|
| Chat in Claude on the web or desktop | Add the remote server address from the Connectors menu in the settings |
| Claude desktop app + local server | Write the server into the config file (claude_desktop_config.json) |
| Claude Code (terminal) | The claude mcp add command |
Other AI apps support MCP too, but the menu names differ from app to app. The menu names in this post follow the official Model Context Protocol and Claude Code documentation, and they may change when the apps are updated.
The same connection flow everywhere
There are three methods, but the flow is the same four steps.
- Choose a server you can trust: check who makes and runs it. It is like not plugging a device of unknown origin into your port.
- Set it up: enter the address, or write how to run it in a config file or a command.
- Restart or sign in: let the app load the new server.
- Approve as you use it: read the confirmation window that appears when the AI tries to use a tool, and allow it.
Method 1: adding a remote server in the chat app
These are the steps for connecting a remote server with Claude's "Custom Connectors."
- Open Settings. In the browser, it is profile icon ‣ Settings. In the desktop app, it is the menu icon at the upper left ‣ File ‣ Settings (or
Ctrl+,). - Click Connectors on the left.
- Choose Add ‣ Add custom connector at the upper right.
- Enter the server address (URL). The company that made the server or your administrator gives you this address. Enter the full address starting with
https://. - If a sign-in screen appears, sign in with your account for that service and grant the permissions. The method differs by server: OAuth (a way to sign in safely with an account from another service), an API key, and so on.
- After connecting, click that server in the Connectors settings to turn each tool on or off. Turn off tools you will not use.
Check your plan: whether you can use custom connectors may depend on your plan or on company and team account policies. Check your plan in Anthropic's official help pages.
Method 2: adding a local server to the desktop app
This is explained with the example of adding a filesystem server (a tool that reads, creates, and moves files in the folders you choose) to Claude Desktop.
Preparation: many local servers run on Node.js. Type node --version in a terminal to check that a version appears. If it does not, install the LTS (the long-term support stable release) from nodejs.org.
Opening the config file: this is where many people get confused. Choose the Settings… item in the app menu, not the settings inside the chat window.
- Mac: Claude ‣ Settings… in the menu bar at the very top of the screen
- Windows: the menu icon at the upper left of the window ‣ File ‣ Settings… (shortcut
Ctrl+,)
The window that opens is the settings window of the desktop app, which is different from the account settings (profile menu) in the browser or chat window. Find the Developer tab on the left of this window and click Edit Config to open the config file (it is created if it does not exist). The file is here.
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA% is a shorthand on Windows for your account's app settings folder. Type %APPDATA% as is into the address bar of File Explorer and press Enter to open that folder.
Writing the server: on Windows, write it like this.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\username\\Desktop",
"C:\\Users\\username\\Downloads"
]
}
}
}
| Field | Meaning |
|---|---|
mcpServers | "The list of servers to connect starts here" |
"filesystem" | The nickname shown in the app. You can choose it yourself |
"command": "npx" | Run the server with npx (a tool installed with Node.js that downloads a package and runs it right away) |
"-y" | Answers "yes" automatically to installing the server package |
@modelcontextprotocol/server-filesystem | The name of the server package to run |
| The remaining paths | The folders this server can touch |
Write backslashes (\) in Windows paths twice. A path copied from File Explorer has single backslashes, like C:\Users\username\Desktop, but inside JSON (the format the settings are written in), a single backslash is read as a signal that "the next character has a special meaning." So to write a real backslash, you have to write it twice, like C:\\Users\\username\\Desktop. Mac paths (/Users/username/Desktop) use forward slashes, so you can write them as they are.
Replace username with the user name on your computer. Only list folders that Claude may read and change. The server runs with your account's permissions, so any file operation you can do by hand, the server can do too.
Restarting: after saving, quit Claude Desktop completely and start it again. If you only close the window, the app may keep running in the background. After restarting, open the + button at the lower left of the input box ‣ Connectors ‣ Manage connectors and choose "filesystem" to see the list of connected tools. This server asks for approval before each file operation.
Method 3: registering with a command in Claude Code
Claude Code, which works in the terminal, uses commands instead of a settings screen. If you are new to Claude Code, read Claude Code for beginners first.
Remote server (HTTP, the recommended method):
claude mcp add --transport http notion https://mcp.notion.com/mcp
This means "connect the remote server at this address over HTTP, under the name notion." An older method called SSE is planned to be removed, so use HTTP when you can.
Local server: adding the same filesystem server as in method 2 to Claude Code takes one line.
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem C:\Users\username\Desktop
On a Mac, change only the last path, to something like /Users/username/Desktop. This is a command line, not JSON, so in PowerShell and CMD, a single backslash works. If you use Git Bash, the backslashes may disappear, so wrap the path in quotes ("C:\Users\username\Desktop") or write it with forward slashes, like C:/Users/username/Desktop.
Do not leave out the -- (two hyphens) here. What comes before -- are options that Claude Code reads (name, scope, and so on). What comes after is the command that runs the server, passed along as is, untouched. The npx -y ... after -- is the same as the command and args of the method 2 config file written on one line.
Servers that need an API key: pass an environment variable (a setting value handed quietly to a program) with --env NAME=value.
claude mcp add --env API_KEY=your-key --transport stdio server-name -- npx -y server-package
There is one thing to watch for. If you write the server name right after --env, the name is wrongly read as part of the environment variable too, so put another option such as --transport stdio in between, as above. stdio is a connection method that exchanges text directly with a server run on your computer. Where the key you enter this way is stored is covered in the "Safety checklist before connecting" section below.
Choosing where to save it (scope):
| Scope | Where it applies | Shared | Where it is saved |
|---|---|---|---|
| local (default) | Only the current project | Only you | ~/.claude.json |
| project | The current project | Shared with the team | .mcp.json in the project folder |
| user | All your projects | Only you | ~/.claude.json |
local is a device plugged in for one folder only, project is a device left plugged into a folder the team shares, and user is a device you carry around in your bag. Set the scope by adding something like --scope user.
Servers in the shared project scope ask for approval before they are used. However, they ask only in interactive sessions. In automated runs such as claude -p, they are loaded without asking. So before using a project you received for automated runs, open .mcp.json and read it yourself. Clear earlier approval choices with claude mcp reset-project-choices.
Management commands:
| Command | What it does |
|---|---|
claude mcp list | Shows registered servers and their status |
claude mcp get name | Detailed information about one server |
claude mcp remove name | Removes a server |
/mcp (inside a session) | Check status, sign in, turn off for a while |
When the connection does not work
Where to look first, by symptom.
| Symptom | What to check first |
|---|---|
| The server does not appear in the list | Whether you quit and restarted the app completely, and whether the commas and brackets in the config file are right |
| It cannot find the folder ① | Whether the path is an absolute path written in full from the start, like C:\... or /Users/... |
| It cannot find the folder ② (Windows) | Whether the paths in the JSON use double backslashes (\\) |
| I do not know the cause | Open the log files (below) |
| I do not know whether the server itself runs | Type the command from the settings directly into a terminal and see if it gives an error |
Log locations:
- macOS:
~/Library/Logs/Claude - Windows:
%APPDATA%\Claude\logs
In this folder, mcp.log holds general connection records and failures, and mcp-server-SERVERNAME.log holds the messages that server left.
If even one comma is missing, the whole config file is not read. Another common mistake is putting a comma after the last item of a list, which JSON does not allow.
Safety checklist before connecting
Plugging just any device into a port because the standard matches is risky. Check the following before you connect.
- Check who made it. Make sure the server is genuine, and use only trusted sources.
- Read the command that will run. A local server is a program running on your computer, so from an untrusted source there is a risk of code execution, data leaks, and data loss.
- Give narrow permissions. Read the permission list on the sign-in screen, and give folder access only where it is needed.
- Check whether the server reads outside text. Servers that fetch outside content can be exposed to prompt injection (an attack that uses instructions hidden in text to make the AI do the wrong thing).
- Check where you wrote the API key. Keys entered with
--envand theenvfield of a config file are saved in a file. In particular, do not write keys as is in the project scope shared with the team (.mcp.json). What an API key is is explained in What is an API. - If you use it for automated runs, read
.mcp.jsonfirst. As the scope section above showed, automated runs do not ask for approval. - Remove connections you do not use. Clean up unused connectors regularly.
Summary
| Item | Summary |
|---|---|
| Analogy | Plugging a tool (an MCP server) into the USB-C port of an AI app |
| Remote vs. local | Whether it runs on the internet service's side or on your computer |
| Chat app | Settings ‣ Connectors ‣ Add custom connector, enter the address, sign in |
| Desktop local server | App menu (on Windows, menu icon ‣ File) ‣ Settings… ‣ Developer ‣ Edit Config, double backslashes in JSON paths, restart the app completely |
| Claude Code | claude mcp add name -- run command, keys with --env, scopes local, project, user |
| When it does not work | The "When the connection does not work" table and the logs |
| Must do | Trusted servers, narrow permissions, no keys in shared files |
A concrete example of connecting a 3D program to AI continues in Connecting Blender and AI.
Read next
- What is MCP: a USB-C-like standard for plugging tools into AI
- Claude Code for beginners: from install to first chat, an AI coding helper that works in the terminal
- Connecting Blender and AI: getting 3D work done with MCP and scripts
- GUI vs. CLI: what is the difference between clicking and typing?
- What is an API: requests, responses, and API keys made easy
References
- Model Context Protocol, Connect to local MCP servers: https://modelcontextprotocol.io/docs/develop/connect-local-servers
- Model Context Protocol, Connect to remote MCP servers: https://modelcontextprotocol.io/docs/develop/connect-remote-servers
- Model Context Protocol, Security Best Practices: https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices
- Claude Code Docs, Connect Claude Code to tools via MCP: https://code.claude.com/docs/en/mcp





