- Home
- MCP servers
- Slack
Slack
- typescript
0
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"paterapatera-slack-mcp": {
"command": "slack-mcp",
"args": [],
"env": {
"SLACK_TEAM_ID": "T1234567890",
"SLACK_USER_TOKEN": "xoxb-your-token-here",
"SLACK_CHANNEL_IDS": "C1234567890,C0987654321"
}
}
}
}You run a Slack MCP Server that lets an AI agent search and retrieve Slack messages efficiently. It adheres to the MCP protocol and uses the Slack Web API to query workspace messages, with optional channel filtering and built-in handling for Slack rate limits and errors. You can connect MCP clients to this server to perform fast, scoped searches across your Slack data.
How to use
Connect an MCP client to the Slack MCP Server to search messages. You can run the server locally or expose it via a client-friendly command. Configure the client to point to the local stdio server or use the globally linked Slack MCP executable. When using the local setup, provide the required Slack credentials and channel filters so searches stay scoped to your workspace.
Two practical usage patterns are supported:
- Run via a globally linked command after setting up local environment variables. This lets you start the MCP server as a stand-alone process that clients can reach through its canonical command name.
- Run via a local path, pointing to the built server index file, which is useful for development or custom deployments.
How to install
# Prerequisites
bun --version
node --version
# 1) Clone the project
git clone https://github.com/paterapatera/slack-mcp.git
cd slack-mcp
# 2) Install dependencies
bun install
# 3) Build the project
bun run build
# 4) Run the server directly (development use)
bun dist/index.js
Recommended installation flow for development with client integration:
- Build, then link the project so you can run the server from any location.
- Use a local environment to point the MCP client to the built index file or to the linked command.
Configuration and usage notes
Environment variables
- SLACK_USER_TOKEN: Slack User Token that starts with xoxb- or xoxp-
- SLACK_TEAM_ID: (optional) Slack team/workspace ID
- SLACK_CHANNEL_IDS: (optional) comma-separated channel IDs to constrain searches Usage notes
- The server requires a valid Slack User Token with the necessary scopes (including search:read).
- If you use the local build path, ensure the built file is accessible at the path you specify in the startup command.
{
"mcpServers": {
"slack_mcp": {
"command": "bun",
"args": ["dist/index.js"],
"env": {
"SLACK_USER_TOKEN": "xoxb-your-token-here",
"SLACK_TEAM_ID": "T1234567890",
"SLACK_CHANNEL_IDS": "C1234567890,C0987654321"
}
}
}
}
Troubleshooting
If the server doesn’t start or searches fail, verify the following: the SLACK_USER_TOKEN is correctly set and starts with xoxb- or xoxp-, the dist/index.js file exists after building, and the token has the required scopes (especially search:read). Check network access and Slack API rate limits.
If you encounter issues with MCP clients, ensure logs are emitted to stdout (not only stderr) and consult the client documentation for MCP-specific error handling and retry behavior.
Notes and tips
This server is designed for local development using bun link for convenient client integration. It is not intended for npm publishing. To use with an MCP client, either rely on the globally linked slack-mcp command or point the client at the local built file.
Tests and development helpers
For unit tests and development tooling, run the usual build and test commands as described in the project setup. Use the built artifacts for local MCP client testing.
Available tools
search_messages
Search messages within the Slack workspace using the provided query and limit, returning matching messages with metadata such as channel, user, and timestamp.