Code fix to host research_server.py in Render

Hi all,

In the final exercise where you run the server in the Render cloud service, I found that you need to change the instantiation of the mcp object around line 10 to “mcp = FastMCP(“research”, host=“0.0.0.0”, port=10000)” - adding the host and port mapping to match what Render requires by default. At least that’s what I had to do to make it work.

Good Luck.
Fraser

1 Like

Thanks for your report.

Even with the changes proposed above I do get a deployment error.
Deploy failed
Timed out

Port scan timeout reached, no open ports detected on 0.0.0.0. Detected open ports on localhost – did you mean to bind one of these to 0.0.0.0?

June 12, 2025 at 11:47 AM

The log:
[notice] A new release of pip is available: 24.0 → 25.1.1

Jun 11 11:05:59 PM

[notice] To update, run: pip install --upgrade pip

Jun 11 11:06:03 PM

==> Uploading build…

Jun 11 11:06:09 PM

==> Uploaded in 4.6s. Compression took 1.0s

Jun 11 11:06:09 PM

==> Build successful :tada:

Jun 11 11:06:10 PM

==> Deploying…

Jun 11 11:06:25 PM

==> Running ‘python research_server.py’

Jun 11 11:06:30 PM

INFO: Started server process [102]

Jun 11 11:06:30 PM

INFO: Waiting for application startup.

Jun 11 11:06:30 PM

INFO: Application startup complete.

Jun 11 11:06:30 PM

INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)

Jun 11 11:06:31 PM

INFO: 127.0.0.1:44856 - “HEAD / HTTP/1.1” 404 Not Found

Jun 11 11:07:18 PM

==> No open ports detected on 0.0.0.0, continuing to scan…

Jun 11 11:07:18 PM

==> Docs on specifying a port: Web Services – Render Docs

Jun 11 11:08:19 PM

==> No open ports detected on 0.0.0.0, continuing to scan…

Jun 11 11:08:19 PM

==> Docs on specifying a port: Web Services – Render Docs

Jun 11 11:09:20 PM

==> No open ports detected on 0.0.0.0, continuing to scan…

Jun 11 11:09:20 PM

==> Docs on specifying a port: Web Services – Render Docs

Jun 11 11:10:21 PM

==> No open ports detected on 0.0.0.0, continuing to scan…

Jun 11 11:10:21 PM

==> Docs on specifying a port: Web Services – Render Docs

Jun 11 11:11:22 PM

==> No open ports detected on 0.0.0.0, continuing to scan…

Jun 11 11:11:22 PM

==> Docs on specifying a port: Web Services – Render Docs

Jun 11 11:11:27 PM

==> Port scan timeout reached, no open ports detected on 0.0.0.0. Detected open ports on localhost – did you mean to bind one of these to 0.0.0.0?

Jun 11 11:11:27 PM

==> Docs on specifying a port: Web Services – Render Docs

Jun 11 11:21:11 PM

==> Timed out: Port scan timeout reached, no open ports detected on 0.0.0.0. Detected open ports on localhost – did you mean to bind one of these to 0.0.0.0?

Jun 11 11:21:11 PM

==> Common ways to troubleshoot your deploy: Troubleshooting Your Deploy – Render Docs