From 69015ab4a89352aed3132ff219d3e82607db5e47 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Thu, 16 Apr 2026 16:27:52 -0700 Subject: [PATCH 1/2] feat: show Slack MCP Server status on App Home in Socket Mode When running in Socket Mode, the App Home now displays the Slack MCP Server as disconnected with a link to the README section on how to enable it. Previously, the MCP status was hidden in Socket Mode. --- claude-agent-sdk/README.md | 6 +++++- .../listeners/views/app_home_builder.py | 21 +++++++++++++++++++ claude-agent-sdk/tests/test_view_builders.py | 8 ++++--- openai-agents-sdk/README.md | 6 +++++- .../listeners/views/app_home_builder.py | 21 +++++++++++++++++++ openai-agents-sdk/tests/test_view_builders.py | 8 ++++--- pydantic-ai/README.md | 6 +++++- .../listeners/views/app_home_builder.py | 21 +++++++++++++++++++ pydantic-ai/tests/test_view_builders.py | 8 ++++--- 9 files changed, 93 insertions(+), 12 deletions(-) diff --git a/claude-agent-sdk/README.md b/claude-agent-sdk/README.md index a911a84..982fa1d 100644 --- a/claude-agent-sdk/README.md +++ b/claude-agent-sdk/README.md @@ -11,7 +11,11 @@ The starter agent interacts with users through four entry points: * **Channel @mentions** — Mention the agent in any channel to get a response without leaving the conversation. * **Assistant Panel** — Users click _Add Agent_ in Slack, select the agent, and pick from suggested prompts or type a message. -When connected to the [Slack MCP Server](https://github.com/slackapi/slack-mcp-server), the agent can search messages and files, read channel history and threads, send and schedule messages, and create and update canvases. The template also includes one example tool (emoji reactions). Add your own tools to customize it for your use case. +The template also includes one example tool (emoji reactions). Add your own tools to customize it for your use case. + +### Slack MCP Server + +When connected to the [Slack MCP Server](https://github.com/slackapi/slack-mcp-server), the agent can search messages and files, read channel history and threads, send and schedule messages, and create and update canvases. When deployed with OAuth (HTTP mode), the agent automatically connects to the Slack MCP Server using the user's token. ## Setup diff --git a/claude-agent-sdk/listeners/views/app_home_builder.py b/claude-agent-sdk/listeners/views/app_home_builder.py index d317218..d70b79e 100644 --- a/claude-agent-sdk/listeners/views/app_home_builder.py +++ b/claude-agent-sdk/listeners/views/app_home_builder.py @@ -73,6 +73,27 @@ def build_app_home_view( ], } ) + else: + blocks.append( + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "\U0001f534 *Slack MCP Server is disconnected.* ", + }, + } + ) + blocks.append( + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "The Slack MCP Server enables the assistant to search messages, read channels, and more.", + } + ], + } + ) return { "type": "home", diff --git a/claude-agent-sdk/tests/test_view_builders.py b/claude-agent-sdk/tests/test_view_builders.py index 71cdb2c..72decef 100644 --- a/claude-agent-sdk/tests/test_view_builders.py +++ b/claude-agent-sdk/tests/test_view_builders.py @@ -13,7 +13,7 @@ def test_build_feedback_blocks(): def test_build_app_home_view_default(): - """Default args (app.py mode) — no MCP status section.""" + """Default args (Socket Mode) — shows disconnected status with learn-more link.""" view = build_app_home_view() assert view["type"] == "home" @@ -23,11 +23,13 @@ def test_build_app_home_view_default(): assert "header" in block_types assert "section" in block_types - # No MCP status section + # Shows MCP status as disconnected with learn-more link section_texts = [ b["text"]["text"] for b in view["blocks"] if b["type"] == "section" ] - assert not any("Slack MCP Server" in t for t in section_texts) + mcp_section = next(t for t in section_texts if "Slack MCP Server" in t) + assert "disconnected" in mcp_section + assert "Learn how to enable" in mcp_section def test_build_app_home_view_connect(): diff --git a/openai-agents-sdk/README.md b/openai-agents-sdk/README.md index 5b1ec93..7d179d8 100644 --- a/openai-agents-sdk/README.md +++ b/openai-agents-sdk/README.md @@ -11,7 +11,11 @@ The starter agent interacts with users through four entry points: * **Channel @mentions** — Mention the agent in any channel to get a response without leaving the conversation. * **Assistant Panel** — Users click _Add Agent_ in Slack, select the agent, and pick from suggested prompts or type a message. -When connected to the [Slack MCP Server](https://github.com/slackapi/slack-mcp-server), the agent can search messages and files, read channel history and threads, send and schedule messages, and create and update canvases. The template also includes one example tool (emoji reactions). Add your own tools to customize it for your use case. +The template also includes one example tool (emoji reactions). Add your own tools to customize it for your use case. + +### Slack MCP Server + +When connected to the [Slack MCP Server](https://github.com/slackapi/slack-mcp-server), the agent can search messages and files, read channel history and threads, send and schedule messages, and create and update canvases. When deployed with OAuth (HTTP mode), the agent automatically connects to the Slack MCP Server using the user's token. ## Setup diff --git a/openai-agents-sdk/listeners/views/app_home_builder.py b/openai-agents-sdk/listeners/views/app_home_builder.py index d317218..9413802 100644 --- a/openai-agents-sdk/listeners/views/app_home_builder.py +++ b/openai-agents-sdk/listeners/views/app_home_builder.py @@ -73,6 +73,27 @@ def build_app_home_view( ], } ) + else: + blocks.append( + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "\U0001f534 *Slack MCP Server is disconnected.* ", + }, + } + ) + blocks.append( + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "The Slack MCP Server enables the assistant to search messages, read channels, and more.", + } + ], + } + ) return { "type": "home", diff --git a/openai-agents-sdk/tests/test_view_builders.py b/openai-agents-sdk/tests/test_view_builders.py index 71cdb2c..72decef 100644 --- a/openai-agents-sdk/tests/test_view_builders.py +++ b/openai-agents-sdk/tests/test_view_builders.py @@ -13,7 +13,7 @@ def test_build_feedback_blocks(): def test_build_app_home_view_default(): - """Default args (app.py mode) — no MCP status section.""" + """Default args (Socket Mode) — shows disconnected status with learn-more link.""" view = build_app_home_view() assert view["type"] == "home" @@ -23,11 +23,13 @@ def test_build_app_home_view_default(): assert "header" in block_types assert "section" in block_types - # No MCP status section + # Shows MCP status as disconnected with learn-more link section_texts = [ b["text"]["text"] for b in view["blocks"] if b["type"] == "section" ] - assert not any("Slack MCP Server" in t for t in section_texts) + mcp_section = next(t for t in section_texts if "Slack MCP Server" in t) + assert "disconnected" in mcp_section + assert "Learn how to enable" in mcp_section def test_build_app_home_view_connect(): diff --git a/pydantic-ai/README.md b/pydantic-ai/README.md index bdbc2d3..4b64dd0 100644 --- a/pydantic-ai/README.md +++ b/pydantic-ai/README.md @@ -11,7 +11,11 @@ The starter agent interacts with users through four entry points: * **Channel @mentions** — Mention the agent in any channel to get a response without leaving the conversation. * **Assistant Panel** — Users click _Add Agent_ in Slack, select the agent, and pick from suggested prompts or type a message. -When connected to the [Slack MCP Server](https://github.com/slackapi/slack-mcp-server), the agent can search messages and files, read channel history and threads, send and schedule messages, and create and update canvases. The template also includes one example tool (emoji reactions). Add your own tools to customize it for your use case. +The template also includes one example tool (emoji reactions). Add your own tools to customize it for your use case. + +### Slack MCP Server + +When connected to the [Slack MCP Server](https://github.com/slackapi/slack-mcp-server), the agent can search messages and files, read channel history and threads, send and schedule messages, and create and update canvases. When deployed with OAuth (HTTP mode), the agent automatically connects to the Slack MCP Server using the user's token. ## Setup diff --git a/pydantic-ai/listeners/views/app_home_builder.py b/pydantic-ai/listeners/views/app_home_builder.py index d317218..961cc5a 100644 --- a/pydantic-ai/listeners/views/app_home_builder.py +++ b/pydantic-ai/listeners/views/app_home_builder.py @@ -73,6 +73,27 @@ def build_app_home_view( ], } ) + else: + blocks.append( + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "\U0001f534 *Slack MCP Server is disconnected.* ", + }, + } + ) + blocks.append( + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "The Slack MCP Server enables the assistant to search messages, read channels, and more.", + } + ], + } + ) return { "type": "home", diff --git a/pydantic-ai/tests/test_view_builders.py b/pydantic-ai/tests/test_view_builders.py index 71cdb2c..72decef 100644 --- a/pydantic-ai/tests/test_view_builders.py +++ b/pydantic-ai/tests/test_view_builders.py @@ -13,7 +13,7 @@ def test_build_feedback_blocks(): def test_build_app_home_view_default(): - """Default args (app.py mode) — no MCP status section.""" + """Default args (Socket Mode) — shows disconnected status with learn-more link.""" view = build_app_home_view() assert view["type"] == "home" @@ -23,11 +23,13 @@ def test_build_app_home_view_default(): assert "header" in block_types assert "section" in block_types - # No MCP status section + # Shows MCP status as disconnected with learn-more link section_texts = [ b["text"]["text"] for b in view["blocks"] if b["type"] == "section" ] - assert not any("Slack MCP Server" in t for t in section_texts) + mcp_section = next(t for t in section_texts if "Slack MCP Server" in t) + assert "disconnected" in mcp_section + assert "Learn how to enable" in mcp_section def test_build_app_home_view_connect(): From 85c596af66523f66cd75e218ae4bb0ad3942be97 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Fri, 17 Apr 2026 13:21:10 -0700 Subject: [PATCH 2/2] Update openai-agents-sdk/listeners/views/app_home_builder.py Co-authored-by: Eden Zimbelman --- openai-agents-sdk/listeners/views/app_home_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openai-agents-sdk/listeners/views/app_home_builder.py b/openai-agents-sdk/listeners/views/app_home_builder.py index 9413802..089184d 100644 --- a/openai-agents-sdk/listeners/views/app_home_builder.py +++ b/openai-agents-sdk/listeners/views/app_home_builder.py @@ -89,7 +89,7 @@ def build_app_home_view( "elements": [ { "type": "mrkdwn", - "text": "The Slack MCP Server enables the assistant to search messages, read channels, and more.", + "text": "The Slack MCP Server enables the agent to search messages, read channels, and more.", } ], }