# MCP OAuth callback 404 on localhost:8787 after Allow (Slack + Gmail plugins)

**URL:** <https://forum.cursor.com/t/mcp-oauth-callback-404-on-localhost-8787-after-allow-slack-gmail-plugins/168058>\
**Category:** Bug Reports\
**Tags:** mcp, plugins, slack, login\
**Created:** [August 11, 2026, 9:12pm UTC](https://forum.cursor.com/t/mcp-oauth-callback-404-on-localhost-8787-after-allow-slack-gmail-plugins/168058 "2026-08-11T21:12:19Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [August 12, 2026, 5:44am UTC](https://forum.cursor.com/t/mcp-oauth-callback-404-on-localhost-8787-after-allow-slack-gmail-plugins/168058/5 "2026-08-12T05:44:23Z")

</div>

Hey, thanks for the detailed report. It really helped with debugging.

The clue is in the error text: “Error response / Error code: 404 / Message: File not found. / Nothing matches the given URI.” This is not a Cursor page, it is the default error page from Python `http.server`. That means port `8787` on your Mac is already taken by another local process, and after you click Allow the redirect goes to that process instead of Cursor’s callback listener. That’s also why `Cmd+Q` didn’t help. The port is held by a third party process, not Cursor.

Workaround:

- Find what’s listening on port 8787:

```auto
lsof -nP -iTCP:8787 -sTCP:LISTEN

```

- Stop that process. It’s often `python3 -m http.server`, a Dask dashboard, or `wrangler dev` since they default to 8787.
- Click Authorize for Slack or Gmail again. The port is only needed during the handshake, after that you can use it again.

This is basically the same fixed port `8787` redirect behavior we’re tracking. It has come up in other threads too: [Cursor OAuth redirect\_uri uses fixed localhost:8787 port](https://forum.cursor.com/t/cursor-oauth-redirect-uri-uses-fixed-localhost-8787-port/165604), [OAuth redirect URI changed from cursor:// to http://localhost for Streamable HTTP MCP](https://forum.cursor.com/t/oauth-redirect-uri-changed-from-cursor-to-http-localhost-for-streamable-http-mcp/165019). I can’t share an ETA yet, but I’ll post here when there’s an update.

Let me know if the workaround helped.

---

_[View the full topic](https://forum.cursor.com/t/mcp-oauth-callback-404-on-localhost-8787-after-allow-slack-gmail-plugins/168058)._
