capture-and-slack-mcp
Posts screenshots or image files to Slack channels or direct messages. Can capture a window screenshot from an X11/KDE session and send it, or relay existing image files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@capture-and-slack-mcpsend the rendered result screenshot to Slack"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
capture-and-slack-mcp
An MCP server that relays a result screenshot to Slack so you can review a coding agent's output without opening the app.
You hand an agent a task on your desktop app (e.g. Clonify, a Qt/VTK CAD tool), and end it with "…and send me the result via the capture-and-slack MCP." The agent renders the result to an image and this server posts it to your Slack DM or a channel. You glance at Slack instead of launching the app.
This server does not drive any GUI — it only relays images.
How it fits the loop
agent finishes a task
├─ (A, preferred) runs a repro/test that offscreen-renders the result → /tmp/result.png
│ → send_to_slack(["/tmp/result.png"], "3mm gaussian emboss done")
└─ (B, fallback) the app window is on screen (X11)
→ capture_window_and_post("result", window="Clonify")
→ Slack files_upload_v2 → you see the image in your Slack DM/channelPath A is the robust one: the app's own headless render (VTK SetOffScreenRendering(1) +
vtkWindowToImageFilter, optionally under QT_QPA_PLATFORM=offscreen) writes a PNG, and this
server just posts it. Path B screenshots the live window and is for when no offscreen render exists.
Related MCP server: Slack Note Capture MCP Server
Tools
Tool | What it does |
| Post image(s) to Slack as a review: a root anchor message (a Block Kit task card when |
| Screenshot the running window (X11/KDE) and post it as a review. |
| Screenshot without posting and return it for inspection. Compose with |
Safety: when a specific
windowtitle can't be matched to an on-screen window, capture returnsNO_WINDOW_MATCHrather than silently grabbing the focused window or the whole desktop (which would leak unrelated apps/secrets to Slack). Passallow_fullscreen=True(orwindow="full") to opt into the whole-screen fallback deliberately. |wait_for_review(review_id, channel=None, timeout_seconds=50, poll_seconds=5)| Block until the human reacts (👍/👎/👀/✏️) or replies in the review thread. Returnsapproved/rejected/changes/seen, orstill_awaitingon timeout — call again to keep waiting. | |check_review(review_id, channel=None)| Non-blocking single read of the current verdict. Use in your own polling loop. | |ask_review(review_id, question, channel=None, timeout_seconds=50, poll_seconds=5)| Ask the reviewer a follow-up question in Slack (e.g. why they rejected) and wait for their typed answer. Posts + broadcasts the question so an away reviewer sees it. Returnsanswered+reply, orstill_awaiting+ask_id. | |wait_for_reply(review_id, since_ts, channel=None, timeout_seconds=50, poll_seconds=5)| Block until a thread reply appears aftersince_ts(e.g. theask_idfromask_review). Returnsanswered+replyorstill_awaiting. |
Image paths must be absolute (the server's working directory differs from the agent's).
Errors come back as a JSON envelope {"code","message","hint"} in an isError result.
Closing the review loop
send_to_slack returns a review_id (the thread's root message ts). The agent seeds a task card,
the human taps 👍/👎 on their phone (or replies "make it 5mm"), and wait_for_review(review_id)
returns the verdict to the agent:
send_to_slack(["/tmp/result.png"], title="3mm emboss", status="pass",
checks={"volume Δ": "+2.1%", "watertight": "yes"}) → {"review_id": "1712…", …}
wait_for_review("1712…", channel="C…") → {"status": "approved", …}Re-render into the same thread by passing thread_ts=review_id to send_to_slack; add
notify=True to broadcast the re-render back to the channel (🔁) so a watching reviewer is re-pinged.
If the agent needs to ask something (e.g. the reviewer rejected and the agent wants to know
why), it must ask in Slack, not in the terminal — the reviewer is watching Slack. ask_review
posts the question into the thread, pings the reviewer, and returns their typed answer:
wait_for_review("1712…", "C…") → {"status": "rejected"}
ask_review("1712…", "Why — emboss too sharp, or wrong face?") → {"status": "answered", "reply": "too sharp"}Requirements
uvand Python ≥ 3.12.A Slack bot token (see Slack setup — image uploads need
files_upload_v2; webhooks can't attach files).For live capture only: an X11 session with ImageMagick
importor KDEspectacleinstalled. Precise per-window targeting usesxdotoolif present, elsexwininfo(already on most X11 desktops) — no install needed. Match by window title or WM_CLASS substring; a class likeQClonifyAppdisambiguates from an editor tab that merely has "Clonify" in its title.
Slack setup (one time)
Go to https://api.slack.com/apps → Create New App → From an app manifest, pick your workspace, and paste:
{ "display_information": { "name": "Capture and Slack Bot" }, "features": { "bot_user": { "display_name": "capture-and-slack", "always_online": true } }, "oauth_config": { "scopes": { "bot": [ "files:write", "chat:write", "im:write", "reactions:write", "reactions:read", "channels:history", "groups:history", "im:history" ] } }, "settings": { "org_deploy_enabled": false, "socket_mode_enabled": false } }Scopes:
files:write(upload),chat:write(the caption/card),im:write(open a DM when the destination is a user ID). For the review loop:reactions:write(seed 👍/👎),reactions:read(read the verdict), and history (channels:historyfor public channels,groups:historyfor private,im:historyfor DMs) to read threaded replies. Drop the loop scopes if you only ever post one-way. If you add scopes to an existing app, reinstall it so the new grants take effect.Install to Workspace → authorize → copy the Bot User OAuth Token (
xoxb-…) from OAuth & Permissions.Pick a destination ID:
DM to yourself: your member ID
U…(Slack profile → ⋮ → Copy member ID). The bot can DM you without an invite.A channel: the channel ID
C…(channel → View details), and run/invite @capture-and-slackin it.
Provide the token to the server (do not commit it):
cp .env.example .envand fill inSLACK_BOT_TOKENandSLACK_DEFAULT_CHANNEL, or export them in your shell.(Optional, for precise window targeting)
sudo pacman -S xdotool.
Install & test
uv sync
uv run pytestRegister with Claude Code
Project-scoped (.mcp.json is already in this repo):
{
"mcpServers": {
"capture-and-slack": {
"command": "uv",
"args": ["run", "--directory", "/home/baho/Desktop/capture-and-slack-mcp", "capture-and-slack-mcp"]
}
}
}The server reads SLACK_BOT_TOKEN / SLACK_DEFAULT_CHANNEL from the environment or a git-ignored
.env. (Keep the token out of .mcp.json, which is committed.)
Configuration
Env var | Default | Purpose |
| — | Bot token ( |
| — | Default destination: |
|
| Default window title substring for live captures. |
|
| Soft cap: larger images are auto-shrunk (downscale → JPEG) to fit before uploading. |
|
| Hard ceiling: files bigger than this are rejected ( |
|
| Where captured/shrunk PNGs are written (created |
|
| Reap scratch files older than this (minutes) on access; |
| (unset) | Set ( |
|
| Server log level, written to stderr (DEBUG, INFO, WARNING, …). |
|
| Auto-retries for rate-limited (429, honors Retry-After) / connection-error Slack calls. |
|
| Per-request Slack HTTP timeout (seconds). |
Development
Module map — only server.py imports the MCP SDK:
server.py— the 3 tools +main().slack_client.py—slack_sdkwrapper:files_upload_v2, DM resolution, error translation.capture.py— X11/KDE window capture. Layered fallback: resolve window id (xdotool → xwininfo) and grab it directly → active window (spectacle) → fullscreen.images.py— Pillow: path/content validation, auto-trim, PNG byte reads.config.py— env-driven settings (with a tiny.envloader).errors.py—ErrorCode+CaptureSlackError(JSON envelope).
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables secure downloading and access to Slack files and images using authenticated Bot User OAuth tokens. Integrates with Claude Code Action to allow Claude to analyze screenshots and files shared in Slack channels.Last updated1MIT
- FlicenseAquality-maintenanceEnables two-way communication between Claude and Slack for posting messages, managing threads, and handling files. It specifically supports asynchronous workflows by allowing Claude to poll for remote user replies and send task notifications.Last updated9
- AlicenseAqualityDmaintenanceSlack for AI agents — rooms, messaging and context sharing for multi-agent collaboration.Last updated6MIT
- AlicenseAqualityBmaintenanceA cross-platform screenshot tool that lets coding agents capture and view their output, enabling self-correction through visual feedback.Last updated22MIT
Related MCP Connectors
Human-in-the-loop for AI coding agents — ask questions, get approvals via Slack.
Let your AI agent notify you by email, Slack, Discord, or webhook. One tool: send_notification.
Generate images, GIFs, and PDFs from HTML, URLs, or templates — from your AI agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/baho0/capture-and-slack-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server