Skip to content

feat: log Slack MCP Server connect URL on startup#8

Merged
mwbrooks merged 3 commits intomainfrom
mwbrooks-output-install-url
Apr 17, 2026
Merged

feat: log Slack MCP Server connect URL on startup#8
mwbrooks merged 3 commits intomainfrom
mwbrooks-output-install-url

Conversation

@mwbrooks
Copy link
Copy Markdown
Member

@mwbrooks mwbrooks commented Apr 16, 2026

Summary

This pull request logs the Slack MCP Server install URL when the OAuth HTTP server starts. When SLACK_REDIRECT_URI is set, the app derives the origin and prints a Connect the Slack MCP Server: <origin>/slack/install message, making it easy for developers to find the OAuth install link.

Testing

  • Start the app with python3 app_oauth.py (or slack run app_oauth.py) with SLACK_REDIRECT_URI set
  • Confirm the install URL is logged to the console after the "running on port" message
  • Start the app without SLACK_REDIRECT_URI set and confirm no extra log line appears
INFO:__main__:Connect the Slack MCP Server: https://7e04-136-226-130-247.ngrok-free.app/slack/install
INFO:slack_bolt.App:⚡️ Bolt app is running! (development server)

@mwbrooks mwbrooks self-assigned this Apr 16, 2026
@mwbrooks mwbrooks added the enhancement New feature or request label Apr 16, 2026
@mwbrooks mwbrooks changed the title feat: log Slack MCP Server install URL on startup feat: log Slack MCP Server connect URL on startup Apr 16, 2026
@mwbrooks mwbrooks marked this pull request as ready for review April 16, 2026 22:36
@mwbrooks mwbrooks requested a review from a team as a code owner April 16, 2026 22:36
Copy link
Copy Markdown
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks Thanks for bringing these changes to adjacent apps too. I'm approving now with one finding that might be caused from server changes but not a blocker - this appears after MCP requests complete:

WARNING:slack_bolt.App:Unhandled request ({'type': 'event_callback', 'event': {'type': 'function_executed_success'}})
---
[Suggestion] You can handle this type of event with the following listener function:

@app.event("function_executed_success")
def handle_function_executed_success_events(body, logger):
    logger.info(body)

port = int(os.environ.get("PORT", 3000))
redirect_uri = os.environ.get("SLACK_REDIRECT_URI", "")
if redirect_uri:
install_url = urljoin(redirect_uri, "/slack/install")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐍 praise: TIL about urljoin! It's clean implementation!

@mwbrooks
Copy link
Copy Markdown
Member Author

@mwbrooks Thanks for bringing these changes to adjacent apps too. I'm approving now with one finding that might be caused from server changes but not a blocker - this appears after MCP requests complete:

Yea, I've noticed this as well. 🤔 I didn't give it a lot of thought while putting together these apps, but we can check in with the team to see if this is intentional or not.

@mwbrooks
Copy link
Copy Markdown
Member Author

@zimeg Thanks again for the reviews! 🙇🏻

@mwbrooks mwbrooks merged commit e1b2fda into main Apr 17, 2026
8 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-output-install-url branch April 17, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants