
本页由 AI 翻译,技术细节请以原文为准。 查看原文
利用Slack的MCP的代理软件
概览
QQ:本模板展示了目前处于β中且尚未被所有开发者广泛使用的MCP功能. 这里显示的功能正在测试中,在普遍可用之前可能会有变化. 这个用于JavaScript模板的Bolt演示了如何在Slack中构建AI Apps,以杠杆作用于Slack MCP服务器. 使用OpenAI的模型,可以定制为各种提示. 在启动前, 请确定您拥有一个开发工作空间, 允许您安装应用程序 。 如果你没有一套, 加入 Slack 开发者计划, 用于独家访问沙盒环境, 用于构建和测试您的应用程序, 工具, 以及创建用于帮助您构建和成长的资源 。 安装 Slack MCP 和 Swill 插件, 这样您的编码代理可以创建、 运行和部署 Slack apps, 查找 Web API 方法和范围, 并且不猜测地构建 Block Kit 。 使用您的代理标识符安装 npx 技能 : 1. 联合国.
概述(AI 翻译)
- ** 贝塔通知**: 本模板展示了目前处于β状态且尚未被所有开发者广泛使用的MCP功能. 这里显示的功能正在测试中,在普遍可用之前可能会有变化.
这个用于JavaScript模板的Bolt演示了如何在Slack中构建AI Apps,以杠杆作用于Slack MCP服务器.
使用OpenAI的模型,可以定制为各种提示.
□ 设置
在启动前, 请确定您拥有一个开发工作空间, 允许您安装应用程序 。 如果你没有一套,
QQ 开发者程序
加入 Slack 开发者计划, 用于独家访问沙盒环境, 用于构建和测试您的应用程序, 工具, 以及创建用于帮助您构建和成长的资源 。
Claude 代码、代码、光标和其他编码代理
安装 Slack MCP 和 Swill 插件, 这样您的编码代理可以创建、 运行和部署 Slack apps, 查找 Web API 方法和范围, 并且不猜测地构建 Block Kit 。
克劳德密码
在 Claude 代码会话中运行 :
• 代码x
在您的终端运行 :
QQ 光标
在光标代理聊天中运行 :
其他代理人
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Slack MCP Server AI Agent Template (Bolt for JavaScript)
⚠️ Beta Notice: This template demonstrates MCP functionality that is currently in beta and not yet widely available to all developers. The functionality shown here is being tested and may change before general availability.
This Bolt for JavaScript template demonstrates how to build AI Apps in Slack that leverage the Slack MCP server.
Models from OpenAI are used and can be customized for prompts of all kinds.
Setup
Before getting started, make sure you have a development workspace where you have permissions to install apps. If you don’t have one setup, go ahead and create one.
Developer Program
Join the Slack Developer Program for exclusive access to sandbox environments for building and testing your apps, tooling, and resources created to help you build and grow.
Claude Code, Codex, Cursor, and Other Coding Agents
Install the Slack MCP and Skills Plugin so your coding agent can create, run, and deploy Slack apps, look up Web API methods and scopes, and build Block Kit without guessing.
Claude Code
Run this in a Claude Code session:
/plugin install slack@claude-plugins-official
Codex
Run this in your terminal:
codex plugin marketplace add slackapi/slack-skills-plugin
codex plugin add slack@slack
Cursor
Run this in a Cursor Agent chat:
/add-plugin slack
Other agents
Install the skills with npx skills, using your agent’s identifier:
npx skills add slackapi/slack-skills-plugin -y -a
# For example, OpenCode
npx skills add slackapi/slack-skills-plugin -y -a opencode
Installation
Create a Slack App
- Open https://api.slack.com/apps/new and choose “From an app manifest”
- Choose the workspace you want to install the application to
- Copy the contents of manifest.json into the text box that
says
*Paste your manifest code here*(within the JSON tab) and click Next - Review the configuration and click Create
Clone the project
# Clone this project onto your machine
git clone https://github.com/slack-samples/bolt-js-slack-mcp-server.git
Environment Variables
Before you can run the app, you’ll need to store some environment variables.
- Rename
.env.sampleto.env. - Open your apps setting page from this list, click Basic Information in the left hand menu, then copy the following values into your
.envfile:
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'
安装
npx skills add slackapi/slack-skills-plugin -y -a <agent>