Docs

Configure the Slack MCP Server

Updated 1 min read

Overview

Slack operates an official hosted MCP server at mcp.slack.com for channels, threads, messages, canvases, and user search. Access is authorized through OAuth via a Slack app you register yourself.

1. Configure Slack

  1. Go to api.slack.com/apps and select Create New App → Blank app. Name the app (for example, “Dtwo Gateway”) and choose the workspace it should connect to.
  2. Open OAuth & Permissions and add the Bot Token Scopes your agents need — for example search:read.public, channels:history, and chat:write. Add a Redirect URL matching your gateway’s OAuth callback URL, found in the Configuration section for your gateway in the Dtwo UI.
  3. Open Basic Information → App Credentials and copy the Client ID and Client Secret.

2. Add the MCP server to your gateway config

In the mcp_servers section of your gateway configuration add the following entry:

  - name: slack
    description: "Slack's official hosted MCP server for channels, messages, and canvases."
    url: https://mcp.slack.com/mcp
    transport_type: streamablehttp
    authentication:
      type: oauth
      grant_type: authorization_code
      scopes:
        - search:read.public
        - channels:history
        - chat:write
      client_id: "<CLIENT_ID>"
      client_secret: "<CLIENT_SECRET>"
      authorization_url: "https://slack.com/oauth/v2/authorize"
      token_url: "https://slack.com/api/oauth.v2.access"
      redirect_uri: "<CALLBACK_URL>"

Replace the placeholder values:

  • <CLIENT_ID> and <CLIENT_SECRET> — come from the Slack app you created in step 1.
  • <CALLBACK_URL> — the same Redirect URL you set in step 1, found in the Configuration section for your gateway in the Dtwo UI.

3. Deploy and verify

Save the configuration and deploy the gateway.

Then, in your AI client, ask it to authorize Slack via the gateway. This opens the Slack login screen — sign in as the user whose permissions the agent should inherit, and approve the consent prompt. Once authorized, confirm the server’s tools appear and run a quick call to make sure the connection works.


Having trouble? Email support@dtwo.ai.