BBotnexio

Buy now!

← All guides

Create an MCP Server and Connect It to ChatGPT: Plans, OAuth, Errors

Deutsche Version

Want to connect ChatGPT to your own system, or does your GPT Action need replacing? Then you need an MCP server. Before you write code, answer one question: does your ChatGPT plan support it at all?

This guide covers which plans support custom MCP, how to set up a server in five steps, how to add it in ChatGPT and how to get OAuth right.

Why you'd need your own MCP server

An MCP server gives ChatGPT tools, such as "look up ticket" or "create project", which ChatGPT calls during a conversation.

The most common trigger right now: custom GPTs are scheduled to retire on Dec 11, 2026 (according to OpenAI, subject to change). Per OpenAI's migration FAQ, GPT custom actions do not transfer through the migration workflow, and rebuilding the connection may require a custom MCP server.

How to turn your OpenAPI operations into tools is covered in OpenAPI to MCP Server. The whole move is in Migrate a Custom GPT to a Plugin.

Which ChatGPT plans support custom MCP servers

PlanCustom MCP servers
ChatGPT Plusnot supported
ChatGPT Proread-only (read/fetch)
Business, Enterprise, Edufull support, including write actions

As of 16 Oct 2026, subject to change. Source: OpenAI Help Center.

More from the same article:

  • Web only. You can't connect custom MCP servers on mobile.
  • Business: only admins and owners can create and publish plugins for custom MCP servers.
  • Enterprise/Edu: admins can use RBAC to let selected members create connections. Only admins and owners can publish.

Create an MCP server in 5 steps

1. Pick an SDK. OpenAI points to the official SDKs for TypeScript (@modelcontextprotocol/sdk) and Python (mcp):

# TypeScript
npm install @modelcontextprotocol/sdk zod

# Python
pip install mcp

2. Define a tool. One tool per distinct action, with a name, description, input schema and fitting annotations. A read tool from OpenAI's Build an MCP server, shortened:

const server = new McpServer({ name: "acme-projects", version: "1.0.0" });

server.registerTool(
  "list_projects",
  {
    title: "List projects",
    description: "Use this when the user wants to find or review projects in their Acme workspace.",
    inputSchema: { status: z.enum(["active", "archived"]).optional() },
    annotations: { readOnlyHint: true, openWorldHint: false, destructiveHint: false },
  },
  async ({ status }) => {
    const projects = await listProjects({ status });
    return {
      structuredContent: { projects },
      content: [{ type: "text", text: `Found ${projects.length} projects.` }],
    };
  }
);

3. Expose Streamable HTTP. Per the MCP specification, the server exposes a single HTTP endpoint that accepts POST, e.g. https://example.com/mcp. Servers must validate the Origin header and respond with 403 if it's present and invalid. When running locally, bind only to 127.0.0.1. For the exact wiring, see the README of your SDK version.

4. Deploy with HTTPS. ChatGPT connects to remote servers, so you need a public HTTPS URL, typically ending in /mcp. For a server on a private network or your own machine, OpenAI names Secure MCP Tunnel. Tunnels and other testing options don't replace the public HTTPS endpoint required for plugin submission.

5. Check it with MCP Inspector. Before ChatGPT, run the Inspector:

npx @modelcontextprotocol/inspector

