Skip to main content
Glama
rokej

Slack MCP Server

by rokej
README.md
# Slack MCP Server

[![CI](https://github.com/rokej/slack-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/rokej/slack-mcp-server/actions/workflows/ci.yml)

A Model Context Protocol (MCP) server that posts notifications to Slack via an
**Incoming Webhook**. AI agents call tools instead of shelling out to `curl`.

## Features

- **`send_message`** — plain text and optional Block Kit `blocks`
- **`send_payload`** — pre-built payload object or multi-part array (rate-limit aware)
- **`send_markdown`** — Markdown → Block Kit conversion with Slack size limits and splitting
- **STDIO and SSE** transports
- Works with Claude Code, Cursor, OpenCode, and other MCP clients

## Installation

```bash
git clone https://github.com/rokej/slack-mcp-server.git
cd slack-mcp-server
pip install -e ".[dev]"
```

Or install a release wheel:

```bash
pip install https://github.com/rokej/slack-mcp-server/releases/download/v0.1.0/slack_mcp_server-0.1.0-py3-none-any.whl
```

## Configuration

Copy `.env.example` to `.env` (or export the variable):

```bash
export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/T…/B…/…"
```

Create a webhook at [Slack API — Your Apps](https://api.slack.com/apps) → Incoming Webhooks.

## Usage

```bash
# STDIO (default) — for MCP clients
slack-mcp-server

# SSE transport
slack-mcp-server --transport sse --port 8080
```

### Claude Code / Cursor / OpenCode

```json
{
  "mcpServers": {
    "slack-webhook": {
      "command": "slack-mcp-server",
      "env": {
        "SLACK_WEBHOOK_URL": "${SLACK_WEBHOOK_URL}"
      }
    }
  }
}
```

In [Agent Swarm](https://github.com/stolostron/agent-swarm), add **Slack Webhook** from
the workspace MCP catalog — Swarmer injects `SLACK_WEBHOOK_URL` into sandboxes.

### Agent container images

Pin a release wheel the same way as `jira-mcp-server`:

```dockerfile
ARG SLACK_MCP_VERSION=0.1.0
RUN curl -fsSL -o /tmp/slack_mcp_server-${SLACK_MCP_VERSION}-py3-none-any.whl \
      "https://github.com/rokej/slack-mcp-server/releases/download/v${SLACK_MCP_VERSION}/slack_mcp_server-${SLACK_MCP_VERSION}-py3-none-any.whl" \
    && python3 -m pip install --no-cache-dir /tmp/slack_mcp_server-*.whl \
    && rm -f /tmp/slack_mcp_server-*.whl \
    && slack-mcp-server --help | head -5
```

## Tools

| Tool | Purpose |
|------|---------|
| `send_message` | Post plain text + optional Block Kit blocks |
| `send_payload` | Post a pre-built JSON payload (object or array) |
| `send_markdown` | Convert Markdown to Block Kit and send |

## Development

```bash
pip install -e ".[dev]"
make test
make lint
```

## Releasing

1. Bump `version` in `pyproject.toml` and `__version__` in `slack_mcp_server/__init__.py`
2. Commit, then tag and push:
   ```bash
   git tag v0.1.0
   git push origin v0.1.0
   ```
3. The **Release** workflow builds `slack_mcp_server-X.Y.Z-py3-none-any.whl` and attaches it to the GitHub Release

## License

Apache License 2.0 — see [LICENSE](LICENSE).

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation3/5

The three tools are all variations of sending messages to Slack, which creates some overlap. send_payload and send_message especially could be confused, though send_markdown is clearly distinct. The descriptions help clarify input format differences, but the boundaries are not fully crisp.

Naming Consistency5/5

All tool names follow a consistent send_verb_noun pattern: send_payload, send_markdown, send_message. This makes the set predictable and easy to navigate.

Tool Count5/5

With only 3 tools, the server is tightly scoped to its purpose of sending Slack messages via webhook. Each tool covers a distinct input format, and there are no redundant or unnecessary tools.

Completeness5/5

For the stated domain of sending Slack messages via incoming webhooks, the server covers all major input formats: raw payload, markdown, and plain message. There are no obvious gaps for this narrow scope, though full Slack API features like reading messages are intentionally excluded.

Maintenance

ActivityStale
ResponsivenessNo issues