sodcalculator

10 Tech How-To

Connect a Mac App to Claude Code via MCP Server

Guide 10-32325 · Updated · Step by step

This guide walks you through connecting a Mac app to Claude Code using a Model Context Protocol (MCP) server. This setup lets Claude Code read from and write to your app’s data, enabling tasks like querying notes, creating tasks, or pulling project files—all from your terminal. You’ll need Claude Code installed and a Mac app that supports MCP (or a custom server you can run).

What You’ll Need

  • macOS 12 or later
  • Claude Code installed (via npm or native installer)
  • A Mac app that exposes an MCP server (e.g., Obsidian with the MCP plugin, or a custom server you can run locally)
  • Basic familiarity with the Terminal app

Step-by-Step

  1. Install Claude Code – If you haven’t already, open Terminal and run npm install -g @anthropic-ai/claude-code. Verify with claude --version.
  2. Find your app’s MCP server details – Check your app’s documentation for the MCP server address. Common formats are http://localhost:PORT or a command like npx your-app-mcp.
  3. Start the MCP server – If the app doesn’t auto-start its server, launch it manually. For example, for Obsidian, you might enable the MCP plugin in settings and note the port.
  4. Open Claude Code’s configuration – In Terminal, run claude mcp add to start adding a new server. You’ll be prompted for a name and connection type.
  5. Choose connection type – Select http if your app uses a URL, or command if it uses a command line tool. For http, enter the full URL (e.g., http://localhost:8080). For command, type the exact command (e.g., npx my-mcp-server).
  6. Name the server – Give it a short, memorable name like notes or tasks. This is how you’ll refer to it in Claude Code.
  7. Test the connection – Run claude mcp list to see all configured servers. Your new server should appear with a green status.
  8. Use the server in Claude Code – Start a session with claude, then ask something like “List my recent notes from the notes server.” Claude will use the MCP tools to fetch data.
  9. Allow permissions when prompted – The first time you use a tool, Claude Code will ask for permission. Choose “Allow” to let it access the app’s data.

Common Mistakes

  • Wrong URL or port – Double-check the exact port your app uses. A typo in the port is the most frequent issue.
  • Server not running – The MCP server must be active before you start Claude Code. If it crashes, reconnect.
  • Using the wrong connection type – Some apps require command instead of http. Read the app’s docs carefully.
  • Forgetting to restart Claude Code – After adding a server, you may need to restart the Claude Code session for changes to take effect.

Tips

  • Use localhost for security – Keep the server bound to 127.0.0.1 to avoid exposing your data to the network.
  • Name servers clearly – Use names that reflect the app, like obsidian-notes or todoist, so you remember what each does.
  • Test with a simple query – Start with “What tools do you have on the [server]?” to see the available functions.
  • Check logs – If something fails, run claude mcp logs to see detailed error messages.

Troubleshooting

Server shows as “error” in claude mcp list – The server isn’t reachable. Verify it’s running, check the URL/command, and try connecting with a browser or curl to confirm.

Claude says “tool not found” – The server might not have loaded. Restart Claude Code and check claude mcp list again.

Permission prompts keep appearing – This is normal for new tools. You can pre-approve tools by adding them to the allowedTools in your Claude Code settings.

Connection times out – The server may be slow or the port blocked. Try increasing timeout in the MCP server config, or check firewall settings.

Frequently Asked Questions

Can I connect multiple Mac apps at once?

Yes, you can add multiple MCP servers, each with a different name. Claude Code will show tools from all of them.

Do I need to write code to create an MCP server?

Not necessarily. Many apps offer built-in MCP support or plugins. If yours doesn’t, you can use a generic MCP server like mcp-server-sqlite to expose a database.

Is this secure?

It’s as secure as your local network. Keep the server on localhost and avoid sharing your Claude Code session with untrusted users.

What if my app doesn’t support MCP?

You can use a community-built MCP adapter or write a simple one using the MCP SDK. Alternatively, use file-based MCP servers that read/write files in a folder.

Can I use this with a remote server?

Yes, but you’ll need to specify the remote URL and ensure the server is accessible. Use HTTPS for security.

Why does Claude Code ask for permission every time?

By default, Claude Code asks before using tools for safety. You can allowlist tools in your settings to skip prompts for trusted servers.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →