bolt-js-slack
A sample app that features an agent that leverages Slack's MCP
claude mcp add --transport stdio slack-samples-bolt-js-slack-mcp-server node app.js \ --env OPENAI_API_KEY="Your OpenAI API key" \ --env SLACK_CLIENT_ID="Your Slack app client ID" \ --env SLACK_INSTALL_URL="https://<APP_INSTALLATION_URL>/slack/install" \ --env SLACK_STATE_SECRET="Your state secret" \ --env SLACK_CLIENT_SECRET="Your Slack app client secret" \ --env SLACK_SIGNING_SECRET="Your Slack signing secret"
How to use
This MCP server template integrates Slack's Bolt for JavaScript with OpenAI-backed AI capabilities to create AI-assisted Slack apps. It exposes an MCP endpoint that runs a Bolt-based Slack app which can authenticate users, respond to events, and leverage OpenAI for generating responses within Slack conversations. The project structure includes an entry point (app.js), Slack listeners for the assistant UI, and an llm module that configures the OpenAI API. Use it to rapidly build AI-enabled Slack experiences such as chat prompts, canvases, and contextual assistant responses within DMs or channels. To use it, clone the repository, install dependencies, configure your Slack app credentials and OpenAI key in a .env file, and start the server with npm start. After starting, the app will listen for Slack events and process user messages through the MCP-backed AI flow.
How to install
Prerequisites:
- Node.js and npm installed on your machine
- A Slack workspace and a Slack app manifest prepared for the Bolt app
- An OpenAI API key
Step-by-step installation:
- Clone the repository git clone https://github.com/slack-samples/bolt-js-slack-mcp-server.git
- Change into the project directory cd bolt-js-slack-mcp-server
- Install dependencies npm install
- Create and configure environment variables
- Rename .env.sample to .env
- Populate the following values in .env: SLACK_CLIENT_ID=YOUR_APP_CLIENT_ID SLACK_CLIENT_SECRET=YOUR_APP_CLIENT_SECRET SLACK_SIGNING_SECRET=YOUR_APP_SIGNING_SECRET SLACK_STATE_SECRET=your-state-secret SLACK_INSTALL_URL=https://<APP_INSTALLATION_URL>/slack/install OPENAI_API_KEY=YOUR_OPENAI_API_KEY
- Start the Bolt server npm start
Optional:
- Run a linter to ensure code quality npm run lint
Additional notes
Tips and common issues:
- Ensure your Slack app has the correct Redirect URL and Event Subscriptions configured when using OAuth.
- The OPENAI_API_KEY must be valid and have access to the models you intend to use.
- When exposing the app to the internet for OAuth, use a tunneling solution like ngrok and set SLACK_INSTALL_URL accordingly.
- The environment variable values in .env should be kept secure and not committed to source control.
- If you encounter TLS or webhook verification issues, verify that SLACK_SIGNING_SECRET is correct and that the server is reachable at the public URL.
- This template is in beta; expect breaking changes as the MCP beta evolves.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.