What does a server entry define?
According to the Model Context Protocol, MCP servers can give AI applications access to tools and local resources. A local server is a program that runs on your computer. A remote server is hosted on the internet and can provide tools, prompts, and resources.
Adding a server to a client means configuring how the client connects to it. A stdio entry for the local NEXUS MCP server includes the command to run, optional arguments, and an environment field. The CLI you configure determines where the entry is stored on disk and what the top-level key is called.
Remote connections use a server address. The Model Context Protocol specifies that the server developer or administrator should provide the full URL, including the appropriate protocol and any required path segments. Authentication steps vary by server implementation.
Commands and access for local servers
In the Model Context Protocol example for Claude Desktop, the configuration is stored in a JSON file. This file specifies which servers the app should run and how to connect to them. Under Settings, open the Developer tab and select Edit Config. This opens the existing file or creates it if needed.
The file location depends on the operating system. For example, macOS uses ~/Library/Application Support/Claude/claude_desktop_config.json, and Windows uses %APPDATA%\Claude\claude_desktop_config.json. On Linux, the file is located at ~/.config/Claude/claude_desktop_config.json.
In the example, the top-level mcpServers key contains a server entry named filesystem. Claude Desktop displays the name filesystem. The command field uses npx to start the server, and the args array contains the server package and the directories it can access.
In the same example, -y automatically confirms installation of the server package. The package name is @modelcontextprotocol/server-filesystem. You can change the directory paths in args and add more directories to the array. The server runs with your account permissions. The Model Context Protocol advises granting access only to directories you want the server to read and modify.
The Filesystem Server can read file contents and directory structures, create files and directories, move and rename files, and search by name or content. In the Model Context Protocol example, file system operations require explicit user approval before they run. You can decline an operation request.
After saving the configuration, quit Claude Desktop completely and reopen it. Restarting the app starts the server and loads the updated configuration. Once connected, open Manage connectors from the Connectors menu in the message composer, then select filesystem to see the server's list of tools.
Addresses and authorization for remote servers
In the Model Context Protocol example for remote servers, open Connectors in the settings for Claude Desktop or Claude in your browser. From the Add menu, choose Add custom connector and enter the remote MCP server's URL. Then select Add to begin connecting.
Authentication can use OAuth, an API key, or a username and password. The server's authentication steps may redirect you to an external provider or display a form inside Claude. The flow depends on how the server implements authentication.
Once connected, you can access the server's resources and prompts from the Connectors menu in the message composer. The menu shows the available items and lets you choose which ones to add to the conversation. In the connected server's Connectors settings, you can enable or disable individual tools and configure usage limits and other security settings.
Adding a server in Claude Code
Claude Code shows the following basic command for adding a remote HTTP server.
claude mcp add --transport http <name> <url>
Claude Code recommends HTTP as the transport for connecting to remote MCP servers. If the server provides a token header along with its URL, you can use --header. Local stdio servers run as separate processes on your computer. Claude Code shows the following basic form for adding them.
claude mcp add [options] <name> -- <command> [args...]
Here, -- separates Claude Code's options from the command that starts the server and its arguments. Claude Code passes everything after -- to the server unchanged. You can supply environment variables with --env. Claude Code notes that if the server name comes immediately after --env, it treats the name as another key-value pair and rejects it. Insert another option between them, such as --transport stdio.
A server's setup instructions may be written for a different MCP client. Claude Code says you can still add the server using its URL, startup command, or mcpServers JSON block. A URL points to a remote server, while a startup command launches a local stdio process on your computer.