The page loads in your browser, but MCP Fetch rejects the request to localhost.

Fast answer: The MCP Fetch 2026 update treats requests that resolve to private, loopback, or metadata addresses as blocked by default. Confirm the destination IP and every redirect first. Enable the documented private-IP exception only for a trusted, isolated test, and restore the default restriction afterward.

This guide is for AI Agent developers testing local web apps and platform engineers diagnosing a Fetch upgrade.
If the request is part of a shared or production workflow, use an isolated test environment rather than weakening network restrictions for everyone.

Last updated: October 13, 2026. We checked the behavior against the official MCP Servers v1.0.0 release record, the Fetch change record, and the current Fetch README.

MCP Fetch 2026 update: start with the resolved address

The Fetch update included in MCP Servers v1.0.0 lists the Fetch 2026.10.10 release and confirms the default behavior: requests to private, loopback, and metadata addresses are rejected. The release also documents an explicit option to allow private IP addresses. Check the release notes before changing a local installation, because the intended behavior is not the same as an application being down.

The first diagnostic question is not “Does the URL look local?” It is “What address does the Fetch process try to reach?” A hostname can resolve to a loopback or private address even when it does not look like a literal IP. A public page can also redirect to a restricted destination. In either case, a rejection can be the expected security control doing its job.

For IPv4, the private ranges defined in RFC 1918 are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Loopback is a separate address category; IPv6 has its own special-purpose and loopback ranges. Use the IANA IPv4 registry and IANA IPv6 registry when you need to classify an address that is not covered by the familiar private IPv4 blocks.

That distinction matters in practice. localhost, 127.0.0.1, and ::1 refer to loopback destinations, while a typical home or office LAN address may fall in an RFC 1918 range. A public IP is neither of those simply because a developer can open it from a laptop. The Fetch process’s network path—not the browser’s—is the one you need to diagnose.

First-step check: separate an address block from a server failure

Before changing a flag or restarting a service, verify the target independently. Use a trusted local request tool to test the same URL from the environment that runs Fetch. Then inspect the development server’s listening address and its own request log. A successful browser request from another device or another container does not prove that the Fetch process can reach the same endpoint.

Record these details for a failed request:

  • The exact URL submitted to Fetch, including scheme, hostname, port, and path.
  • The resolved IPv4 and IPv6 addresses, if available, from the Fetch runtime’s network context.
  • The address and port on which the development server is listening.
  • The HTTP response or Fetch error, plus any redirect status and Location value.
  • Whether a proxy, container network, VPN, or host-to-container bridge sits between Fetch and the app.

Do not use a URL suggested by a model as evidence that the server is reachable. Model output can contain a plausible hostname or port that is wrong for the runtime. Confirm the endpoint through the app’s launch configuration, trusted request logs, or the test harness that started the server.

One easy-to-miss mismatch is binding. A development server listening only on 127.0.0.1 may accept requests from processes in the same network namespace, but not from a Fetch process running in another container or VM. Conversely, binding a service to every interface can make it reachable from more places than intended. Fix the actual namespace or bind-address mismatch; do not assume that allowing private IPs will repair a service that is listening on the wrong interface.

Step 1: check the hostname and listener

Resolve the hostname from the environment where the Fetch server runs, not just from your desktop shell. If the hostname returns multiple addresses, record each result. Compare them with the service’s listener and with the address categories in the IANA registries. A hostname that alternates between a public address and a private or loopback address can explain why a request appears intermittent.

Then check the application listener. Confirm the process is running, the expected port is open inside its network namespace, and the service is bound to an address reachable from Fetch. If Fetch and the app run in separate containers, verify the container network and service-name configuration rather than substituting localhost automatically: in many container layouts, localhost points back to the container making the request.

This is where an AI Agent MCP Server setup can complicate the diagnosis. The agent, Fetch server, and development app may run in different processes or network namespaces. A URL that works for the agent host may not work from the Fetch server. Treat each component as a separate network client until you have verified their placement.

Step 2: follow public URLs through every redirect

A request that starts at a public website is not necessarily a public-only request. The server can respond with a redirect to a local hostname, a private IP, or another restricted destination. The updated Fetch check applies to redirect requests too, so the first URL can be accepted while a later hop is rejected.

