How Do I Connect Claude to an MCP Server?
Claude supports MCP (Model Context Protocol) natively. That means you can connect it to external tools and data sources in a few clicks.
Quick answer
Claude connects to an MCP server natively, in three places. In Claude.ai, connect it from the Connectors Directory in one click, or add a custom connector with the server URL (for Hjarni, https://hjarni.com/mcp). Claude Desktop uses the same flow. In Claude Code, run claude mcp add with the server URL, then /mcp to complete the OAuth sign-in. Once connected, Claude can read and write your own notes and tools mid-conversation.
What you need
- A Claude account (Free, Pro, Max, Team, or Enterprise — connectors are in beta on all plans)
- The MCP server you want to connect. Either listed in the Claude Connectors Directory (one-click connect, like Hjarni), or available at a URL like
https://hjarni.com/mcp(custom connector)
Option 1: Claude.ai (browser)
Claude.ai supports remote MCP servers through Connectors. Available on Free (1 connector), Pro, Max, Team, and Enterprise plans.
Hjarni is in the Claude Connectors Directory. Open Hjarni on claude.ai, click Connect, sign in. That's it on an individual plan. The steps below are for servers that aren't in the directory. In a managed Team or Enterprise workspace, an admin may need to allow the connector before you can add it.
Individual plans (Free, Pro, Max)
- Go to claude.ai and open Customize > Connectors
- Click + then Add custom connector
- Enter the MCP server URL (e.g.
https://hjarni.com/mcp) - Optionally click Advanced settings to enter OAuth credentials
- Click Add to complete configuration
- In a conversation, click the + button and select Connectors to enable it
Team and Enterprise plans
On Team and Enterprise plans, only workspace owners can add custom connectors. Members then connect individually with their own account. If your workspace restricts connectors, the same permission covers directory listings, so an admin allows Hjarni once and everyone connects themselves after that.
- Owner: Go to Organization settings > Connectors, click Add, hover over Custom, select Web, and enter the server URL
- Member: Go to Customize > Connectors, find the custom connector, and click Connect to authenticate with your own account
Option 2: Claude Desktop
Claude Desktop supports both remote MCP servers (with OAuth) and local servers (via a config file).
Remote servers
For remote servers, the setup is the same as Claude.ai: if the server is in the Connectors Directory (Hjarni is, open the listing and click Connect), use that. Otherwise open Customize > Connectors, add a custom connector with the server URL, and complete the OAuth flow.
Local servers
For local MCP servers, Claude Desktop uses a JSON config file. Open Settings > Developer and click Edit Config to add your server:
{
"mcpServers": {
"your-server": {
"command": "npx",
"args": ["-y", "your-mcp-server"]
}
}
}
Restart Claude Desktop after saving the config. The server's tools will appear in your next conversation.
Option 3: Claude Code (CLI)
Claude Code adds MCP servers from the command line, no GUI required. To add a remote MCP server to Claude Code, run this in your project directory:
claude mcp add --transport http your-server https://example.com/mcp
Claude Code will handle the OAuth flow in your browser. By default, the server is scoped to the current project only. To make it available across all your projects, add --scope user:
claude mcp add --transport http --scope user your-server https://example.com/mcp
Add Hjarni to Claude Code
Using Hjarni as the knowledge base, the command is:
claude mcp add --transport http hjarni https://hjarni.com/mcp
Confirm the server is registered with claude mcp list. Then start Claude Code and run /mcp to complete the OAuth sign-in and check the connection status. To remove the server later, run claude mcp remove hjarni.
Prefer a step-by-step walkthrough with screenshots? See the Hjarni for Claude Code guide, or wire up session auto-capture with Claude Code hooks so every session writes itself back to your notes.
Verifying the connection
Start a new conversation and ask Claude to use one of the server's tools. For example, if you connected Hjarni:
"What notes do I have in Hjarni?"
Claude should respond with your notes or confirm it has access. If you see tool calls in the response, the connection is working.
Troubleshooting
Claude says it cannot connect
Check that the MCP server URL is correct and that you completed the OAuth flow. Try disconnecting and reconnecting the server.
Claude does not see your data
Make sure you approved the correct permissions during OAuth. Some servers require specific scopes.
The connectors option does not appear
Custom connectors are available in beta on Free, Pro, Max, Team, and Enterprise plans. Free plans are limited to one connector. Check your plan at claude.ai/settings.
Try it with Hjarni
Hjarni is a knowledge base with a built-in MCP server. Connect it to Claude and your AI can search, read, and create notes across every conversation. Stop re-explaining your context.
Hjarni is in the Claude Connectors Directory: click Connect, sign in, done. Or add it manually: the MCP server URL is https://hjarni.com/mcp. Two minutes either way.
Give your AI notes it can actually read. Free.
Hjarni is a knowledge base with a built-in MCP server. Create a free account and your endpoint is ready in about a minute.
Give your AI notes it can actually read. Free.