Skip to content

MCP tools return 'unsupported call' with custom Responses API provider (llama.cpp) #26977

Open

Description

@kxy56618573

Summary

Codex Desktop with custom provider (wire_api = "responses") returns unsupported call for all MCP tools. Built-in tools work fine.

Environment

  • Codex Desktop 26.602.40724 (macOS)
  • llama.cpp master as custom provider
  • Model: Unsloth Qwen3.6-27B-Q8_0_MTP
  • MCP servers: tavily, firecrawl, context7, node_repl

Config

model_provider = "llama_cpp"
model = "Qwen3.6-27B-Q8_0_MTP.gguf"

[model_providers.llama_cpp]
base_url  = "http://llama-server:10000/v1"
wire_api  = "responses"
requires_openai_auth = false

[mcp_servers.tavily]
command = "npx"
args = ["-y", "tavily-mcp"]

Behavior

Model generates correct tool calls, Codex responds:

unsupported call: tavily_search

All MCP tools across all servers fail identically.

What works

  • exec_command, list_mcp_resources, list_mcp_resource_templates, apply_patch ✅
  • MCP servers functional via exec_command + curl ✅
  • API keys valid (HTTP 200 from both tavily and firecrawl endpoints) ✅

What we tried (nothing helped)

  1. npm_config_cache=/tmp/.npm-cache env var
  2. Global npm install + absolute binary path instead of npx
  3. Various sandbox configurations
  4. Different model variants
  5. Patched llama.cpp to flatten namespace tools (tools now properly sent to model)
  6. --reasoning on/off on llama-server

Analysis

list_mcp_resources works (returns empty resources) but individual MCP tool calls fail.
This suggests the MCP server process lifecycle management differs for custom providers vs OpenAI.
When using custom provider with responses wire_api, Codex may not spawn MCP server processes
or the communication channel isn't established.

Related

Companion issue filed on llama.cpp for namespace/web_search handling.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    mcpIssues related to the use of model context protocol (MCP) servers
    custom-modelIssues related to custom model providers (including local models)
    tool-callsIssues related to tool calling
    on Jun 8, 2026
  2. github-actions commented on Jun 8, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. Aydin-ab commented on Jul 9, 2026

    @Aydin-ab

    Hi I face the same issue, same model, setup, but with brave search MCP
    Did you manage to solve it ?

  4. madmax24-ubuntu commented on Aug 18, 2026

    @madmax24-ubuntu

    For anyone still hitting this with llama.cpp/Qwen, I published the compatibility proxy I ended up using in production: https://github.com/madmax24-ubuntu/codex-proxy-llama.cpp

    It fixes the custom Responses-provider path by flattening Codex MCP namespace tools for llama.cpp and restoring them on the way back, and it also normalizes native apply_patch, tool history replay, SSE events, reasoning, and compaction. My primary test case is local Qwen on llama.cpp with Codex CLI/IDE.

    Since this issue specifically uses Qwen3.6-27B + llama.cpp, it should be a close match. The repo includes an automatic installer and doctor.py so it can be tested without replacing the user's normal Codex config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcustom-modelIssues related to custom model providers (including local models)mcpIssues related to the use of model context protocol (MCP) serverstool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions