Skip to content

Expose Slack attachment downloads by default - #1

Open
jack-arturo wants to merge 1 commit into
masterfrom
feature/add-file-retrieval
Open

Expose Slack attachment downloads by default#1
jack-arturo wants to merge 1 commit into
masterfrom
feature/add-file-retrieval

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

Summary

  • register the read-only attachment_get_data MCP tool without a write-tool opt-in
  • retain explicit SLACK_MCP_ENABLED_TOOLS filtering and clarify the tool uses files.info plus the authenticated private download URL
  • cover registration and file-ID parameter validation

Verification Evidence

  • Surface: Slack MCP stdio
  • Tier 1: go test ./pkg/server ./pkg/handler -run '^(TestParseParamsToolFilesGet|TestShouldAddTool|TestValidToolNames|TestValidateEnabledTools)$' → pass\n- Tier 2: AutoHub live MCP invocation against Very Good Plugins #mars-jack-ajattachment_get_data returned native image/png content (2,043,873 bytes) for Slack file F0BQDT15VB4\n- Claim: an MCP client can retrieve a Slack attachment by file ID without separately enabling a write-style attachment flag.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29dff8d58f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| `SLACK_MCP_MIN_REFRESH_INTERVAL` | No | `30s` | Minimum interval between forced cache refreshes. Prevents API abuse from repeated force-refresh requests. Supports duration format (`30s`, `1m`) or seconds (`60`). Set to `0` to disable rate limiting. |
| `SLACK_MCP_LOG_LEVEL` | No | `info` | Log-level for stdout or stderr. Valid values are: `debug`, `info`, `warn`, `error`, `panic` and `fatal` |
| `SLACK_MCP_ENABLED_TOOLS` | No | `nil` | Comma-separated list of tools to register. If empty, all read-only tools and usergroups tools are registered; write tools (`conversations_add_message`, `reactions_add`, `reactions_remove`, `attachment_get_data`) require their specific env var to be set OR must be explicitly listed here. When a write tool is listed here, it's enabled without channel restrictions. Available tools: `conversations_history`, `conversations_replies`, `conversations_add_message`, `reactions_add`, `reactions_remove`, `attachment_get_data`, `conversations_search_messages`, `conversations_join`, `conversations_leave`, `conversations_unreads`, `conversations_mark`, `channels_list`, `channels_me`, `usergroups_list`, `usergroups_me`, `usergroups_create`, `usergroups_update`, `usergroups_users_update`, `users_search`. |
| `SLACK_MCP_ENABLED_TOOLS` | No | `nil` | Comma-separated list of tools to register. If empty, all read-only tools and usergroups tools are registered; write tools (`conversations_add_message`, `reactions_add`, `reactions_remove`) require their specific env var to be set OR must be explicitly listed here. When a write tool is listed here, it's enabled without channel restrictions. `attachment_get_data` is read-only and registered by default. Available tools: `conversations_history`, `conversations_replies`, `conversations_add_message`, `reactions_add`, `reactions_remove`, `attachment_get_data`, `conversations_search_messages`, `conversations_join`, `conversations_leave`, `conversations_unreads`, `conversations_mark`, `channels_list`, `channels_me`, `usergroups_list`, `usergroups_me`, `usergroups_create`, `usergroups_update`, `usergroups_users_update`, `users_search`. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconcile the remaining attachment opt-in guidance

For users relying on this configuration guide to audit exposed tools, this new statement conflicts with the Tool Registration and Permissions section immediately below, which still classifies attachment_get_data as a write tool that is not registered by default and must be explicitly enabled. Since the server now registers it by default and no longer checks SLACK_MCP_ATTACHMENT_TOOL, the stale section can incorrectly lead operators to believe attachment contents remain inaccessible; update the overview and related examples to reflect the new default.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant