8000 GitHub - galaxy-gateway/slacker · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

galaxy-gatewayPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

111 Commits

Folders and files

Repository files navigation

Slacker

Chrome extension + local Rust server that turns the Slack web app into a queryable feed for AI agents. The extension scrapes channel history, threads, and reactions from the page DOM and streams them over a WebSocket to an always-on Rust daemon, which persists everything to SQLite and runs an alert engine. A second Rust binary is a stdio MCP server that lets your agents ask "what happened in channel/thread X" and "what alerts fired".

 Slack web (DOM)
      │  MutationObserver scrape
      ▼
 Chrome extension ──ws://127.0.0.1:8765──▶ slacker-daemon ──┐
   content + service worker                 (WS + alerts)   │ SQLite
                                                            ▼  ~/.local/share/slacker/slacker.db
 your agent  ◀──stdio MCP──  slacker-mcp  ◀─────────────────┘

Components

Part Path Role
Chrome extension (MV3) extension/ DOM scrape, WebSocket client, alert-rule UI
slacker-daemon server/src/bin/daemon.rs Always-on WS server, ingest, alert engine, DB writer
slacker-mcp server/src/bin/mcp.rs Per-session stdio MCP server, DB reader
Shared lib server/src/{db,models,protocol,alerts}.rs DB, models, wire contract, rules

Two binaries because a stdio MCP server lives only for one agent session, but the extension's socket must stay up — they share one SQLite file (WAL mode).

Quick start

Prerequisites: Rust stable toolchain (cargo), Google Chrome/Chromium with Developer mode, and an MCP-capable agent client (Claude Code, Claude Desktop).

A self-documenting Makefile drives the project — run make (or make help) to list targets:

git clone https://github.com/galaxy-gateway/slacker.git && cd slacker
make smoke          # 1. sanity-check the server end-to-end (no Chrome needed) -> prints PASS
make release        # 2. build optimized slacker-daemon + slacker-mcp
make serve          # 3. run the daemon in the foreground (keep it running; mints the auth token)
make token          # 4. print the daemon auth token (paste into the extension popup Status tab)
make mcp-register   # 5. register slacker-mcp with Claude Code / opencode (SCOPE=user|project)
make db-stats       # row counts in the SQLite DB

Load the extension (Chrome / Edge)

The extension is unbundled MV3 — no build step, load the extension/ directory directly. It works in any Chromium browser; Chrome and Edge differ only in the extensions URL.

  1. Open the extensions page:
    • Chrome / Chromium / Brave: chrome://extensions
    • Edge: edge://extensions
  2. Toggle Developer mode on (top-right in Chrome, left sidebar in Edge).
  3. Click Load unpacked and select the repo's extension/ directory.
  4. Open https://app.slack.com. Click the Slacker toolbar icon — the popup opens.
  5. Status tab → paste the daemon token from make token into Daemon token → Save token. The daemon refuses unauthenticated connections, so the popup stays disconnected until the token is set. Once saved it should flip to connected.

Now browse channels/threads in Slack and the daemon fills the DB (make db-stats to confirm). To backfill an open channel's older history, click Backfill this channel in the popup. Add alert rules under the popup's rules tab. After a Slack UI change breaks scraping, fixes live in extension/src/content/selectors.js — see docs/troubleshooting.md.

Run the daemon always-on (macOS)

Instead of make serve in a terminal, install a launchd agent that runs the daemon at login:

make install-service    # install binaries + load the launchd agent (runs at login)
make service-status     # show launchd agent + daemon status
make service-restart    # restart the daemon
make uninstall-service  # unload + remove the agent

Register the MCP server

make mcp-register runs claude mcp add slacker -- <release>/slacker-mcp. Scope with SCOPE=user (all projects) or SCOPE=project (this repo only); covers Claude Code and opencode. Remove with make mcp-unregister (same SCOPE=). Sanity-check by hand — stdout is the JSON-RPC channel, logs go to stderr:

printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | server/target/release/slacker-mcp

Full walkthrough in docs/setup.md.

Open app.slack.com, browse channels/threads, and the daemon fills the DB. Add alert rules in the extension popup. Ask your agent to call any of the read-only MCP tools: list_channels, get_channel_history, get_thread, search_messages (FTS5), list_threads, get_channel_summary, get_user_activity, get_mentions, get_reactions, list_alerts, get_recent_activity. All return {items, count, next_cursor}; paginate with cursor.

Docs

Caveats

  • DOM scraping is fragile. Slack UI changes break selectors — all isolated in extension/src/content/selectors.js. See troubleshooting.
  • Scrapes only what you actually view in the browser; it is not a backfill of full history.
  • Personal/local tool. Respect your workspace's policies on automated access.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0