Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion claude-agent-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions claude-agent-sdk/listeners/views/app_home_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ def build_app_home_view(
],
}
)
else:
blocks.append(
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "\U0001f534 *Slack MCP Server is disconnected.* <https://github.com/slack-samples/bolt-python-starter-agent/blob/main/claude-agent-sdk/README.md#slack-mcp-server|Learn how to enable the Slack MCP Server.>",
},
}
)
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",
Expand Down
8 changes: 5 additions & 3 deletions claude-agent-sdk/tests/test_view_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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():
Expand Down
6 changes: 5 additions & 1 deletion openai-agents-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions openai-agents-sdk/listeners/views/app_home_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ def build_app_home_view(
],
}
)
else:
blocks.append(
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "\U0001f534 *Slack MCP Server is disconnected.* <https://github.com/slack-samples/bolt-python-starter-agent/blob/main/openai-agents-sdk/README.md#slack-mcp-server|Learn how to enable the Slack MCP Server.>",
},
}
)
blocks.append(
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "The Slack MCP Server enables the agent to search messages, read channels, and more.",
}
],
}
)

return {
"type": "home",
Expand Down
8 changes: 5 additions & 3 deletions openai-agents-sdk/tests/test_view_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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():
Expand Down
6 changes: 5 additions & 1 deletion pydantic-ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions pydantic-ai/listeners/views/app_home_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ def build_app_home_view(
],
}
)
else:
blocks.append(
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "\U0001f534 *Slack MCP Server is disconnected.* <https://github.com/slack-samples/bolt-python-starter-agent/blob/main/pydantic-ai/README.md#slack-mcp-server|Learn how to enable the Slack MCP Server.>",
},
}
)
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",
Expand Down
8 changes: 5 additions & 3 deletions pydantic-ai/tests/test_view_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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():
Expand Down