Slack gallery app ("Use this connection as an agent tool") fails with "Invalid permissions requested": bot OAuth endpoints + search:read scope don't match mcp.slack.com
Summary
Connecting the gallery Slack app with the method "Use this connection as an agent tool" (mcp_remote, serverUrl: https://mcp.slack.com/mcp) with your own OAuth app always fails on Slack's consent screen with "Invalid permissions requested". No Slack app setting fixes it, because the gallery definition pins OAuth endpoints and scopes that don't match what Slack's MCP server advertises.
Version
Paperclip 2026.916.0 (self-hosted, npx).
Steps to reproduce
- Create a Slack app at api.slack.com/apps (From scratch). Add the Paperclip callback URL (
…/api/tools/oauth/callback) as a Redirect URL. Add bot scopeschannels:read,chat:write. - In Paperclip: Apps → Slack → "Use this connection as an agent tool" → "Your OAuth app". Paste the Client ID and Client Secret, then connect.
- Slack's authorize page shows "Invalid permissions requested".
Diagnosis
packages/shared/src/app-definitions/slack.json (method with transport: mcp_remote) hardcodes:
"serverUrl": "https://mcp.slack.com/mcp",
"authorizationEndpoint": "https://slack.com/oauth/v2/authorize",
"tokenEndpoint": "https://slack.com/api/oauth.v2.access",
"scopesHint": ["channels:read", "chat:write", "search:read"]In server/src/services/tool-access.ts, a gallery method that has both endpoint hints skips discovery (hasCompleteGalleryEndpointHints), and scope is scopesHint joined with spaces.
Slack's MCP authorization server metadata (https://mcp.slack.com/.well-known/oauth-authorization-server, read 2026-09-24) says:
authorization_endpoint:https://slack.com/oauth/v2_user/authorizetoken_endpoint:https://slack.com/api/oauth.v2.user.access(a user token, not a bot token)scopes_supportedhaschannels:read,chat:write, andsearch:read.public,search:read.private,search:read.im,search:read.mpim,search:read.files,search:read.users. It has no plainsearch:read.
/oauth/v2/authorize treats scope as bot scopes, and search:read isn't a valid bot scope, so Slack rejects the request. Even with a valid scope set, the resulting bot token would be for the wrong flow for mcp.slack.com, which expects user tokens from oauth.v2.user.access.
Suggested fix
- Change the
mcp_remoteSlack method toauthorizationEndpoint: https://slack.com/oauth/v2_user/authorizeandtokenEndpoint: https://slack.com/api/oauth.v2.user.access, or drop the endpoint hints so discovery runs. - Replace
search:readwith scopes fromscopes_supported, e.g.channels:read chat:write search:read.public. - Setup copy: tell users to add the scopes under User Token Scopes (not Bot Token Scopes) in their Slack app.
Workaround we're using
Slack Incoming Webhook URL stored as an organization secret and bound to an agent env var. The agent posts JSON { "text": … } directly.
Source: paperclipai/paperclip