# 424 error code on MCP server connection

**URL:** <https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520>\
**Category:** Bugs\
**Tags:** mcp\
**Created:** [May 28, 2025, 4:09pm UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520 "2025-05-28T16:09:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marco\_Yakkyo](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/marco_yakkyo/32/511974_2.png) [@Marco\_Yakkyo](https://community.openai.com/u/Marco_Yakkyo)\
**Post date:** [May 28, 2025, 4:09pm UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/1 "2025-05-28T16:09:27Z")

</div>

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’:

```auto
            "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:

```auto
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**

---

<div class="post-metadata">

**Author:** ![mathisxy](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/mathisxy/32/449499_2.png) [@mathisxy](https://community.openai.com/u/mathisxy)\
**Post date:** [June 15, 2025, 8:57pm UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/2 "2025-06-15T20:57:36Z")

</div>

I had this problem too and I figured out, as you guessed, that it works when I use https on my server.

---

<div class="post-metadata">

**Author:** ![jpja](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jpja](https://community.openai.com/u/jpja)\
**Post date:** [July 18, 2025, 12:00pm UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/3 "2025-07-18T12:00:09Z")

</div>

> [@Marco\_Yakkyo](#):
>
> r MCP server via the following co

Just one question here, the use of this type of mcp (close to the hostedMCP tool) is only possible against a server that is publicly accessible (in the internet)?  
Or we can do our private mcp-server and the Agent will reach it like this also?

---

<div class="post-metadata">

**Author:** ![Marco\_Yakkyo](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/marco_yakkyo/32/511974_2.png) [@Marco\_Yakkyo](https://community.openai.com/u/Marco_Yakkyo)\
**Post date:** [July 23, 2025, 12:43pm UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/4 "2025-07-23T12:43:09Z")

</div>

So yes you can build easily your mcp server via, e.g., some python code.  
But you must run it over https for OpenAI to even consider it

---

<div class="post-metadata">

**Author:** ![Ricardo\_Filipe](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ricardo_filipe/32/658575_2.png) [@Ricardo\_Filipe](https://community.openai.com/u/Ricardo_Filipe)\
**Post date:** [July 26, 2025, 1:25pm UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/5 "2025-07-26T13:25:31Z")

</div>

Is it possible to run the MCP through http instead of https, for development purposes, using the openai sdk?

---

<div class="post-metadata">

**Author:** ![lukecage23](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/lukecage23/32/687846_2.png) [@lukecage23](https://community.openai.com/u/lukecage23)\
**Post date:** [October 9, 2025, 8:29am UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/6 "2025-10-09T08:29:13Z")

</div>

OpenAI access internet exposed mcp servers. So you have to expose your local machine using ngrok or similar router

---

<div class="post-metadata">

**Author:** ![FrancisAB](https://avatars.discourse-cdn.com/v4/letter/f/ac8455/32.png) [@FrancisAB](https://community.openai.com/u/FrancisAB)\
**Post date:** [October 16, 2025, 6:28am UTC](https://community.openai.com/t/424-error-code-on-mcp-server-connection/1271520/7 "2025-10-16T06:28:29Z")

</div>

I am trying to have a similar setup. If possible, could you share the client setup info? Please refer to my [post](https://community.openai.com/t/how-to-integrate-openai-agent-with-mcp-server-using-vscode-github-copilot/1362654)