Select "Streamable HTTP" and enter the URL (locally e.g. http://localhost:3000/mcp). Check that initialization works, all tools appear and each call works with valid and invalid inputs.

Add it in ChatGPT

In the current Plugins experience, OpenAI says you don't need to turn on Developer Mode first. Instead, you acknowledge a risk warning for each server. The steps, per Connect and test your plugin:

  1. Open Plugins in ChatGPT.
  2. Select the plus button, then Add custom MCP server.
  3. Enter a name and, optionally, a description.
  4. Under Connection, enter your public HTTPS MCP endpoint URL including /mcp, or select Tunnel.
  5. Configure authentication, review the risk warning, and check I understand and want to continue.
  6. Select Create as a plugin and review the discovered tools.

To test: install the plugin, start a new conversation, type @ in the prompt box and select it. For write actions, ChatGPT asks for confirmation based on app permissions and the action's context.

Set up OAuth

For an authenticated MCP server, OpenAI expects an OAuth 2.1 flow that conforms to the MCP authorization spec. Details are in the Authentication docs.

Protected resource metadata (/.well-known/oauth-protected-resource)

Your MCP server serves a JSON document at https://your-mcp.example.com/.well-known/oauth-protected-resource:

{
  "resource": "https://your-mcp.example.com",
  "authorization_servers": ["https://auth.yourcompany.com"],
  "scopes_supported": ["files:read", "files:write"]
}

Alternatively, advertise that URL in a WWW-Authenticate header on 401 Unauthorized responses.

Your authorization server also needs to:

  • publish its metadata at /.well-known/oauth-authorization-server or /.well-known/openid-configuration,
  • list S256 in code_challenge_methods_supported (PKCE),
  • copy the resource value ChatGPT sends into the access token (commonly the aud claim).

Your MCP server then verifies the token on each request (issuer, audience, expiration, scopes) before running the tool.

Redirect URI for ChatGPT (copy it, don't guess)

OpenAI's instruction: copy the exact production redirect URI shown on the MCP server's management page into your authorization server's allowlist. Which URI ChatGPT uses depends on RFC 9207 issuer identification:

Your authorization serverRedirect URI
meets the issuer identification requirementshttps://chatgpt.com/connector_platform_oauth_redirect
doesn't meet themhttps://chatgpt.com/connector/oauth/{callback_id}

For client registration, ChatGPT supports Client ID Metadata Documents (CIMD, preferred), dynamic client registration (DCR) and predefined OAuth clients.

Refresh tokens: per the Help Center, if OAuth is configured without offline_access (or your provider's equivalent), ChatGPT may lose access after the original authorization expires. Enable refresh access at your provider, then recreate the app.

Alternative: API key on the server only

If you don't need per-user sign-in, keep the API key for your backend only on the server. Note that ChatGPT can't present custom API keys to your MCP server and doesn't support machine-to-machine grants such as client credentials. To verify that a request comes from ChatGPT, OpenAI names mTLS with its OpenAI-managed client certificate, or allowlisting ChatGPT's published egress IP ranges.

Common errors

  • 403 on every request: your Origin check rejects ChatGPT. Check the allowlist.
  • Wrong URL: missing /mcp, http instead of https, or a local address. ChatGPT doesn't connect to local servers directly; use Secure MCP Tunnel.
  • Token rejected: the audience doesn't match. The resource value must end up in the token, and your server checks issuer, audience, expiration and scopes.
  • OAuth fails: S256 missing from the metadata, or the redirect URI isn't exactly in the allowlist.
  • invalid_client: the registered OAuth client or its secret was expired, deleted or replaced.
  • New tools missing: after approval, ChatGPT uses a "frozen" snapshot of the tools. In workspaces, an admin refreshes the tool list and publishes the update.
  • It doesn't work on Plus: that's the plan, not your server (see above).

Rather start from a template?

The Aramac MCP Server Starter Kit (TypeScript) is a template for your own MCP server on the official @modelcontextprotocol/sdk. Per the product page it includes Streamable HTTP and stdio in one codebase, example tools with zod schemas, three auth modes (none, API key, OAuth 2.1 resource server) and a Dockerfile. 24 automated tests, SDK 1.32.1. Requires Node.js 22.12 or newer. In ChatGPT it works with Business, Enterprise and Edu; Pro read-only, Plus not supported (as of 16 Oct 2026, subject to change). Not included: hosting, custom development, app-directory submission. €39 incl. VAT, sold by Aramac GmbH.

FAQ

Can I connect a custom MCP server with ChatGPT Plus?
No. Custom MCP servers aren't supported on Plus. Pro can use them read-only, and Business, Enterprise and Edu get full support (as of 16 Oct 2026, subject to change).

Do I need Developer Mode to add an MCP server?
Not in the current Plugins experience. Add the server via Plugins, the plus button, Add custom MCP server, and acknowledge the risk warning.

Which URL do I enter in ChatGPT?
Your MCP endpoint's public HTTPS address including the path, typically ending in /mcp. For private servers, use Secure MCP Tunnel instead.

Which redirect URI does ChatGPT need for OAuth?
Copy the exact URI from the MCP server's management page. If your authorization server supports issuer identification, it's https://chatgpt.com/connector_platform_oauth_redirect; otherwise https://chatgpt.com/connector/oauth/{callback_id}.

Can I connect a local MCP server to ChatGPT?
Not directly. ChatGPT connects to remote MCP servers. For a server on a private network or your own machine, OpenAI names Secure MCP Tunnel.

Sources

All checked October 16, 2026.

---

An independent product by Aramac GmbH. Not affiliated with or endorsed by OpenAI or Anthropic. ChatGPT is a trademark of OpenAI.