What is an MCP server, and how do you add one to Claude, ChatGPT and Codex?
Last updated
An MCP server is a program that gives AI apps access to a tool or a source of data through the Model Context Protocol (MCP), an open standard. The app, such as Claude, ChatGPT, Codex or VS Code, is the client. It connects to the server, asks what the server offers, and lets the model call it: search a database, read a file, open a ticket or save a note. A server runs either on your computer, started by the app, or on the internet at a URL you add and sign in to.
What MCP is
The protocol's own documentation calls MCP "an open-source standard for connecting AI applications to external systems," and compares it to "a USB-C port for AI applications." On December 9, 2025, Anthropic donated MCP to the Agentic AI Foundation, a fund under the Linux Foundation, with Block and OpenAI among the founding contributors, so no single company owns it. The current version of the specification is dated July 28, 2026.
Before MCP, every AI app needed its own plug-in for every service. With MCP, a service writes one server and every app that speaks the protocol can use it, and an app that speaks MCP can use every server.
What an MCP server offers
The specification defines three things a server can offer:
- Tools: "Functions for the AI model to execute," such as
search_memoriesorcreate_issue. The model decides when to call them, and the app runs the call. - Resources: "Context and data, for the user or the AI model to use," such as files or records the app can read.
- Prompts: "Templated messages and workflows for users," which an app can offer as ready-made commands.
Most servers you'll add are mainly tools. A memory server, for example, offers tools to save, search and read notes.
Local and remote servers
MCP has two standard ways for an app to reach a server, which the specification calls transports:
- stdio: the app starts the server as a program on your computer and talks to it through the program's input and output. This is how local servers work.
- Streamable HTTP: the app sends each message as an HTTP request to one address, the server's URL. This is how remote servers work, usually at an address ending in
/mcp.
An older HTTP-with-SSE transport has been deprecated since the March 2025 version of the specification, so choose "HTTP" or "Streamable HTTP" when an app asks.
| Local server | Remote server | |
|---|---|---|
| Where it runs | On your computer, started by the app | On the internet, at a URL |
| How you add it | A command to run | A URL to enter |
| Sign-in | Usually none; it uses your files or a key in its settings | Usually OAuth in your browser |
| Who can use it | Apps on that one computer | Every app you sign in to, on any device |
| Examples | A file-system server, a local database | A hosted memory server, a ticket tracker |
How sign-in works for remote servers
A remote server that holds your data needs to know who you are. The specification builds sign-in on OAuth 2.1, the same standard behind "Sign in with Google":
- The app calls the server without a token. The server answers 401 and points to a small document saying which sign-in service to use (OAuth Protected Resource Metadata).
- The app identifies itself to that sign-in service. The current specification recommends Client ID Metadata Documents for this; the older Dynamic Client Registration still works but is deprecated. Either way, you usually don't paste a client ID or secret.
- A browser page opens. You sign in to the service and approve the app.
- The app gets a token and sends it with every call.
This is why adding a remote server is usually just a URL plus a browser sign-in, with no API key to copy.
How to add an MCP server
The steps differ by app. Each one below uses Memlo, a remote memory server at https://memlo.ai/mcp, as the example; swap in your server's URL.
Claude Code
claude mcp add --transport http memlo https://memlo.ai/mcp
Then type /mcp in Claude Code, choose the server and choose Authenticate. Add --scope user to have it in every project, or --scope project to share it through a .mcp.json file. Full steps: How to add an MCP server to Claude Code.
claude.ai and Claude Desktop
Open Customize, then Connectors, choose "Add custom connector", and enter the URL. Full steps: How to add a custom connector to Claude.
ChatGPT
On chatgpt.com, open Plugins, choose the + button, then "Add custom MCP server", and enter the URL with OAuth. This needs a paid ChatGPT plan that offers custom MCP servers. Full steps: How to add a memory MCP server to ChatGPT.
Codex
codex mcp add memlo --url https://memlo.ai/mcp
Codex opens a browser page to sign in. Full steps: How to add a memory MCP server to Codex.
VS Code and other clients
Add the server to .vscode/mcp.json, or to your client's MCP settings, with the type http and the URL. See How to connect a remote MCP memory server to any AI app.
After adding a server, start a new session or restart the app: most apps load MCP servers only when they start.
Where to find MCP servers
- The official MCP Registry (registry.modelcontextprotocol.io) lists published servers, "like an app store for MCP servers." It launched in preview in September 2025.
- The reference servers in the modelcontextprotocol/servers repository are "meant to serve as educational examples": Everything, Fetch, Filesystem, Git, Memory, Sequential Thinking and Time. Their Memory server is "a basic implementation of persistent memory using a local knowledge graph," stored in a file on your computer.
- App directories: Claude's connector directory and ChatGPT's plugins list servers that work in those apps.
- The service itself: many companies document their own MCP server's URL in their help pages.
Is it safe to add an MCP server?
An MCP server can read and change whatever it's connected to, and the model decides when to call it. Before you add one:
- Add only servers from people you trust, and read what each tool can do.
- Prefer servers that sign in with OAuth over ones that want a long-lived API key pasted into a settings file.
- Watch for tools that change or delete things. Many apps ask you to confirm before such a call.
- Be careful combining a server that reads private data with one that can send data out, and with content you didn't write, such as web pages or email. Text in that content can try to steer the model.
- Remove servers you no longer use, and disconnect the app on the service's side too.
Example: a memory server
Memlo is an MCP server that gives your agents one shared memory. It offers tools such as search_memories, read_memory, create_memory, smart_add_memory and edit_memory, plus memory_history and restore_memory, because every change is kept as a version. It's a remote server with OAuth sign-in and no API key, so the same memory works in Claude Code, Codex, claude.ai, ChatGPT and other MCP clients. The setup page lists every tool.
Frequently asked questions
What does MCP stand for?
Model Context Protocol. It's an open standard for connecting AI apps to tools and data.
What is the difference between an MCP server and an API?
An API is how programs talk to a service. An MCP server wraps a service in a standard shape that AI apps already understand: it describes its tools to the model, and the app handles connecting and signing in. Many MCP servers call a service's API underneath.
Do I need to run an MCP server myself?
Not for a remote server: someone else runs it, and you add its URL. A local server runs on your computer, started by the app.
Which apps support MCP servers?
Claude Code, claude.ai, Claude Desktop, ChatGPT on plans that offer custom MCP servers, Codex, VS Code, Gemini and many others. Support for remote servers with sign-in varies by app.
What is the difference between stdio and Streamable HTTP?
stdio is for local servers: the app starts the server and they talk through its input and output. Streamable HTTP is for remote servers: the app sends requests to the server's URL.
Sources
Checked on October 31, 2026:
- What is the Model Context Protocol?, modelcontextprotocol.io
- MCP specification, version 2026-07-28, with its transports and authorization pages
- MCP joins the Agentic AI Foundation, MCP blog, December 9, 2025
- Official MCP Registry
- Reference MCP servers and the Memory server
- Connect Claude Code to tools via MCP, Claude Code docs
- Get started with custom connectors using remote MCP, Claude Help Center
- Memlo: the setup page
Try Memlo
Memlo is invitation only for now. Join the waitlist and we'll email you when your invitation is ready.
Join the waitlist