How to add an MCP server to Claude: Claude.ai, Claude Desktop and Claude Code
By Steven Van ·
Unif API's guide covers custom connectors, claude_desktop_config.json and claude mcp add, with its MCP server as the worked example.
Claude has three ways to add an MCP server, and the right one depends on where Claude is running. Unif API published a step-by-step guide covering Claude.ai, Claude Desktop and Claude Code, using its own MCP server (https://mcp.unifapi.com) as the worked example.
Claude.ai and Claude Desktop: custom connectors
A remote server is added as a custom connector. The steps are:
- Open Settings, then Connectors, and choose Add custom connector.
- Name it and paste the server URL.
- Click Add, then Connect, and sign in through the server's OAuth page in the browser. For Unif API, this means approving a read-only scope.
- Toggle which tools the model may use, then start a new chat. The connector appears in the tools menu under the message box.
Custom connectors are a paid-plan feature. On Team and Enterprise plans, an owner may need to enable them first. Remote connectors go through Anthropic's cloud, so the server must be reachable from the public internet, and a server on localhost will not work. If a connector keeps asking for sign-in, the guide suggests removing it and adding it again.
Claude Desktop: local servers
Local servers are declared in claude_desktop_config.json, which Settings, then Developer, then Edit Config opens. Each entry under mcpServers is a command Claude runs, such as npx. Claude Desktop must be fully quit and reopened after saving. The guide lists a missing npx on the PATH and trailing commas in the JSON as common causes when nothing shows up. A remote URL cannot go in this file directly, though a bridge such as mcp-remote can be used as the command.
Claude Code: claude mcp add
Claude Code uses one command for remote and local servers. For Unif API:
claude mcp add --transport http unifapi https://mcp.unifapi.com
The default is local scope (you, current project only). --scope user makes the server available in every project, and --scope project writes a shareable .mcp.json in the project root. Claude Code asks for approval before first using a project-scoped server. Typing /mcp lists each server's status and offers Authenticate for OAuth servers, and the same dialog works in the VS Code extension. The guide also covers claude mcp list, get and remove, stdio servers after --, and static tokens via --header. Unif API accepts a workspace API key as a bearer token, but the guide recommends OAuth.
Checking that the tools load
Unif API exposes three tools: list_operations, get_operation and call_api. In Claude Code they appear under the mcp__unifapi__ prefix. The guide suggests a test prompt that needs a tool, such as "List the UnifAPI operations for Reddit."
