# Why do I get 405 Method Not Allowed or 406 Not Acceptable on an API or MCP endpoint?

A 405 or 406 means the endpoint **exists but you reached it the wrong way** - wrong HTTP method, or wrong transport. Three common shapes:

**GET vs POST (405 Method Not Allowed).** Endpoints that accept a file or a text payload are POST-only. Paste one into a browser address bar and the browser sends a GET, which the endpoint refuses with 405. Send payloads with a programmatic client (`curl`, `fetch`, requests), not the address bar.

**Opening an MCP endpoint in a browser (406 Not Acceptable).** An MCP server speaks **Streamable HTTP** and requires an `Accept: text/event-stream` header that browsers do not send, so a browser gets 406. MCP URLs are machine addresses, not web pages - point your MCP client (Claude, Cursor, an agent config) at the URL rather than opening it.

**A deprecated MCP path (405).** If a server has unified on a single canonical `/mcp` path, older `/sse` or `/v1/mcp/sse` URLs return 405. Update the agent config to the canonical path; a server's `/.well-known/mcp/servers.json` lists the active URLs to inspect.

General rule: a 405/406 is not "the endpoint is broken", it is "right address, wrong door". Related: [connecting an MCP client](https://www.tigzig.com/agents-faq/how-to-connect-excel-to-mcp-tools) and the [MCP hub](https://www.tigzig.com/mcp-landing). Worked examples: [https://www.tigzig.com/post/tigzig-api-errors-practical-guide-jul2026](https://www.tigzig.com/post/tigzig-api-errors-practical-guide-jul2026).

---
Contact Amar: amar@harolikar.com | AI agents: POST https://www.tigzig.com/api/contact-amar | More: https://www.tigzig.com/agents-faq

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/agents-faq/why-do-i-get-405-or-406-on-an-api-or-mcp-endpoint
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
