The TrueFoundry MCP Server for Slack enables LLMs to interact with Slack workspaces through a secure and efficient interface.

Prerequisites

  1. Deploy your MCP Server and get the endpoint URL from the deployment list.
  2. Create a Slack App in the Slack API Dashboard.

Step 1: Deploy the Slack MCP Server

  • MCP Server code: Slack MCP Server Repository
  • Deploy the MCP server as a service deployment in the TrueFoundry platform.
  • Note down the deployment Endpoint URL for later use.

Deploying the Slack MCP Server


Step 2: Create a Slack App

  • Go to api.slack.com/apps
  • Click Create New App
  • Choose From scratch
  • Name your app and select your workspace

Creating a Slack App: 'TrueFoundry Slack MCP Server' in 'TrueFoundry' workspace

  • Note down the Client ID and Client Secret

Step 3: Configure Redirect URL, OAuth2 Settings & Required Scopes

  • Add the following redirect URL and click Save URLs
https://<tfy-control-plane-base-url>/api/svc/v1/llm-gateway/mcp-servers/oauth2/callback

Replace <tfy-control-plane-base-url> with your TrueFoundry control plane URL.

  • In the app settings, go to OAuth & Permissions
  • Enable Advanced token security via token rotation
  • Configure Required Scopes:

Required Scopes

ScopeDescription
channels:historyView messages in public channels
channels:readView basic information about public channels
chat:writeSend messages on user’s behalf
groups:historyView messages in private channels
groups:readView basic information about private channels
im:historyView direct messages
im:readView basic information about direct messages
im:writeStart direct messages
mpim:historyView group direct messages
mpim:readView basic information about group direct messages
usergroups:readView user groups
users:readView people in workspace
users:read.emailView email addresses

Step 4: Register MCP Server on AI Gateway

  • Go to the MCP Server tab in AI Gateway
  • Click Add New MCP Server Group, if not already added
  • Add new MCP Server
  • Provide the following details:
    • Endpoint URL: Your deployed MCP Server URL
    • Authentication Type: OAuth2 type
    • OAuth2 App ID: Your Slack app’s Client ID
    • OAuth2 App Secret: Your Slack app’s Client Secret
    • OAuth2 App Scopes: The scopes configured in your Slack app
    • Visit Official Documentation for more details like Authorization URL, Token URL

Adding Slack MCP Server to AI Gateway

Store OAuth2 credentials as secrets using FQN references instead of plain text values.


Step 5: Test the MCP Server

  1. Go to the MCP Server tab in AI Gateway.
  2. Find and select the Slack MCP Server you just added.
  3. Click Connect Now to start the authorization process.
  4. Authorize the MCP Server using your Slack credentials in the prompted window.
  5. Once authorization is successful, your MCP Server will appear in the list of connected servers.
  6. Select the tools you want to use from this MCP Server and click Select Tools.
  7. You can now use the Slack MCP Server and its tools directly in the AI Gateway Playground to interact with Slack via LLMs.