#13935·paperclip

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

Author: danmoc-88Created Sep 24, 2026Updated Sep 28, 2026

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

  1. 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 scopes channels:read, chat:write.
  2. In Paperclip: Apps → Slack → "Use this connection as an agent tool" → "Your OAuth app". Paste the Client ID and Client Secret, then connect.
  3. Slack's authorize page shows "Invalid permissions requested".

Diagnosis

packages/shared/src/app-definitions/slack.json (method with transport: mcp_remote) hardcodes:

json
"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/authorize
  • token_endpoint: https://slack.com/api/oauth.v2.user.access (a user token, not a bot token)
  • scopes_supported has channels:read, chat:write, and search:read.public, search:read.private, search:read.im, search:read.mpim, search:read.files, search:read.users. It has no plain search: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_remote Slack method to authorizationEndpoint: https://slack.com/oauth/v2_user/authorize and tokenEndpoint: https://slack.com/api/oauth.v2.user.access, or drop the endpoint hints so discovery runs.
  • Replace search:read with scopes from scopes_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.