convez.ai
MCP ServerIntegração & APIsIntermediário
karbassi

Slack MCP

karbassi/slack-mcp

Acesso completo do Slack para agentes de IA via MCP

Ver no GitHub
BomPluginScore · de 0 a 100

Servidor MCP que expõe 220 ferramentas da API do Slack para agentes de IA, permitindo acesso completo a mensagens, canais, arquivos, canvas, listas e busca. Integra-se nativamente com Claude, Cursor, Windsurf e outros clientes de IA.

Instalação

$npx convez-ai karbassi/slack-mcp

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
3
Forks
0
Acompanhando
1
Saúde
71%
Último commit
há 1 mês
Versão
v3.0.0
Issues abertas
1
Contribuidores
1

Casos de uso

  • Automatizar consultas e relatórios do Slack com IA
  • Criar agentes que gerenciam canais, mensagens e membros
  • Integrar busca e análise de conversas em fluxos de IA

Veredito

MCP server maduro e bem mantido que democratiza o acesso à API do Slack para agentes de IA. Implementação sólida com suporte multiplataforma, ideal para automação de tarefas colaborativas em ambientes Slack corporativos.

README

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

Slack MCP

Your entire Slack workspace — available to any AI.

Python License

A Model Context Protocol server that gives LLMs full access to Slack. Messages, channels, files, canvases, lists, search, reactions — all of it.

220 tools · 36 API families · Every Slack feature


Quick Start

1. Create a Slack App

  1. Go to api.slack.com/apps > Create New App > From a manifest
  2. Paste the contents of manifest.json
  3. Install to your workspace
  4. Copy the User OAuth Token (xoxp-...) from OAuth & Permissions

2. Add to your AI client

claude mcp add slack -- uvx --from git+https://github.com/karbassi/slack-mcp.git slack-mcp

Then set SLACK_XOXP_TOKEN in your shell environment.

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "slack": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/karbassi/slack-mcp.git", "slack-mcp"],
      "env": {
        "SLACK_XOXP_TOKEN": "xoxp-..."
      }
    }
  }
}

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "slack": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/karbassi/slack-mcp.git", "slack-mcp"],
      "env": {
        "SLACK_XOXP_TOKEN": "xoxp-..."
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "slack": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/karbassi/slack-mcp.git", "slack-mcp"],
      "env": {
        "SLACK_XOXP_TOKEN": "xoxp-..."
      }
    }
  }
}

Add to your VS Code settings.json:

{
  "mcp": {
    "servers": {
      "slack": {
        "command": "uvx",
        "args": ["--from", "git+https://github.com/karbassi/slack-mcp.git", "slack-mcp"],
        "env": {
          "SLACK_XOXP_TOKEN": "xoxp-..."
        }
      }
    }
  }
}
{
  "mcpServers": {
    "slack": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/path/to/slack-mcp", "slack-mcp"]
    }
  }
}

What Can It Do?

"Catch me up on #engineering from today" "Reply to Sarah's thread saying we'll ship it Monday" "Search for anything about the Q3 roadmap" "Create a channel called #project-atlas and invite the design team"

DomainToolsHighlights
Conversations28History, threads, replies, create, archive, invite, mark read
Undocumented28Drafts, saved items, emoji management, granular search, sidebar, threads
Files16Upload, share, edit, list, remote files
Chat14Send, reply, schedule, update, delete, ephemeral
Users12Profile, presence, lookup, list
Lists12Create, edit items, manage access
Legacy11Slash commands, file editing, bot listing
Team9Info, preferences, access logs, billing
Apps8Manifests, connections, authorizations
Usergroups7Create, update, manage members
Workflows7Featured workflows, step completion
Canvases6Create, edit, sections, access control
Calls6Start, end, manage participants
+ 23 moreDND, reminders, bookmarks, reactions, pins, stars, views, search, auth, bots, emoji, ...

Plus resolve_names (bulk ID→name resolution) and cache_clear (bust the response cache on demand) utility tools.

Beyond the Official API

39 undocumented and legacy endpoints — the same internal APIs that Slack's own apps use. Requires session tokens (xoxc+xoxd).

