Not a client bug I believe. A 405 means the MCP server rejected the HTTP method for tools list. The Responses runtime first fetches the tool list from the server then caches it. You cannot force a different HTTP method from the client. (cookbook.openai.com)
Long instructions can trigger a fresh tools list fetch if the previous list is not present in context. Reduce repeated imports by limiting the surface area with allowed_tools. This shrinks payloads and avoids re listing. (cookbook.openai.com)
Validate your Supabase MCP endpoint with a direct probe
Expect 200 with a tools array. If you receive 405 your endpoint is not exposing POST tools list at that path. Fix the server route or switch to its SSE endpoint if that is what it exposes. Use the MCP Inspector to confirm. (developers.openai.com)
Recommended mitigations
• Use the server SDK’s Streamable HTTP transport and keep the canonical path at /mcp which exposes list and call endpoints. (developers.openai.com)
• Keep the same server_url across turns and always resend headers. (cookbook.openai.com)
• Narrow the visible tools with allowed_tools to prevent re imports and lower token overhead. (cookbook.openai.com)
• Test with the MCP Inspector. Verify that List Tools succeeds and that Call Tool works with the same headers. (developers.openai.com)
Example Responses API call that pins headers and limits tools
from openai import OpenAI
client = OpenAI()
resp = client.responses.create(
model="gpt-4o-mini",
tools=[
{
"type": "mcp",
"server_label": "supabase",
"server_url": "https://mcp.supabase.com/mcp?project_ref=yuwfgpeznezrzfdxsyep",
"server_description": "Supabase MCP",
"require_approval": "never",
"allowed_tools": ["execute_sql"], # only import what you need
"headers": {"Authorization": "Bearer sbp_8ce8..."}
}
],
input="Run SELECT 1 as ok"
)
print(resp.status, resp.output_text)
If the direct curl to tools list returns 405 fix the server to implement the Streamable HTTP tools list route or switch the client to its SSE endpoint. You cannot override the method from Responses. (developers.openai.com)
Hi, I am experiencing a similare behavior but I instead think this is a bug in openai’s MCP client implementation. I randomly receive a 405 “Method not allowed” because the client actually tries a GET request (POSTs work flawlessly) trying to open an HTTP streamable connecton. Acording to specificatons, the server is free to ignore the request and return a 405 error, but this actually breaks openai’s internal client.
See point 3 in the official documentation.