Connecting MCP Servers to Claude and ChatGPT: A Practical Setup Guide

1–2 minutes

Updated

Short answer: the same MCP server can serve several assistants. Local servers (stdio) run on your machine and are configured in each client; remote servers (HTTP) run somewhere else and are added by URL. Claude Code, Claude Desktop, claude.ai, ChatGPT and Codex all support MCP, with different setup paths.

Agent tooling changes fast. Commands and file formats below match the versions current at the time of writing; check the official docs for your version before relying on them.

Claude Code

shell

# Local server (stdio): everything after -- is the start command
claude mcp add aws-docs -- uvx awslabs.aws-documentation-mcp-server@latest

# Remote server over HTTP
claude mcp add --transport http my-api https://mcp.example.com/mcp

# Share with the team: writes .mcp.json in the repository
claude mcp add --scope project aws-docs -- uvx awslabs.aws-documentation-mcp-server@latest

claude mcp list      # inside a session, /mcp shows status and handles login

Claude Desktop (local servers)

claude_desktop_config.json

{
  "mcpServers": {
    "aws-docs": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"],
      "env": { "FASTMCP_LOG_LEVEL": "ERROR" }
    }
  }
}

claude.ai and ChatGPT (remote servers)

  • claude.ai: add a custom connector with the server URL in the connectors settings (available on paid plans; organization admins may need to allow it).
  • ChatGPT: remote MCP servers are added as connectors/apps; adding custom servers requires the developer mode setting on supported plans. The server must be reachable over HTTPS.
  • Both web apps cannot reach servers on localhost: they need a public HTTPS endpoint, ideally with OAuth.

Codex CLI

~/.codex/config.toml

[mcp_servers.aws-docs]
command = "uvx"
args = ["awslabs.aws-documentation-mcp-server@latest"]

Security checklist before connecting any server

  1. Know who wrote it and read what tools it exposes.
  2. Give it its own credentials with least privilege; start read-only.
  3. Keep write actions behind confirmation in the client.
  4. Never put secrets in a shared .mcp.json; use environment variables.
  5. Log what it does (CloudTrail for AWS credentials).

Tool descriptions from an MCP server go straight into the model’s context. A malicious or compromised server can try to steer the assistant (prompt injection). Treat servers as code you run, not as plugins you browse.

Joniel Gallo · Cloud & AI Engineer

I build these labs in a real AWS account and publish the code. Need a second opinion on your architecture or your AWS bill? Work with me.

One tested AWS & AI lab a week

Real costs, working code and what changed in Bedrock this month. Subscribe and get the free AWS Permission Debugger (PDF).