Rebuild a custom GPT action as an MCP server with ChatGPT
The struggle: Your custom GPT's actions do not transfer on migration, so the part that did real work stops.
What you end up with: A written plan, a tested MCP server for each action and a side by side check against the old GPT before retirement.
Actions do not move automatically, so you list what each one does, define it as an MCP tool, build and test the server, then connect it and compare results with the old GPT.
Tools: ChatGPT. Level: Pro. Time: 1 to 2 days for a developer.
Use it if
- A custom GPT calls your API through actions
- You have a developer who can host a small server
- You need the behaviour to survive the 11 December 2026 retirement
Skip it if
- The GPT only uses instructions and files, which migrate without code
- Nobody can host and maintain a server
What you need first
- Developer access to the GPT's action schema and your API
- A place to host a small HTTPS server
- Developer mode for custom MCP servers (listed on Plus and Pro), or workspace admin approval if your workspace controls plugins
The method
List what each action does (ChatGPT: Chat)
Open the GPT's configuration and copy each action's schema, auth type and the instruction text that tells it when to call. Paste them into chat and ask for a table of actions, inputs, outputs and risk.
Prompt to copy:
I am migrating a custom GPT that uses actions. Here are the action schemas and the instructions that mention them: [paste, with keys and tokens removed]. Make a table: action name, what it does, inputs, outputs, whether it reads or changes data, and how it authenticates. Flag anything unclear and ask me.
You get: A table of every action and what it touches.
Tip: Mark which actions write or delete. Those need the strictest checks.
Design the MCP tools (ChatGPT: Chat)
Ask ChatGPT to turn each action into one MCP tool with a clear name, description, input schema and read-only or destructive annotation. Review them with the developer. Per OpenAI's MCP guide, one tool per distinct action works best.
Prompt to copy:
Turn each action in this table into an MCP tool design: [table]. For each give an action-oriented name, a title, a one-sentence description of when to use it, the input schema, the output schema and whether it is read-only or destructive. Keep one tool per distinct action. List what the server must check on every request. Do not invent API endpoints I did not give you.
You get: A tool list you can build against.
Tip: Write the description as when to use the tool. The model chooses tools from it.
Scaffold the server (ChatGPT: Codex)
Have a developer ask Codex, or a code block in chat, for a starter server using the official TypeScript or Python MCP SDK, with your tool list. Read every line before running it, and keep secrets out of the chat.
Prompt to copy:
Write a starter MCP server using the official [TypeScript or Python] SDK with these tools: [paste tool designs]. Each handler should call my API at [placeholder base URL] and check authorization on every request. Return structured results. Leave TODO comments where you need my API details instead of guessing.
You get: A starter server the developer reviews.
Tip: Keep API keys in the host's secret store, never in code you paste.
Test every tool (ChatGPT: Chat)
Run the server locally, then test it with the MCP Inspector from the official guide: connect over streamable HTTP, call each tool with good and bad inputs and confirm authorization is enforced.
Prompt to copy:
Write a test checklist for these MCP tools: [tools]. For each: one valid call, two invalid inputs, one call with no authorization and one with another user's ID. State the expected result of each so I can tick them off in the MCP Inspector.
You get: Evidence each tool works and refuses bad calls.
Tip: Test a tool with someone else's ID. It should fail.
Connect and compare (ChatGPT: Chat)
Follow OpenAI's guide for connecting a custom MCP server to ChatGPT, using a test account first. Then run the three prompts people use most and compare the answers with the old GPT. Release only after a person signs off.
You get: A verified replacement for the action.
Tip: Keep the old GPT's output saved until the new one matches it.
Where this goes wrong
- Developers must review all server code. Do not run generated code against production data untested.
- Anything that writes or deletes needs a human approval step and strict authorization.
- Custom MCP servers need developer mode, which the pricing page lists for Plus and Pro, and workspace admins control it, so check before you plan the work.
Sources
- ChatGPT Help Center: Custom GPT retirement and migration FAQ
- OpenAI Apps SDK: Build your MCP server
- ChatGPT Help Center: Connected apps in ChatGPT
- ChatGPT plans
More like this
- Agent pull requests checked before a human merges
- An incident timeline rebuilt from your git history
- Acceptance criteria written for vague tickets
Updated . Written with AI help and checked by an independent review step, as described in our editorial standards.