-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add Slack MCP Server support as HTTP Server #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
bbe2866
feat: add HTTP server entry point for OAuth support
mwbrooks d0e7a52
feat: add Connect/Disconnect button to App Home
mwbrooks 79efc88
docs: add OAuth install step to README setup instructions
mwbrooks 479c406
feat: add Slack MCP Server support when user token is available
mwbrooks 9fe578d
Make it work
WilliamBergamin cbaed00
Revert "Make it work"
mwbrooks 657d88e
feat: replace the connect/disconnect buttons with status text
mwbrooks abc940f
feat: fallback on bot token when oauth creds are missing
mwbrooks 75f5f71
refactor: use /slack/install URL and remove MCP fallback logic
mwbrooks 1a5d616
chore: remove unused connect_account action handler
mwbrooks 1a64be3
refactor: merge Slack MCP prompt into main system prompt
mwbrooks 0bf9caa
chore: remove install URL print on server startup
mwbrooks 6f6dde1
docs: add MCP toggle step to OAuth setup instructions
mwbrooks 37962fd
chore: move SLACK_SIGNING_SECRET under OAuth credentials in .env.sample
mwbrooks 6f73709
chore: standardize ngrok placeholder to YOUR_NGROK_SUBDOMAIN
mwbrooks 35e44fb
docs: improve readability of OAuth env setup step in README
mwbrooks 5b59b59
fix: remove divider before @Casey context block in App Home
mwbrooks 1d4aa94
feat: instruct Casey to look up email via Slack MCP before password r…
mwbrooks 3704b8f
chore: use context.user_token instead of manual query
mwbrooks caaca55
feat: port Slack MCP Server changes to claude-agent-sdk and openai-ag…
mwbrooks 9db55bb
bug: fix displaying the email address for password resets
mwbrooks c64ac1c
bug: fix context access in openai-agents-sdk emoji and resolve tools
mwbrooks a93888a
chore: ignore .slack/apps.json files in monorepo gitignore
mwbrooks 5ec69b3
bug: read OAuth user scopes from manifest.json instead of hardcoding
mwbrooks 71a44cc
fix: add pytest asyncio_mode and fix ruff formatting
mwbrooks f3bc921
Merge branch 'main' into slack-mcp-server
mwbrooks 413fc75
fix: improve password reset prompt to look up email from Slack profile
mwbrooks bf7f95d
refactor: consolidate manifest.json and manifest_oauth.json into sing…
mwbrooks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,7 @@ | |
|
|
||
| # Git | ||
| .worktrees/ | ||
|
|
||
| # Slack App Templates | ||
| */.slack/apps.json | ||
| */.slack/apps.dev.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,15 @@ | ||
| # Required, set your Anthropic API key. | ||
| ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY | ||
|
|
||
| # Optional, uncomment and set when running without the Slack CLI (python3 app.py). | ||
| # SLACK_APP_TOKEN=YOUR_SLACK_APP_TOKEN | ||
| # SLACK_BOT_TOKEN=YOUR_SLACK_BOT_TOKEN | ||
|
|
||
| # Required for OAuth (app_oauth.py). Set your app's OAuth credentials. | ||
| # SLACK_CLIENT_ID=YOUR_SLACK_CLIENT_ID | ||
| # SLACK_CLIENT_SECRET=YOUR_SLACK_CLIENT_SECRET | ||
| # SLACK_REDIRECT_URI=https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app/slack/oauth_redirect | ||
| # SLACK_SIGNING_SECRET=YOUR_SLACK_SIGNING_SECRET | ||
|
|
||
| # Optional, uncomment and set when using a custom Slack instance. | ||
| # SLACK_API_URL=YOUR_SLACK_API_URL | ||
|
|
||
| # Required, set your Anthropic API key. | ||
| ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,5 +39,8 @@ logs/ | |
| .pytype/ | ||
| .idea/ | ||
|
|
||
| # oauth data | ||
| data/ | ||
|
|
||
| # claude | ||
| .claude/*.local.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,4 @@ class CaseyDeps: | |
| channel_id: str | ||
| thread_ts: str | ||
| message_ts: str | ||
| user_token: str | None = None | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import logging | ||
| import os | ||
|
|
||
| from dotenv import load_dotenv | ||
| from slack_bolt.async_app import AsyncApp | ||
| from slack_sdk.web.async_client import AsyncWebClient | ||
|
|
||
| from listeners import register_listeners | ||
| from oauth import oauth_settings | ||
|
|
||
| load_dotenv(dotenv_path=".env", override=False) | ||
|
|
||
| logging.basicConfig(level=logging.DEBUG) | ||
|
|
||
| app = AsyncApp( | ||
| signing_secret=os.environ.get("SLACK_SIGNING_SECRET"), | ||
| token=os.environ.get("SLACK_BOT_TOKEN"), | ||
| client=AsyncWebClient( | ||
| base_url=os.environ.get("SLACK_API_URL", "https://slack.com/api"), | ||
| token=os.environ.get("SLACK_BOT_TOKEN"), | ||
| ), | ||
| # Allow bot-posted messages (e.g. issue modal submissions with metadata) | ||
| # to reach the message handler instead of being silently dropped | ||
| ignoring_self_events_enabled=False, | ||
| oauth_settings=oauth_settings, | ||
| ) | ||
|
|
||
| register_listeners(app) | ||
|
|
||
| if __name__ == "__main__": | ||
| port = int(os.environ.get("PORT", 3000)) | ||
| app.start(port=port) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 💯 I like this better then what I did before