How ChatGPT Custom Actions work
ChatGPT can call external APIs through Custom Actions. You import an OpenAPI 3.x spec, set up authentication, and ChatGPT gains the ability to call those endpoints during a conversation.
MCP Forge auto-generates that spec from your existing code and proxies the calls through our infrastructure — so your API doesn't need to be public and you don't write any OpenAPI YAML by hand.
Manual OpenAPI authoring
Write YAML for every endpoint, maintain it as routes change, set up auth, expose your API publicly.
One paste
Paste your controller. Get an OpenAPI URL. Import into ChatGPT. Done — we proxy and keep the spec in sync.
Prerequisites
- A Spring Boot, Express.js, or FastAPI app with defined routes
- A ChatGPT Plus or Team account (Custom Actions require a paid plan)
- A free MCP Forge account — sign up here
Deploy your API to MCP Forge
Sign in to your dashboard, go to the Deploy tab, and paste your controller code. MCP Forge auto-detects the framework.
For example, a FastAPI app:
from fastapi import FastAPI app = FastAPI() @app.get("/orders/{order_id}") def get_order(order_id: str): ... @app.get("/orders") def list_orders(status: str = None): ... @app.post("/orders") def create_order(item: str, qty: int): ... @app.delete("/orders/{order_id}") def cancel_order(order_id: str): ...
Click Generate + Deploy MCP Server →. Both your MCP endpoint (for Claude) and your OpenAPI spec (for ChatGPT) are generated from the same paste.
Get your OpenAPI spec URL
After deploying, go to the Overview tab and click 💬 ChatGPT Actions on the config card. Your spec URL looks like:
https://api.main-duck.com/api/tenants/YOUR_TENANT_ID/openapi
Click Copy URL. This URL is public — ChatGPT fetches the spec from it when you import.
Import into ChatGPT
- Go to ChatGPT → Explore GPTs → Create
- Click Configure tab → Add actions
- Click Import from URL → paste your OpenAPI spec URL
- ChatGPT loads and displays all your endpoints as available actions
- Under Authentication → choose API Key → type Bearer → paste your MCP Forge API token (from the Overview tab)
- Click Save
Works with Claude Desktop too
The same deployment powers both integrations simultaneously. Switch to the 🤖 Claude Desktop tab on the same config card to get the MCP endpoint for Claude Desktop, Cursor, or Windsurf — no extra steps.
One paste. One deployment. Every AI tool.
Optional: Auto-sync on push
When you add or rename routes, the spec updates automatically on every GitHub push — no re-paste, no re-import into ChatGPT.
- Dashboard → GitHub Sync
- Paste repo URL + Personal Access Token (read scope)
- Set branch to watch, copy the webhook URL to GitHub