Skip to content

fix(app-server): accept MCP elicitation requests instead of rejecting them (#499)#501

Open
dane-krambergar wants to merge 1 commit into
openai:mainfrom
dane-krambergar:fix/answer-mcp-elicitation-requests
Open

fix(app-server): accept MCP elicitation requests instead of rejecting them (#499)#501
dane-krambergar wants to merge 1 commit into
openai:mainfrom
dane-krambergar:fix/answer-mcp-elicitation-requests

Conversation

@dane-krambergar

Copy link
Copy Markdown

Fixes #499.

Problem

AppServerClientBase.handleServerRequest rejects every server→client request with JSON-RPC -32601 "Unsupported server request". MCP servers surfaced as codex_apps (e.g. ChatGPT connectors) ask for the operator's consent via an mcpServer/elicitation/request, which app-server delivers as a server→client request. Because this client runs Codex non-interactively, that request is never answered:

  • the background runner returns user rejected MCP tool call;
  • codex exec and codex mcp-server hang on the unanswered elicitation.

So connector tool calls (DainOS, GitHub, Slack, …) can't run through the plugin at all.

Fix

Answer mcpServer/elicitation/request with { action: "accept", content: null, _meta: null } so connectors the operator has already enabled can run. Unknown server requests still get -32601.

The response shape matches the generated app-server protocol (McpServerElicitationRequestResponse; McpServerElicitationAction = "accept" | "decline" | "cancel").

Verification

Ran a read-only connector call (dainos.describe_schema) through the plugin's task runner — non-interactive, no --dangerously-bypass-approvals-and-sandbox:

  • Before: user rejected MCP tool call.
  • After: codex_apps/dainos.describe_schema completed and the tool result is returned.

node --test tests/*.test.mjs stays green (91 → 93; adds a focused unit test and exports AppServerClientBase so it can be constructed in isolation).

Note

If you'd prefer this gated behind a config/env opt-in rather than always accepting, I'm happy to adjust. Accepting seemed right given the plugin's non-interactive model and that the connector is already operator-enabled, but the choice is yours.

🤖 Authored with Claude Code

… them

handleServerRequest rejected every server->client request with -32601
"Unsupported server request". Connectors surfaced as `codex_apps` (e.g.
ChatGPT connectors) request the operator's consent via an
`mcpServer/elicitation/request`, delivered as a server->client request.
Because this client runs Codex non-interactively, that request was never
answered: the background runner returned "user rejected MCP tool call" and
`codex exec` / `codex mcp-server` hung on it.

Answer the elicitation with { action: "accept" } so connectors the operator
has already enabled can run; unknown server requests still get -32601. Adds
a unit test and exports AppServerClientBase for it.

Fixes openai#499

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dane-krambergar dane-krambergar requested a review from a team July 14, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector (codex_apps) MCP tool calls are auto-rejected: app-server client stubs all server→client requests with -32601

1 participant