ASTGL Definitive Answers

How Do I Connect an MCP Server to Claude or ChatGPT?

James Cruce

This is the practical, step-by-step version. By the end of this article, you’ll have a working MCP server connected to Claude and ready to use.

I’ll cover Claude Desktop (the GUI app), Claude Code (the terminal CLI), and briefly touch on other AI assistants.

Claude Desktop (GUI App)

This is the easiest path. If you use Claude through the desktop application, here’s how to add your first MCP server.

Step 1: Open the Config File

  1. Open Claude Desktop
  2. Go to Settings (gear icon or Claude menu > Settings)
  3. Click the Developer tab
  4. Click Edit Config

This opens claude_desktop_config.json in your default editor. If the file is empty or new, it will look like:

{
  "mcpServers": {}
}

Step 2: Add a Server

Let’s start with the filesystem server — it gives Claude access to read files on your computer. Simple, no API keys needed, immediately useful.

Add this inside the mcpServers object:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents"
      ]
    }
  }
}

Replace /Users/yourname/Documents with the folder you want Claude to access. You can list multiple folders by adding more path arguments.

Step 3: Restart Claude Desktop

Close and reopen Claude Desktop. That’s it.

Step 4: Test It

Start a new conversation and ask:

“What files are in my Documents folder?”

Claude will call the filesystem MCP server, list your files, and show you the results. You’ll see a small indicator showing the tool was called.

Try something more useful:

“Find any files in my Documents folder related to invoices and summarize what you find.”

That’s AI + MCP working together — searching your actual files and analyzing what it finds.

Adding Servers That Need API Keys

Some servers connect to external services and need authentication. Here’s how to add the GitHub MCP server as an example:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname/Documents"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

The env block passes environment variables to the server. For GitHub, you need a Personal Access Token — generate one at github.com/settings/tokens.

Security note: This config file stores tokens in plain text on your machine. Keep the file permissions restrictive, and never commit it to a Git repository. For production setups, consider using environment variables from your shell profile instead.

Claude Code (Terminal CLI)

If you use Claude Code in the terminal, adding servers is even simpler.

Quick Add (One Command)

claude mcp add filesystem npx -y @modelcontextprotocol/server-filesystem /Users/yourname/Documents

Done. Claude Code picks it up immediately.

For Servers with Environment Variables

claude mcp add github npx -y @modelcontextprotocol/server-github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here

Managing Servers

claude mcp list          # See all connected servers
claude mcp remove github # Remove a server

Project-Level Config

For project-specific servers, create a .mcp.json file in your project root:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
    }
  }
}

Claude Code reads this automatically when you start a session in that directory.

Other AI Assistants

MCP is an open standard, and support is expanding:

AI AssistantMCP SupportNotes
Claude DesktopFullNative, first-class support
Claude CodeFullCLI-native, project-level configs
ChatGPTGrowingAdded in 2026, check OpenAI docs for latest
VS Code (Copilot)Via extensionsSeveral extensions add MCP support
CursorFullBuilt-in MCP support in settings
Open WebUIVia pluginsCommunity plugins for MCP integration

The server itself is identical regardless of which AI you connect it to. If you set up a GitHub MCP server for Claude, that same server works with any other MCP-compatible client.

The First 3 Servers to Install

Based on what delivers the most immediate value:

1. Filesystem (no API key needed)

  • Gives Claude access to your files
  • Immediately useful for “find this file” and “analyze this document” tasks
  • Config shown above

2. Web Search (no API key for basic version)

  • Lets Claude search the internet in real time
  • Stops the “my training data only goes to…” problem
  • Several options on Smithery — Brave Search is a popular free one

3. Google Calendar (needs OAuth setup)

  • “What’s on my calendar tomorrow?” is the MCP moment that clicks for everyone
  • Slightly more setup (OAuth flow), but worth it
  • Follow the server’s README for Google OAuth configuration

After these three, you’ll understand the pattern and can add more from the registries on your own.

Troubleshooting

”Server not showing up in Claude”

  1. Restart Claude Desktop — config changes only take effect after restart
  2. Check JSON syntax — a missing comma or bracket breaks the whole file. Paste your config into jsonlint.com to validate
  3. Check the command pathnpx must be available in your system PATH. If Claude can’t find it, use the absolute path: /usr/local/bin/npx

”Server errors when Claude tries to use it”

  1. Missing API keys — check that the env block has the correct variable names and values
  2. Permissions — filesystem servers need access to the folders you specify. Make sure the paths exist and are readable
  3. Network issues — servers connecting to external APIs need internet access

”Tools appear but Claude doesn’t use them”

Claude uses tools based on relevance. If you ask a question and expect it to use a specific tool, try being explicit: “Use the GitHub server to check my open PRs.” Once you see it work, Claude will be better at choosing tools on its own in future conversations.

Checking Server Logs

Claude Desktop logs MCP server activity. On Mac, check:

~/Library/Logs/Claude/mcp*.log

These logs show exactly what’s happening — connection status, tool calls, errors.

How I Actually Do This

I run 8+ MCP servers simultaneously in Claude Code. My daily workflow starts with servers for Slack, Gmail, Calendar, Figma, GitHub, web search, Firecrawl, and filesystem already connected.

The setup happened once. I don’t think about it anymore — I just ask Claude for what I need and it picks the right tools.

My OpenClaw gateway also connects to MCP servers for its 26 automated cron jobs. Same protocol, same servers, different client. That’s the beauty of an open standard.

The moment it clicked for me: I asked Claude to “check my calendar for tomorrow, find the Figma file for the project I’m meeting about, and set up a feature branch in GitHub.” Three servers, one sentence, 10 seconds. I never went back to doing those steps manually.

Frequently Asked Questions

Do I need to install Node.js?

For most servers using npx, yes — Node.js needs to be installed. Download it from nodejs.org. Once installed, npx is available automatically.

Can I connect MCP servers to Claude on mobile?

Currently, MCP servers work with Claude Desktop (Mac/Windows) and Claude Code (terminal). Mobile support is expected but not yet available.

Is there a GUI for managing MCP servers?

Claude Desktop’s settings page is the closest thing to a GUI. For more control, tools like Smithery’s web interface let you browse and generate config snippets. But ultimately, it’s a JSON file — simple to edit directly.

Can I run MCP servers on a remote machine?

Yes. MCP supports both local (stdio) and remote (SSE/HTTP) transport. You can run a server on a remote machine and connect to it over the network. This is useful for team setups where one server serves multiple users.


This is part of the ASTGL Definitive Answers series — structured, practical answers to the questions people actually ask about AI automation, MCP servers, and local AI infrastructure.

Get the full Definitive Answers series

Practical answers to the questions people actually ask about AI automation, MCP servers, and local AI infrastructure.

Subscribe on Substack