Capture the complete request chain rather than testing only the original URL. For each hop, note the status code, the Location value, the hostname, and the address resolution from the Fetch environment. Stop at the first destination that resolves to a blocked address. That identifies which redirect triggers the rejection and prevents an unrelated failure in the original public site from sending you down the wrong path.

If you control the redirecting application, change the test route to point to an approved test endpoint or run both services in a controlled environment where access is intentional. If you do not control it, do not treat the redirect as permission to reach an internal destination. Public-to-private redirects are a common source of confusion precisely because the starting URL looks harmless.

A redirect trace is evidence about the request path, not permission to bypass a restriction. Keep the trace in test logs, but avoid publishing internal hostnames, tokens, or private addresses in shared bug reports.

Step 3: investigate changing DNS and proxy boundaries

If the same hostname sometimes succeeds and sometimes fails, compare the actual DNS answers and request path for both outcomes. Possible causes include multiple A or AAAA records, different resolvers, a proxy that performs its own name resolution, or a service whose DNS answer changes between checks. This is particularly important when the name is intended to be public but can resolve to a private address under some conditions.

The Fetch source code’s address-validation logic is useful when you need to understand which address checks the implementation performs. The Fetch README should remain your reference for the documented option and operating boundary. Do not infer more protection than those materials promise.

In particular, default blocking does not establish that every DNS-rebinding scenario or every proxy-resolution arrangement is covered. A proxy may resolve the destination outside the Fetch process’s direct DNS path, and network topology can change what an address means from the client’s point of view. MCP’s official security guidance also treats security as a combination of controls, not a guarantee supplied by one address filter.

Use an egress policy, network isolation, and service-level authentication where the risk warrants them. The Fetch restriction is a useful default boundary, but it is not a complete SSRF defense or a substitute for controlling what the runtime can reach.

Step 4: enable a private-IP exception only for a bounded test

If a test genuinely needs Fetch to read a local development server, the official materials document the --allow-private-network option. Verify its exact launch configuration in the Fetch README for the version and deployment method you use. Avoid copying a command from an unrelated wrapper or assuming that an option configured for one process also applies to another.

Treat the exception as a deliberate test setting, not a routine fix:

  1. Confirm that the target is a test service you control and that its resolved destination is expected.
  2. Run Fetch only in a trusted test environment, not in a shared production agent or a service that accepts untrusted prompts.
  3. Restrict the runtime’s network access to the services the test actually needs, where your deployment supports that boundary.
  4. Enable the documented option only for the test process or configuration that requires it.
  5. Run the request and verify the result using the application’s logs and the recorded request chain.
  6. Disable the exception after the test, restart or redeploy the process if needed, and verify that the default restriction is back in effect.
  7. Keep a short record of the reason, scope, and removal of the exception so it does not silently become a permanent setting.

The key trade-off is access versus blast radius. A local test may become simpler when Fetch can reach a private service, but the same permission can expose destinations that the agent should not query. If the test runs prompts or tools supplied by other people, use a separate environment with restricted network access rather than relying on operator intent alone.

Choose the smallest network change that solves the failure

  • Keep the default restriction — Fit: high when the requested page should be public, the caller is shared, or the resolved address is unexpected. Diagnose DNS and redirects; do not weaken the boundary to make an unexplained request pass.
  • Use a narrow private-IP exception — Fit: conditional when a trusted, isolated test must fetch from a local app and you can remove the exception immediately afterward. This is the documented route for intentional private-network testing, but it increases what the process may reach.
  • Move the test into an isolated environment — Fit: high for repeatable team tests when multiple developers need stable access to an app and an agent. Put the Fetch server and app in a controlled network arrangement, then document the allowed paths and cleanup.
  • Change the app’s binding or network placement — Fit: high when the listener is the real fault if the service is not reachable from Fetch’s network namespace. This addresses connectivity rather than changing Fetch’s address policy.

The ratings above are our decision aid, not measured performance scores. Choose based on who can influence the request, which addresses the runtime can reach, and whether the exception can be limited and removed. For teams maintaining several MCP reference servers, include this behavior in upgrade acceptance testing rather than treating MCP reference servers 1.0 as a guarantee that every earlier local-fetch workflow will continue unchanged.

