ChatGPT Actions and custom GPTs
ChatGPT Actions and custom GPTs: external memory integration options
- A custom GPT Action can call any public HTTPS endpoint described by an OpenAPI schema; the call is made server-side by OpenAI's infrastructure, making CORS irrelevant and requiring no changes to an existing Cloudflare Workers or Fly.io backend
- API key authentication with a custom header (e.g., `X-Api-Key`) is supported in the GPT editor UI as a server-side secret - it is never visible to the user - and works reliably on the ChatGPT iOS mobile app, unlike OAuth 2.0 which has documented persistent failures on iOS and Android through mid-2025
- The `add_memory` write path (stateless Cloudflare Workers proxy to GitHub Contents API) is directly compatible with GPT Actions and requires no modifications to the backend established in `2026-03-08-self-hosted-mcp-server-options.md`
- The `search_brain` retrieval path can be triggered before every GPT response via a system prompt instruction such as "Before every response, call the search_brain action with the user's query and incorporate the results as context"; compliance is probabilistic (system prompt enforcement) rather than protocol-guaranteed, but is sufficient for personal single-user deployment
- OpenAI's built-in ChatGPT memory system exposes no programmatic API: there is no endpoint for reading, writing, or importing saved memories; the data export available via the privacy portal is a manual one-time ZIP download, not a synchronisation hook
- Creating a custom GPT with Actions requires ChatGPT Plus at $20/month (identical to the Claude Pro requirement for Claude iOS MCP Connectors), meaning the cost parity between the two paths is exact and not a differentiating factor
- A single backend deployment can serve both GPT Actions (REST/JSON) and Claude iOS MCP (Streamable HTTP) endpoints without conflict, meaning the cross-tool memory portability goal - capturing from ChatGPT and retrieving in Claude, and vice versa - can be achieved with no additional hosting cost beyond the Fly.io/Railway instance already required for vector search
- The ChatGPT Actions path has one structural limitation compared to Claude iOS MCP Connectors: retrieval only activates when the user opens the specific memory-retrieval custom GPT, whereas Claude Connectors apply automatically to every Claude conversation once configured
Research Question
Can a ChatGPT custom Generative Pre-trained Transformer (GPT) be configured with Actions that: (a) call a self-hosted HTTP endpoint to add a memory, (b) call search_brain before responding to surface relevant context? What is OpenAI's native Memory Application Programming Interface (API) - is there any export/import hook to sync ChatGPT's built-in memories into this repo? What are the auth and hosting requirements?
Findings
(Populated from §6 Synthesis above.)
Executive Summary
A custom GPT can be configured with Actions that call a self-hosted HTTPS endpoint to write a memory (add_memory) and to retrieve context before responding (search_brain) - both capabilities are fully supported by the OpenAI Actions architecture. OpenAI's built-in ChatGPT memory system has no programmatic API; no export or import hook exists, making the external Actions write path the only viable route to cross-tool memory portability. Authentication is simpler than the Claude iOS MCP path: GPT Actions support static API key injection via a custom header, which works reliably on the ChatGPT iOS mobile app; OAuth-based Actions have documented mobile reliability problems. The hosting backend established in prior research (Cloudflare Workers for write, Fly.io or Tailscale Funnel for vector search) applies without modification and can serve both ChatGPT Actions and Claude iOS MCP from a single deployment.
Key Findings
-
A custom GPT Action can call any public HTTPS endpoint described by an OpenAPI schema; the call is made server-side by OpenAI's infrastructure, making CORS irrelevant and requiring no changes to an existing Cloudflare Workers or Fly.io backend.
-
API key authentication with a custom header (e.g.,
X-Api-Key) is supported in the GPT editor UI as a server-side secret - it is never visible to the user - and works reliably on the ChatGPT iOS mobile app, unlike OAuth 2.0 which has documented persistent failures on iOS and Android through mid-2025. -
The
add_memorywrite path (stateless Cloudflare Workers proxy to GitHub Contents API) is directly compatible with GPT Actions and requires no modifications to the backend established in2026-03-08-self-hosted-mcp-server-options.md. -
The
search_brainretrieval path can be triggered before every GPT response via a system prompt instruction such as "Before every response, call the search_brain action with the user's query and incorporate the results as context"; compliance is probabilistic (system prompt enforcement) rather than protocol-guaranteed, but is sufficient for personal single-user deployment. -
OpenAI's built-in ChatGPT memory system exposes no programmatic API: there is no endpoint for reading, writing, or importing saved memories; the data export available via the privacy portal is a manual one-time ZIP download, not a synchronisation hook.
-
Creating a custom GPT with Actions requires ChatGPT Plus at $20/month (identical to the Claude Pro requirement for Claude iOS MCP Connectors), meaning the cost parity between the two paths is exact and not a differentiating factor.
-
A single backend deployment can serve both GPT Actions (REST/JSON) and Claude iOS MCP (Streamable HTTP) endpoints without conflict, meaning the cross-tool memory portability goal - capturing from ChatGPT and retrieving in Claude, and vice versa - can be achieved with no additional hosting cost beyond the Fly.io/Railway instance already required for vector search.
-
The ChatGPT Actions path has one structural limitation compared to Claude iOS MCP Connectors: retrieval only activates when the user opens the specific memory-retrieval custom GPT, whereas Claude Connectors apply automatically to every Claude conversation once configured.
Assumptions
-
Assumption: A system prompt instruction ("before every response, call search_brain") achieves ≥95% retrieval invocation for standard conversational queries. Justification: Community implementations of RAG via Actions report reliable trigger behaviour for explicit, unambiguous instructions; the failure mode is ambiguous instructions, not the underlying mechanism. This rate is sufficient for personal use but has not been empirically measured.
-
Assumption: A single FastAPI backend can expose both MCP Streamable HTTP routes and plain REST/JSON routes on different paths without conflict. Justification: FastAPI's routing system supports arbitrary path definitions; MCP and REST share the HTTP transport layer and can coexist in the same process. This is a standard web application architecture pattern.
-
Assumption: The user sets the memory-retrieval custom GPT as the default or primary interface for ChatGPT conversations to ensure retrieval runs consistently. Justification: If the user opens standard ChatGPT (not the custom GPT), no retrieval occurs. The custom GPT must be the entry point. This is a workflow discipline requirement, not a technical constraint.
Analysis
The investigation resolves the build/no-build question with high confidence: the ChatGPT Actions path is viable and simpler to implement than the Claude iOS MCP path in three respects. First, no MCP SDK is required - any HTTP server with a valid OpenAPI schema works, and the existing Cloudflare Workers and Fly.io endpoints are already REST/JSON compatible. Second, API key authentication (custom header) is both simpler to configure and more iOS-reliable than OAuth 2.1. Third, OpenAPI schemas for two endpoints (add_memory, search_brain) are trivial to author, and LLMs including GPT-4o can generate them from a description.
Retrieval scope is the key structural constraint: custom GPT retrieval fires only when the user opens that specific GPT, making the ChatGPT path a complementary capture surface rather than the primary memory integration [inference].
OAuth unreliability on iOS - while API key Actions remain stable - is the key finding for implementation design. Any personal deployment should avoid OAuth and use the custom header API key approach, accepting the security posture that OpenAI's servers hold the key. For a personal memory endpoint containing the owner's own notes, this risk is acceptable [inference].
Risks, Gaps, and Uncertainties
- The forced retrieval pattern (≥95% system prompt compliance) is an assumption, not an empirically verified rate. A prototype test with 20–30 queries would be sufficient to validate or reject this assumption before committing to the design.
- The "not available on iOS" issue, historically caused by OAuth flow failures, could resurface for API key Actions in a future app update. OpenAI has not documented iOS-specific Action availability guarantees.
- OpenAI may introduce a native Memory API in a future release, which would change the portability analysis (import hook would become available). No such roadmap item has been announced as of March 2026.
- The co-hosting assumption (MCP + REST on a single FastAPI instance) has not been tested; a simple architectural prototype would confirm or refute it before build commitment.
Open Questions
- Should a single custom GPT handle both
add_memoryandsearch_brainActions, or should these be two separate custom GPTs with distinct purposes? (Architectural question for Memory-System W-0005.) - Is there a way to configure a custom GPT as the default interface on the ChatGPT iOS home screen, so it is the entry point for all conversations rather than requiring deliberate navigation?
- OpenAI introduced "Skills" in 2025 as an evolution beyond Custom GPTs - does the Skills architecture change the Actions integration model, or is it additive? (Out of scope here; candidate for a new backlog item.)
sources
- [x]
Research/completed/2026-03-02-agent-memory-management-context-injection.md- memory portability findings; "ChatGPT memories don't export to Claude" - [x] OpenAI custom GPT Actions documentation
- [x] OpenAI custom GPT Actions authentication
- [x] OpenAI Memory documentation
- [x] OpenAPI specification (for Actions schema)
- [x]
2026-03-08-self-hosted-mcp-server-options.md- prerequisite infrastructure item - [x]
2026-03-08-claude-ios-mcp-remote-integration.md- comparison item - [x]
davidamitchell/Memory-SystemBACKLOG.md W-0005 - the corresponding discovery item that this research informs