# Slack

Connect your company's Slack workspace to Cakewalk's MCP Gateway. Every agent tool call against Slack passes through the gateway and is evaluated against your Policies.

## Requirements

* Slack workspace admin who can create apps in `api.slack.com/apps`.

## Required Scopes

User token scopes the OAuth app must request:

```
search:read.public
search:read.private
search:read.mpim
search:read.im
search:read.files
search:read.users
chat:write
channels:history
groups:history
mpim:history
im:history
canvases:read
canvases:write
users:read
users:read.email
```

## Step 1: Create a Slack App

1. Open <https://api.slack.com/apps?new_app=1>.
2. Select **From a manifest**.
3. Choose your company's workspace.

After the prompts, you land on the app's Basic Information page.

## Step 2: Configure the Redirect URL

1. Select **OAuth & Permissions** from the left sidebar.
2. Scroll to **Redirect URLs**.
3. Paste this URL:

```
https://mcp-gateway.getcakewalk.io/api/v1/Auth/Callback
```

4. Save.

## Step 3: Add the Required Scopes

On the same **OAuth & Permissions** page, scroll to the **Scopes** section and add every scope listed in [Required Scopes](#required-scopes) above.

## Step 4: Enable MCP on the App

1. Open **Agents & AI Apps** in the sidebar.
2. Toggle **Model Context Protocol** to On.

## Step 5: Install the App to Your Workspace

Install the app to your workspace from the **OAuth & Permissions** page. Slack will not surface a usable Client ID and Client Secret until installation completes.

## Step 6: Paste Credentials Into Cakewalk

1. Back on the Slack app's Basic Information page, copy the Client ID and Client Secret.
2. Open <https://app.getcakewalk.io>.
3. Go to All Connections.
4. Find Slack.
5. Click Edit credentials.
6. Paste the Client ID and Client Secret.
7. Save.

## Verifying It Works

The Slack Connection card flips to Active on All Connections. From an agent platform connected to Cakewalk, ask the agent to search Slack for a recent message. If Slack returns results, the Connection is live.

## Troubleshooting

* Invalid redirect URI on consent: the value in **Redirect URLs** must match `https://mcp-gateway.getcakewalk.io/api/v1/Auth/Callback` exactly, with no trailing slash.
* Missing scope errors after authentication: confirm every scope in [Required Scopes](#required-scopes) is added under **OAuth & Permissions**, then reinstall the app to your workspace.

## Learn More

* [Develop a Slack MCP app](https://docs.slack.dev/ai/slack-mcp-server/developing/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-connections/slack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
