The AI Loadout

How to use MCP Servers with an AI agent

An MCP server gives your agent a new set of tools. In Claude Code run claude mcp add, in Codex run codex mcp add or edit config.toml, and in Cursor add the server to .cursor/mcp.json. Add only servers you trust, and give each one the smallest permissions it needs.

Checked against official docs on Oct 26, 2026.

Get the free starter kit. One short email a day when our setups change.

Free starter kit on signup: 2 Claude Code skills and 1 agent persona from our paid packs. By subscribing you agree to get The AI Loadout Daily, one email each morning. No spam, we never sell your email, and every email has a one-click unsubscribe link.

Claude Code

  1. Remote server: claude mcp add --transport http notion https://mcp.notion.com/mcp
  2. Local server: claude mcp add --transport stdio --env API_KEY=YOUR_KEY myserver -- npx -y some-mcp-package
  3. Add --scope project to share it with your team through .mcp.json
  4. claude mcp list, claude mcp get <name>, claude mcp remove <name>, or /mcp inside a session

Codex

  1. Local: codex mcp add context7 -- npx -y @upstash/context7-mcp
  2. Remote: codex mcp add example --url https://example.com/mcp
  3. Or edit ~/.codex/config.toml with [mcp_servers.<name>] tables (command, args, env, or url and bearer_token_env_var)
  4. codex mcp list, codex mcp login <name> for OAuth, /mcp in the TUI

Cursor

  1. Project: .cursor/mcp.json. Global: ~/.cursor/mcp.json
  2. {"mcpServers":{"name":{"command":"npx","args":["-y","pkg"],"env":{}}}} for local, or {"url":"https://...","headers":{}} for remote
  3. Use ${env:NAME} instead of pasting keys
  4. Check Output > MCP Logs when a server will not start

Grok Bot

  1. Grok Bot comes with connectors for apps like Gmail, Google Calendar, GitHub and X
  2. Connect the ones you need and it uses them as tools
  3. For anything without a connector it can use the web or a script on its own computer

Gotchas

  • MCP servers that fetch outside content can expose you to prompt injection, per Anthropic's docs.
  • Project config files get committed. Never put raw API keys in .mcp.json or .cursor/mcp.json.
  • Too many servers crowd the context. Codex lets you trim tools with enabled_tools and disabled_tools.

The loadout for this job

FAQ

What is MCP?

The Model Context Protocol, an open standard for connecting AI apps to tools and data.

Do Claude Code, Codex and Cursor all support MCP?

Yes. All three can connect to local (stdio) and remote (HTTP) MCP servers.

Related how-tos

Sources

Commands change. Check the linked docs before you run anything. All how-to guides

Want tested skills and personas installed in one command? See the AI Loadout packs, from $9.