convez.ai
MCP Server
VitruvianSoftware

mcp-slack

VitruvianSoftware/mcp-slack

Ver no GitHub
BomPluginScore · de 0 a 100

Production-ready Slack MCP Server with dual-token capabilities for deep workspace orchestration and user context preservation.

Instalação

$npx convez-ai VitruvianSoftware/mcp-slack

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
87%
Último commit
há 2 dias
Versão
v1.0.3
Issues abertas
4
Contribuidores
4

README

A tradução para o português deste README ainda está na fila.

mcp-slack

Custom Slack MCP server with dual-token support — reads via Bot Token, writes/searches via User Token so messages appear as the authenticated user (not a bot).

Why is this different from the official Slack MCP server?

The official @modelcontextprotocol/server-slack provides a great foundation, but this repository was built to solve two major limitations for advanced AI agents:

  1. User Impersonation (Dual-Token Architecture): The official server uses only a Bot Token, meaning every message the AI sends appears as a generic "Bot" user. This implementation uses a Dual-Token architecture. Read-only and infrastructure tasks use the Bot token, while write operations (posting messages, reacting, pinning, editing) and searches use the User token. This allows the AI agent to truly act as you, preserving your identity in threads and direct messages.
  2. Expanded Capabilities (22 Tools vs 9 Tools): The official server is limited to basic read/reply functions. This server expands the toolkit to 22 specialized tools, adding native support for:
    • Canvas Management: Full CRUD operations for Slack Canvases (create, read, edit sections, delete).
    • Workspace Orchestration: Read and manage channel pins, bookmarks, and topics.
    • Advanced Search: Utilize user-context search modifiers for both messages and files across the workspace.

Tools

ToolTokenDescription
slack_list_channelsBotList public channels
slack_get_channel_infoBotGet channel details & canvas IDs
slack_get_channel_historyBotRead recent channel messages
slack_get_thread_repliesBotRead thread replies
slack_set_channel_topicUserSet channel topic
slack_get_usersBotList workspace users
slack_get_user_profileBotGet user profile details
slack_search_messagesUserSearch messages (modifiers supported)
slack_search_filesUserSearch files
slack_post_messageUserPost a message as the authenticated user
slack_reply_to_threadUserReply to a thread as the authenticated user
slack_update_messageUserEdit a sent message
slack_add_reactionUserReact to a message
slack_list_pinsBotList pinned items
slack_pin_messageUserPin a message
slack_unpin_messageUserUnpin a message
slack_list_bookmarksBotList channel bookmarks
slack_add_bookmarkUserAdd channel bookmark
slack_create_canvasUserCreate a Slack canvas
slack_edit_canvasUserEdit an existing canvas
slack_lookup_canvas_sectionsUserFind canvas sections
slack_delete_canvasUserDelete a canvas

🤖 For AI Agents: Auto-Configuration Instructions

If you are an AI agent (like Antigravity, Claude Code, Codex, Opencode, or Gemini CLI) and your user has asked you to install this MCP server, follow these steps:

1. Configure the IDE / Agent Runtime

Depending on your runtime, locate the MCP configuration file (typically mcp.json or mcp_config.json in the user's configuration directory, e.g., ~/.gemini/antigravity/mcp_config.json or ~/.config/claude/mcp.json). Inject the following server definition into the mcpServers object:

"slack": {
  "command": "npx",
  "args": ["-y", "@vitruviansoftware/mcp-slack@latest"],
  "env": {
    "SLACK_BOT_TOKEN": "xoxb-...",
    "SLACK_USER_TOKEN": "xoxp-...",
    "SLACK_TEAM_ID": "T..."
  }
}

2. Guide the User or Automate Slack App Creation

To populate the tokens, a Slack app must be created.

  • If you have browser control tools: Navigate to https://api.slack.com/apps, create an app "From an app manifest", and paste the contents of manifest.json. Install it to the workspace and extract the xoxb- and xoxp- tokens from the "OAuth & Permissions" page.
  • If you have Slack CLI access: Use slack app create and apply the manifest.
  • Otherwise: Explicitly instruct the USER to perform Step 1 and Step 2 of the manual setup below, and ask them to provide you with the two tokens and their Team ID.

Once you have the tokens, update the configuration file and restart the MCP server connection!

Manual Setup

1. Create the Slack App

Go to api.slack.com/apps → Create New App → From an app manifest → select your workspace → paste the contents of manifest.json.

2. Install and collect tokens

After creating the app, click Install to Workspace. Then navigate to OAuth & Permissions and copy:

  • Bot User OAuth Token (xoxb-...)
  • User OAuth Token (xoxp-...)

3. Environment variables

VariableRequiredDescription
SLACK_BOT_TOKEN✅Bot User OAuth Token (xoxb-...)
SLACK_USER_TOKEN✅User OAuth Token (xoxp-...)
SLACK_TEAM_ID✅Workspace Team ID
SLACK_CHANNEL_IDS❌Comma-separated channel IDs to restrict channel listing

4. Build & run

npm install
npm run build
npm start

5. MCP Configuration (Claude Desktop / Gemini)

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@vitruviansoftware/mcp-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-...",
        "SLACK_USER_TOKEN": "xoxp-...",
        "SLACK_TEAM_ID": "T0123456"
      }
    }
  }
}
Ver o original no GitHub

Relacionados