Skip to main content
Glama
README.md
# ๐ŸŒ‰ Bridge

### Every message, for everyone.

**Bridge is an AI agent that makes Slack workspaces accessible for teammates who are blind, dyslexic, neurodivergent, or working in a second language โ€” automatically, and privately.**

`Slack ยท Bolt for JavaScript`  ยท  `Google Gemini`  ยท  `Model Context Protocol`  ยท  `Node.js 18+`  ยท  `MIT License`

*Built for the [Slack Agent Builder Challenge](https://slackhack.devpost.com/) โ€” **Agent for Good** track.*

---

## ๐Ÿ’™ The problem

Slack is where work happens โ€” but not equally for everyone. Over **1.3 billion people** live with a disability, and millions more work in a second language. Every day, in every workspace:

- A **blind** teammate hits a wall at every screenshot posted without a description.
- A **dyslexic** engineer rereads a jargon-dense announcement four times and still isn't sure what to do.
- A teammate working in their **third language** quietly drops out of a fast-moving thread.

They don't need a separate tool. They need the conversation *itself* to include them. **That's Bridge.**

---

## โœจ What it does

| Feature | Who it helps | How it works |
|---|---|---|
| ๐Ÿ–ผ๏ธ **Automatic alt-text** | Blind & low-vision users | Every image posted in a channel gets a faithful description threaded under it โ€” text transcribed, charts explained, error messages read out. No one has to remember to write it. |
| โœ๏ธ **Simplify with Bridge** | Dyslexic, neurodivergent & non-native readers | A message shortcut rewrites any message in plain language, ending with a clear **"๐Ÿ‘‰ What you need to do."** |
| ๐ŸŒ **Translate with Bridge** | Non-native speakers | Set your language once (`/bridge language Hindi`), then translate any message in one click โ€” mentions, tone & formatting preserved. |
| ๐Ÿ“š **Plain-language catch-ups** | Anyone lost in long threads | Ask the Bridge assistant *"catch me up on #project-x"* and get an accessible digest with decisions, action items & citations. |

> ๐Ÿ”’ **Privacy by design:** simplifications and translations are delivered **ephemerally** โ€” only the person who asked ever sees them. Nobody is publicly marked as needing an accommodation.

---

## ๐Ÿง  What makes it an *agent*, not a chatbot

Bridge's assistant runs an **autonomous tool-use loop**. You ask one question; Gemini decides which tools to call, in what order, and chains them โ€” no hard-coded paths.

```
You:  "Find where we decided the launch date and explain it simply in Hindi."

Bridge (thinking, live status shown in Slack):
  โ†’ ๐Ÿ” search_messages          (Real-Time Search API)
  โ†’ ๐Ÿ“– read_channel_history
  โ†’ โœ๏ธ simplify_text             (via MCP)
  โ†’ ๐ŸŒ translate_text            (via MCP)
  โ†’ โœ… replies in plain Hindi, with a citation to the original message
```

---

## ๐Ÿ—๏ธ Architecture

![Bridge architecture](architecture.png)

Bridge deliberately uses **all three** of the challenge's qualifying technologies:

1. **โšก Slack AI capabilities** โ€” a first-class AI assistant: assistant threads, suggested prompts, and live "thinking" status updates.
2. **๐Ÿ”Œ MCP server integration** โ€” Bridge's accessibility engine (`simplify_text`, `translate_text`, `describe_image`) runs as a **standalone MCP server**. The Slack agent discovers and calls it as an **MCP client** at runtime โ€” and because it's standard MCP over stdio, *the same server plugs into Claude Desktop, IDEs, or any other MCP client unchanged.* Accessibility tools that work **beyond Slack**.
3. **๐Ÿ” Real-Time Search API** โ€” `assistant.search.context` grounds every answer in real workspace messages, so the agent cites sources instead of hallucinating.

All natural-language work โ€” reasoning, vision (alt-text), simplification, translation โ€” is powered by **Google Gemini**.

---

## ๐Ÿš€ Quick start

**Prerequisites:** Node.js 18+, a Slack workspace where you can install apps, and a free [Google AI Studio API key](https://aistudio.google.com/apikey).

```bash
# 1. Clone & install
git clone https://github.com/<you>/bridge.git
cd bridge
npm install

# 2. Configure
cp .env.example .env      # then fill in the 4 values (see below)

# 3. Run
npm start
```

You should see:

```
๐Ÿ”Œ MCP connected: bridge-accessibility server exposing [simplify_text, translate_text, describe_image]
โšก Bridge is running (Socket Mode)
```

### Create the Slack app (2 minutes)

1. Go to **[api.slack.com/apps](https://api.slack.com/apps) โ†’ Create New App โ†’ From a manifest**.
2. Pick your workspace and paste the contents of [`manifest.json`](manifest.json). Create.
3. **Basic Information โ†’ App-Level Tokens** โ†’ generate a token with the `connections:write` scope โ†’ this is `SLACK_APP_TOKEN`.
4. **Install App** โ†’ copy the **Bot User OAuth Token** (`SLACK_BOT_TOKEN`) and the **Signing Secret** from Basic Information.

### Your `.env`

```ini
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
SLACK_SIGNING_SECRET=...
GEMINI_API_KEY=...        # from aistudio.google.com/apikey (free tier)
```

---

## ๐ŸŽฎ Try it

| Do this | See this |
|---|---|
| `/invite @Bridge` into a channel, then drop in a screenshot | Bridge threads an alt-text description under it |
| Hover any message โ†’ โ‹ฏ โ†’ **Simplify with Bridge** | A private, plain-language version appears |
| `/bridge language Spanish`, then โ‹ฏ โ†’ **Translate with Bridge** | The message, privately, in Spanish |
| Open **Bridge** in the sidebar โ†’ *"catch me up on #general"* | A cited, plain-language digest |

---

## ๐Ÿงฉ Use the accessibility engine *outside* Slack

Because the engine is a real MCP server, you can add it to **Claude Desktop** (or any MCP client) and get the same tools anywhere:

```jsonc
// claude_desktop_config.json
{
  "mcpServers": {
    "bridge-accessibility": {
      "command": "node",
      "args": ["<path-to-repo>/src/mcp-server.js"],
      "env": { "GEMINI_API_KEY": "..." }
    }
  }
}
```

---

## ๐Ÿ“ Project structure

```
src/
โ”œโ”€โ”€ app.js          # Slack app โ€” assistant, shortcuts, /bridge, auto alt-text
โ”œโ”€โ”€ agent.js        # Autonomous tool-use loop (Gemini) + MCP client
โ”œโ”€โ”€ mcp-server.js   # Bridge Accessibility MCP server (simplify/translate/describe)
โ”œโ”€โ”€ gemini.js       # Gemini calls, accessibility-tuned prompts
โ””โ”€โ”€ prefs.js        # Per-user language preferences
manifest.json       # Paste-ready Slack app configuration
architecture.png    # Architecture diagram
```

---

## ๐Ÿ› ๏ธ Built with

**Node.js** ยท **Bolt for JavaScript** (Socket Mode) ยท **Slack AI** assistant threads ยท **Model Context Protocol** (server + client) ยท **Real-Time Search API** ยท **Google Gemini**

---

## ๐ŸŒฑ Roadmap

- ๐ŸŽ™๏ธ Voice-note transcription & summarization
- ๐Ÿ“– Per-user reading-level personalization
- ๐ŸคŸ Sign-language avatar clips for key announcements
- ๐Ÿช One-click install via the Slack Marketplace

---

## ๐Ÿ“œ License

MIT โ€” free to use, adapt, and build on. Accessibility should be.

---

**Accessibility isn't a feature you add later. With Bridge, it's built into the conversation itself.**

*๐ŸŒ‰ Bridge โ€” every message, for everyone.*