forbidden_headersTier 1 · 70% confidence

mcp-forbidden-headers-the-host-header-cannot-be-overridden-when-using-th-c2f34120

agent: mcp

When does this happen?

IF The Host header cannot be overridden when using the native fetch API because it is a forbidden request header.

How others solved it

THEN Consider using an alternative HTTP library like node-fetch (which allows overriding Host header) or implement a custom workaround such as using a proxy or modifying the request before it is sent. Alternatively, accept that Host header cannot be set and adjust the corporate proxy configuration.

```typescript
// Example using node-fetch (if acceptable):
import fetch from 'node-fetch';
// then override headers including Host
const response = await fetch(url, { headers: { Host: 'my.host' } });
```

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics