Feature Request: Support MCP Sampling (createMessage) for server-initiated LLM completions

Summary

I’d like to request support for MCP’s sampling capability (sampling/createMessage), which allows MCP servers to request LLM completions from the host. This is part of the protocol but doesn’t appear to be enabled in ChatGPT Apps yet.

I noticed a thread about window.openai.callCompletion — which looks like the client-side equivalent — but it currently returns 404. This suggests the infrastructure may exist but isn’t enabled yet.

The Problem

Many apps need to generate contextual natural language based on server-side logic. Currently we have two options:

  1. Return structured data, hope ChatGPT narrates well — Works sometimes, but we lose control over tone, phrasing, and consistency
  2. Call a separate LLM API from the server — Extra cost, added latency, potential voice inconsistency, requires managing API keys

Neither is ideal. Sampling would let us say: “Here’s the context — please generate a response in ChatGPT’s voice.”

Use Cases This Would Unlock

Interactive Games & Narrative

  • RPG/Dungeon Master apps: Server tracks world state, NPCs, inventory; requests ChatGPT to narrate outcomes and voice NPCs
  • Negotiation/diplomacy games: Server manages game logic; requests ChatGPT to roleplay AI rulers with distinct personalities
  • Mystery/detective games: Server knows the solution; requests ChatGPT to play suspects during interrogation

Education & Tutoring

  • Socratic tutors: Server tracks student progress; requests contextually appropriate follow-up questions
  • Language learning: Server manages curriculum; requests example sentences and corrections in context
  • Adaptive explainers: Server identifies confusion; requests re-explanation at appropriate level

Data & Analytics

  • Insight narration: Server computes complex analytics; requests plain-English explanation of significance
  • Report generation: Server structures findings; requests narrative synthesis
  • Anomaly explanation: Server detects outliers; requests contextual interpretation

Professional Tools

  • Contract review: Server parses legal structure; requests plain-language clause explanations
  • Knowledge base Q&A: Server retrieves relevant docs; requests synthesized answer
  • Customer support: Server has ticket context; requests empathetic, accurate responses

Health & Wellness

  • Symptom triage: Server has medical logic; requests sensitive, appropriate follow-up questions
  • Coaching apps: Server tracks goals/progress; requests motivational check-ins
  • Journaling prompts: Server knows reflection history; requests personalized prompts