EndpointWhat it provides
client.bootFull workspace bootstrap — channels, users, prefs, feature flags
client.countsUnread counts per channel/DM/thread plus mention counts
client.userBootUser-specific bootstrap data scoped to the authenticated user
threads.getViewThread inbox — the list of threads with read/unread state
subscriptions.thread.markMark individual threads as read or unread
drafts.listList all unsent message drafts
drafts.createCreate a message draft with Block Kit text
drafts.updateEdit an existing draft
drafts.deleteDelete a draft
saved.listList saved-for-later items
saved.addSave a message for later with optional due date
saved.deleteRemove a saved-for-later item
emoji.addAdd a custom emoji from a URL
emoji.removeRemove a custom emoji
emoji.adminListEmoji with rich metadata — uploader, date, usage stats
search.modules.messagesGranular message search
search.modules.filesFile-specific search
search.modules.channelsServer-side channel search by name or topic
search.modules.peopleFuzzy people search by name, title, department
search.modules.dmsSearch within DMs only
conversations.viewChannel view with read state and personal config
conversations.listPrefsPer-channel notification and mute preferences
users.channelSections.listSidebar organization — custom sections, favorites
users.priority.listContacts ranked by interaction frequency
experiments.getByUserA/B test experiment assignments
api.featuresWorkspace feature flags
aiApps.listAI applications configured in the workspace
EndpointWhat it provides
chat.commandExecute slash commands programmatically
commands.listList all slash commands including custom ones
files.editEdit a file's title, content, or filetype in-place
files.shareShare a file to a channel
bots.listList all bot users in the workspace
team.prefs.getTeam-level preferences — retention, permissions, domains
users.prefs.getAll user preferences — notifications, sidebar, theme
users.prefs.setSet any individual user preference
users.admin.inviteInvite users by email (Enterprise Grid)
users.admin.setInactiveDeactivate a user account (Enterprise Grid)
channels.deleteDead method — included for completeness

[!WARNING] Undocumented endpoints can break without notice. They use session tokens (xoxc+xoxd) which expire and must be re-grabbed from browser cookies.

Authentication

VariableRequiredDescription
SLACK_XOXP_TOKENYesUser OAuth token from your Slack app
SLACK_XOXC_TOKENNoBrowser session token for undocumented endpoints
SLACK_XOXD_TOKENNoBrowser session cookie (paired with xoxc)

[!TIP] The xoxp token covers all Slack Web API tools. Utility tools like resolve_names and cache_clear work without additional auth. For undocumented endpoints (unread counts, workspace boot, file editing), you also need xoxc+xoxd — grab them from your browser cookies while logged into slack.com.

Caching

Responses are cached automatically to reduce API calls:

  • Stable data (users, teams, bots, emoji) — 1 hour TTL
  • Dynamic data (channel lists, members, bookmarks) — 5 minute TTL
  • Old threads (conversations_replies with ts > 1 hour old) — 1 hour TTL
  • Bounded history (conversations_history with old date range) — 1 hour TTL
  • Resolved names (user/bot → 1 hour, channel → 5 minutes)

Cache is stored at the platform-native location (~/Library/Caches/slack-mcp on macOS, ~/.cache/slack-mcp on Linux). Set XDG_CACHE_HOME to override.

Use the cache_clear tool to bust the cache when you need fresh data.

Name Resolution

All tool responses automatically resolve user, channel, DM, and bot IDs to display names via a resolved_names field — no extra tool calls needed. Resolved names are disk-cached to avoid redundant API lookups.

Response Compaction

15 high-volume tools automatically strip bloat from Slack API responses — blocks (duplicates text), attachments (link unfurls), thumbnails (22 per file), and metadata noise. Measured reductions:

EndpointBeforeAfterReduction
conversations.history465 KB113 KB76%
files.list127 KB26 KB80%
conversations.list59 KB17 KB71%
reactions.list353 KB167 KB53%

Compaction is on by default. Pass detailed=True to any compactable tool to get the full Slack API response.

Development

git clone https://github.com/karbassi/slack-mcp.git
cd slack-mcp
uv sync
mise run check                       # test + lint + security scan
mise run test:integration            # requires tokens in .env

[!NOTE] ~68 integration tests are skipped because they require a bot token (xoxb), Slack Connect, interactive triggers (e.g. views.open), or would be destructive (e.g. auth.revoke). Adding bot token support is a future goal.

License

MIT

Ver o original no GitHub

Bom para

Relacionados