You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Slack MCP Server support as HTTP Server (#47)
* feat: add HTTP server entry point for OAuth support
Add app_oauth.py as an alternative to app.py that starts an HTTP server
instead of using Socket Mode. Include manifest_oauth.json with request
URLs configured for ngrok and update READMEs with setup instructions.
* feat: add Connect/Disconnect button to App Home
Add a toggle button to the App Home that tracks account connection state
using an in-memory store. This is a placeholder for the real OAuth flow.
* docs: add OAuth install step to README setup instructions
* feat: add Slack MCP Server support when user token is available
* Make it work
* Revert "Make it work"
This reverts commit 9fe578d.
* feat: replace the connect/disconnect buttons with status text
* feat: fallback on bot token when oauth creds are missing
* refactor: use /slack/install URL and remove MCP fallback logic
Replace the deep-link authorize URL with the standard /slack/install
path for the App Home connect link. Remove the MCP server try/except
fallback from run_casey() to avoid silently dropping all MCP tools on
connection errors. Clean up unused AuthorizeUrlGenerator.
* chore: remove unused connect_account action handler
* refactor: merge Slack MCP prompt into main system prompt
* chore: remove install URL print on server startup
* docs: add MCP toggle step to OAuth setup instructions
* chore: move SLACK_SIGNING_SECRET under OAuth credentials in .env.sample
* chore: standardize ngrok placeholder to YOUR_NGROK_SUBDOMAIN
* docs: improve readability of OAuth env setup step in README
* fix: remove divider before @casey context block in App Home
* feat: instruct Casey to look up email via Slack MCP before password reset
* chore: use context.user_token instead of manual query
* feat: port Slack MCP Server changes to claude-agent-sdk and openai-agents-sdk
Port all pydantic-ai branch changes to the other two implementations:
- Add Slack MCP Server integration with OAuth user token
- Replace button-based App Home UI with text-based MCP status
- Use AsyncOAuthSettings for claude-agent-sdk's AsyncApp
- Add MCP setup steps to README OAuth sections
- Expand user scopes for MCP capabilities
- Update system prompt with Slack MCP Server section
- Simplify app_home_opened to use context.user_token
* bug: fix displaying the email address for password resets
* bug: fix context access in openai-agents-sdk emoji and resolve tools
RunContextWrapper.context IS the CaseyDeps instance directly — unlike
Pydantic AI's RunContext which has a .deps property. The incorrect
.deps access raised AttributeError silently caught by the SDK.
* chore: ignore .slack/apps.json files in monorepo gitignore
Prevents accidentally committing App IDs from maintainer environments.
This top-level gitignore is not part of the app templates.
* bug: read OAuth user scopes from manifest.json instead of hardcoding
* fix: add pytest asyncio_mode and fix ruff formatting
* fix: improve password reset prompt to look up email from Slack profile
Update the agent system prompt and tool descriptions so the agent tries
to look up the user's email from their Slack profile before triggering a
password reset, falling back to asking the user if the lookup fails.
* refactor: consolidate manifest.json and manifest_oauth.json into single file
Merge both manifests into a single manifest.json per directory. The
superset manifest includes user scopes and placeholder URLs using
ngrok-free.app, which validates against Slack's schema. For HTTP/OAuth
mode, developers just set socket_mode_enabled to false and replace
ngrok-free.app with their ngrok domain.
---------
Co-authored-by: William Bergamin <wbergamin@slack-corp.com>
8. Click the install URL printed in the terminal to install the app to your workspace via OAuth.
195
+
196
+
</details>
197
+
198
+
<details><summary><strong>Using the Terminal</strong></summary>
199
+
200
+
#### Terminal
201
+
202
+
3. Create your Slack app at [api.slack.com/apps/new](https://api.slack.com/apps/new) using [`manifest.json`](./manifest.json). Before pasting the manifest, set `socket_mode_enabled` to `false` and replace `ngrok-free.app` with your ngrok domain.
203
+
204
+
4. Install the app to your workspace and copy the following values into your `.env`:
205
+
-**Signing Secret** — from _Basic Information_
206
+
-**Bot User OAuth Token** — from _OAuth & Permissions_
207
+
-**Client ID** and **Client Secret** — from _Basic Information_
Replace `your-subdomain` in `SLACK_REDIRECT_URI` with your ngrok subdomain.
218
+
219
+
5. Enable MCP for your app:
220
+
- Open your app at [api.slack.com/apps](https://api.slack.com/apps)
221
+
- Navigate to **Agents & AI Apps** in the left-side navigation
222
+
- Toggle **Model Context Protocol** on
223
+
224
+
6. Start the app:
225
+
226
+
```sh
227
+
python3 app_oauth.py
228
+
```
229
+
230
+
7. Click the install URL printed in the terminal to install the app to your workspace via OAuth.
231
+
232
+
</details>
233
+
234
+
> **Note:** Each time ngrok restarts, it generates a new URL. You'll need to update the ngrok domain in `manifest.json`, `SLACK_REDIRECT_URI` in your `.env`, and re-install the app.
235
+
236
+
</details>
237
+
143
238
### Using the App
144
239
145
240
Once Casey is running, there are three ways to interact:
@@ -172,6 +267,14 @@ ruff format
172
267
173
268
`app.py` is the entry point for the application and is the file you'll run to start the server. This project uses `AsyncApp` from Bolt for Python, with all handlers running asynchronously.
174
269
270
+
### `app_oauth.py`
271
+
272
+
`app_oauth.py` is an alternative entry point that runs the app in HTTP mode instead of Socket Mode. This is intended for deployments that use OAuth for app distribution. See the HTTP Mode section under Development for setup instructions.
273
+
274
+
### `manifest_oauth.json`
275
+
276
+
`manifest_oauth.json` is the app manifest configured for HTTP mode (Socket Mode disabled, with request URLs for event subscriptions and interactivity). Use this when setting up the app for HTTP mode instead of `manifest.json`.
277
+
175
278
### `/listeners`
176
279
177
280
Every incoming request is routed to a "listener". This directory groups each listener based on the Slack Platform feature used.
0 commit comments