424 error code on MCP server connection

Hi,
We’ve been working on MCP implementation; after intensive testing, we came with a simple server running a streamable-http transport type server.
We can successfully inspect the serve using npx @modelcontextprotocol/inspector (listing tools, calling tools, fetching resources …)
and we can also successfully connect and execute tools via LLM using the Github Copilot tool implementation in VSCode.

All we need is the ‘connection json’:

            "my-sse-server": {
                "type": "http",
                "url": "http://machine-ip:3000/mcp/",
            }

We successfully made a similar server MCP of type SSE with similar results.

But, when trying to feed an Agent with our MCP server via the following code:

response = client.responses.create(
    model="gpt-4.1-mini",
    input=[{
        "role": "user",
        "content": "read wiki about redis and summarize it"
    }],
    instructions="You are a helpful assistant. Use the MCP server(s) to retrieve useful tools and use them in case you need them.",
    reasoning=None,
    tools=[
        # {
        #     "type": "mcp",
        #     "server_label": "deepwiki",
        #     "server_url": "https://mcp.deepwiki.com/mcp",
        #     "allowed_tools": [
        #         "read_wiki_structure",
        #         "read_wiki_contents",
        #         "ask_question"
        #     ],
        #     "require_approval": "never"
        # },
        {
            "type": "mcp",
            "server_label": "custom_mcp",
            "server_url": "http://machine-ip:3000/mcp/",
            "require_approval": "never"
        }
    ],
    temperature=0.8,
    max_output_tokens=2048,
)

we get an 424 error: the server does not print any log, like if the OpenAI never tried to send a request.

As shown in the code above, if we use the (commented) deepwiki MCP server, the call to responses.create works perfectly!

Any help on this? Thanks

PS: our first guess is that we are running the server over http instead of https