Slack MCP: CLI login fails — redirect_uri mismatch (localhost:8787)

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Slack MCP authentication from the Cursor CLI fails during OAuth. After running agent mcp login slack, the browser opens to Slack’s authorization page and Slack shows an error that the redirect_uri is not registered. The URI the CLI uses is http://localhost:8787/callback for OAuth client id 3660753192626.8903469228982 (the official Slack MCP config from Cursor/Slack docs). Authorization never completes, so Slack MCP tools cannot be used from the CLI. The same Slack MCP integration can work from
the Cursor IDE (connected in Settings), but the CLI login flow fails independently.

Steps to Reproduce

  1. Ensure ~/.cursor/mcp.json (or project .cursor/mcp.json) contains the official Slack MCP server entry pointing at https://mcp.slack.com/mcp with auth.CLIENT_ID set to 3660753192626.8903469228982.
  2. In a terminal, run: agent mcp login slack.
  3. Allow the browser window to open to Slack’s OAuth page.
  4. Observe Slack’s error instead of a workspace/workspace-grant success screen.

Expected Behavior

After approving in the browser, the OAuth callback should hit the local listener successfully and the CLI should finish authentication so agent mcp list-tools slack works and the agent can call Slack MCP tools (e.g. slack_read_user_profile).

Operating System

Windows 10/11

Version Information

About Cursor CLI
CLI Version 2026.04.17-479fd04
Model Composer 2 Fast
Subscription Tier Enterprise
OS win32 (x64)
Terminal unknown
Shell cmd

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report.

This is a known issue with the CLI’s OAuth flow for Slack MCP. The CLI and IDE use different callback mechanisms for OAuth, and the one the CLI uses isn’t currently compatible with Slack’s OAuth configuration. That’s why the same setup works in the IDE but fails with agent mcp login slack. Our team is aware and working on it.

Workaround: You can use a stdio-based Slack MCP server with a Bot Token, which bypasses the OAuth flow entirely and works reliably in the CLI:

  1. Create a Slack App at api.slack.com/apps with a Bot Token (xoxb-...)

  2. Grant the needed OAuth scopes (channels:history, channels:read, chat:write, reactions:write, users:read, users.profile:read)

  3. Install the app to your workspace and save the Bot Token

  4. Update your mcp.json:

{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": {
"SLACK_TOKEN": "xoxb-your-token",
"SLACK_TEAM_ID": "your-team-id"
}
}
}
}

Stdio-based MCP servers don’t require OAuth and work reliably from the CLI. A few related threads with more context:

For reference: CLI MCP docs

Let me know if you have any questions about setting up the stdio option.

Also blocked by this. Please let us know once this is fixed!

Also blocked, following!

Also blocked, following

Same, need OAuth to just work via CLI.

Are there plans to fix this anytime soon? It is blocking a tool I’m trying to build.

Hey everyone,
The Slack MCP OAuth login issue in the CLI has been addressed in a recent Cursor update. Updating to the latest version should resolve this. Let me know if you’re still running into it!