Slack MCP
Enables Slack channel exploration and Salesforce account-to-channel reconciliation through LangSmith Gateway. Supports listing public/private channels, refreshing channel directory, and matching Salesforce accounts to Slack channels.
README
LangSmith Gateway-backed Slack MCP agent
This project exposes a Deep Agent graph through the LangSmith Deployment MCP
endpoint. The agent uses claude-sonnet-4-6 through LangSmith Gateway and can
list the private channels visible to the authenticated Slack identity, along
with all visible public channels.
The agent has seven Slack tools:
list_channels: all visible public and accessible private channels.list_eval_channels: every visible public and privateeval-channel.list_customer_channels: every visible public and privatecustomer-channel.list_public: all active public channels visible to the Slack identity.list_private: all active private channels accessible to the Slack identity.refresh_channels: replace the caller's durable snapshot from Slack.match_accounts_to_channels: deterministically reconcile up to 200 Salesforce account names with cached Slack channels and membership.
Local setup
Create a Slack app with the channels:read and groups:read scopes. Each caller
provides their own Slack user OAuth token at request time, so results reflect
that person's Slack access.
Store only the model Gateway credential in an untracked .env file:
LANGSMITH_API_GATEWAY_TOKEN=<gateway-user-service-key>
The Gateway key must use the gateway-user role.
LANGSMITH_API_GATEWAY_TOKEN is the only supported Gateway credential name.
Invoke the agent locally:
set -a && source .env && set +a
# Invoke through the LangGraph server with x-slack-user-token; direct Python
# invocation does not run deployment authentication.
LangSmith Deployment
Deploy the repository and configure LANGSMITH_API_GATEWAY_TOKEN as a deployment
secret. Do not store Slack user tokens in the deployment environment. The
Anthropic provider key remains in the LangSmith workspace's Gateway
configuration and is not needed by this deployment.
Fleet must send both headers on every MCP request:
x-api-key: <LangSmith deployment key>
x-slack-user-token: <caller's Slack user OAuth token>
Custom authentication validates the LangSmith key against the LangSmith API and
the Slack token against Slack, then makes the Slack token available only as
request metadata. That authenticated Slack identity selects a private durable
filesystem namespace; Liam and Morgan therefore read different
/channels/directory.jsonl files without putting either name in a caller-
controlled tool argument. Channel results reflect the caller's own visibility.
The Slack token is never written to the filesystem or placed in graph state,
model messages, tool results, or application logs.
Add the server in Arcade
- In Arcade, go to Servers and select Add Server.
- Choose Remote MCP.
- Give the server a user-specific name, such as
MCP-Slack-Channels-Liam. - Enter this exact URL, with no trailing slash:
https://slack-private-channel-read-ffbdd8bf080155209516781f051ac271.us.langgraph.app/mcp
- Add these two custom headers:
Header Value x-api-keyThe user's valid LangSmith API key x-slack-user-tokenThe user's Slack user OAuth token - Save the server. Arcade sends both headers automatically on every MCP request.
- Request IT to add to Fleet. The MCP will appear in "Integrations" tab.
Fleet custom MCP setup
Each Fleet user must configure the MCP with their own Slack user token. Do not share one Fleet MCP credential profile between users: Liam's profile must contain Liam's Slack token, Morgan's must contain Morgan's, and so on.
Prerequisites
Obtain both credentials before starting:
- A valid LangSmith API key authorized to access the deployment.
- The current user's Slack user OAuth token with
channels:readandgroups:readscopes.
Keep both values in an approved secret manager. Do not paste them into source control, chat messages, logs, or shared documentation.
Add the server in Fleet
-
Open Fleet's MCP settings and select Add custom MCP.
-
Enter a user-specific name, such as
MCP-Slack-Channels-Liam. -
Enter this exact URL, with no trailing slash:
https://slack-private-channel-read-ffbdd8bf080155209516781f051ac271.us.langgraph.app/mcp -
Select Static Headers. Do not select either OAuth option.
-
Add these two headers:
Header Value x-api-keyThe user's valid LangSmith API key x-slack-user-tokenThe user's Slack user OAuth token -
Save the server. Fleet sends both headers automatically on every MCP request.
If Fleet says the URL already exists, edit the existing MCP entry for that user instead of creating a duplicate. Replace its authentication mode and headers with the values above.
Initialize and use the channel directory
The first list request does not perform a slow Slack scan automatically. Ask the
agent to call refresh_channels once to create the authenticated user's durable
/channels/directory.jsonl file. The initial refresh can take approximately
15–20 seconds for a large workspace.
After that refresh, normal tools read the durable file and typically return in under a second:
list_eval_channelslist_customer_channelslist_publiclist_privatelist_channelsmatch_accounts_to_channels
Run refresh_channels again whenever the user wants the saved directory updated.
Refreshing one user never changes another user's file.
For Salesforce reconciliation, pass the relevant account names directly to
match_accounts_to_channels instead of loading the entire Slack directory. The
tool searches every cached channel type—including customer-, eval-,
internal-, ext-, external-, langchain-, and future prefixes—and returns
compact structured results:
matched: one deterministic exact normalized match.ambiguous: multiple exact matches or bounded possible matches requiring review.unmatched: no candidate channel.
Every match includes channel_id, channel_name, channel_type, visibility,
and the definitive is_member value for the authenticated Slack user. The tool
does not use an LLM for fuzzy matching and accepts at most 200 accounts per call.
Fleet should make one match_accounts_to_channels call for the Salesforce
account set. It should not run separate customer/eval/private listing passes or
copy the full directory into memory.
Suggested verification requests:
Refresh my Slack channel directory.
List every eval- channel visible to me.
List my private Slack channels.
Troubleshooting
| Error | Resolution |
|---|---|
MCP OAuth discovery failed or dynamic client registration error |
Reconfigure the server to use Static Headers, not OAuth. |
Authentication failed |
Verify both headers, confirm the LangSmith key is active, and confirm the Slack token is a valid user OAuth token. |
No saved channel directory exists yet |
Call refresh_channels once, then retry the list request. |
| Fleet reports that the URL already exists | Edit the user's existing MCP entry instead of adding another copy. |
| A list request returns old channels | Call refresh_channels to replace that user's snapshot. |
| A refresh takes several seconds | This is expected: refresh queries Slack. Normal list tools read the stored file and should be much faster. |
Because this is a model-backed agent, Slack tool results are sent to Claude through LangSmith Gateway so the model can compose its response.
Every directory operation is also exposed as a direct, argument-free MCP tool:
list_channelslist_publiclist_privatelist_eval_channelslist_customer_channelsrefresh_channelsmatch_accounts_to_channels(acceptsaccounts; all other direct tools are argument-free)
These tools bypass Claude. List operations read a durable, user-isolated Deep
Agents virtual file backed by LangGraph Store, which survives deployment
restarts and is shared across replicas. The conversational agent can read and
search this file but cannot modify it. If the file is missing, list tools return
immediately with an instruction to run refresh_channels; they never silently
fall through to a slow Slack scan. refresh_channels creates or replaces the
snapshot. The store contains channel metadata only—never either
credential. The file uses JSONL with one minimized channel record per line, so
Deep Agent grep calls return individual channels instead of a multi-megabyte
single line. A lightweight five-minute process cache still collapses concurrent
cold misses, with a one-hour stale fallback during temporary Slack rate limits.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。