Use this diagnostic checklist before changing production settings

  • [ ] Record the exact failing URL and the complete Fetch error.
  • [ ] Resolve the hostname from the Fetch runtime and record all relevant A and AAAA answers.
  • [ ] Classify the destination as public, private, loopback, or another special-purpose address using the IANA registries.
  • [ ] Confirm where Fetch and the target app run, including containers, VMs, proxies, and network namespaces.
  • [ ] Check the app’s listening address and port from the same network context as Fetch.
  • [ ] Trace every redirect and identify the first hop that reaches a restricted destination.
  • [ ] Compare DNS and proxy behavior between a successful request and a rejected request.
  • [ ] Verify the documented option and its scope against the README for the installed Fetch version.
  • [ ] If a private-IP exception is necessary, limit it to a trusted test process and verify that it is removed afterward.
  • [ ] Re-test with the default restriction restored before promoting the configuration.

If the failure remains ambiguous, keep the restriction enabled and reproduce the request in a disposable test environment. That preserves a useful security boundary while you determine whether the cause is DNS, a redirect, a listener mismatch, or a proxy path.

Frequently asked questions

Why does MCP Fetch reject localhost after an upgrade?

The Fetch update listed in the MCP Servers v1.0.0 release added default rejection for targets resolving to private, loopback, or metadata addresses. A local development URL can therefore fail even when the web app is healthy. Check the resolved address from Fetch’s runtime and distinguish a deliberate policy rejection from a connection error before restarting services or changing network settings.

How can Fetch access a local development server?

Use the documented --allow-private-network option only when a trusted, controlled test requires it, and confirm the correct launch configuration in the README for your installed version. Keep the exception scoped to that test process, limit the runtime’s reachable network where possible, and verify the default restriction is restored when testing ends. A container or listener mismatch may still need a separate fix.

Can a public URL redirect to a private address and be blocked?

Yes. A public starting URL can return a redirect whose next destination resolves to a private, loopback, or otherwise restricted address. Inspect every hop, including its Location value and resolved destination, to find where rejection occurs. Do not assume that the original public hostname makes the entire redirect chain safe or eligible for access.

What risks come with allowing private IP access?

The exception increases the destinations Fetch may be able to reach, which can matter if requests are influenced by untrusted prompts, tools, or users. It does not by itself guarantee protection against DNS rebinding or proxy-based resolution paths. Use isolation and egress controls, keep the exception out of shared production configurations, and remove it once the local test is complete.

For a one-off test, keeping Fetch beside the app in a disposable, isolated environment is usually safer than expanding access in a shared agent. If your current setup depends on a developer laptop, its network and DNS state can vary; a remote test host also requires deliberate routing and listener configuration, and it will not automatically make localhost refer to your laptop. When a clean macOS environment helps reproduce the test consistently, zekmac can provide a rental Mac for that bounded development workload. Review the available Mac plans and setup guidance before deciding; a Mac rental makes sense when the environment is temporary or needs isolation, not when a persistent local machine or a dedicated network appliance is the better fit.

FAQ

Why does MCP Fetch reject localhost after an upgrade?

The Fetch update listed in the MCP Servers v1.0.0 release added default rejection for targets resolving to private, loopback, or metadata addresses. A local development URL can therefore fail even when the web app is healthy. Check the resolved address from Fetch’s runtime and distinguish a deliberate policy rejection from a connection error before restarting services or changing network settings.

How can Fetch access a local development server?

Use the documented `--allow-private-network` option only when a trusted, controlled test requires it, and confirm the correct launch configuration in the README for your installed version. Keep the exception scoped to that test process, limit the runtime’s reachable network where possible, and verify the default restriction is restored when testing ends. A container or listener mismatch may still need a separate fix.

Can a public URL redirect to a private address and be blocked?

Yes. A public starting URL can return a redirect whose next destination resolves to a private, loopback, or otherwise restricted address. Inspect every hop, including its `Location` value and resolved destination, to find where rejection occurs. Do not assume that the original public hostname makes the entire redirect chain safe or eligible for access.

What risks come with allowing private IP access?

The exception increases the destinations Fetch may be able to reach, which can matter if requests are influenced by untrusted prompts, tools, or users. It does not by itself guarantee protection against DNS rebinding or proxy-based resolution paths. Use isolation and egress controls, keep the exception out of shared production configurations, and remove it once the local test is complete.

zekmac M4 Remote Node

Move Your Development Workflow to a Dedicated Mac

Rent a physical Mac mini from zekmac to run your development server in a dedicated macOS environment.