27 Commits

Author SHA1 Message Date
Paymahn Moghadasian 6a972a1f05 feat: add slack-cli, a no-daemon CLI over the slack-mcp-server engine
Turn the forked slack-mcp-server into a CLI so running many agents no
longer means one resident MCP process each. Every command is a
short-lived process that reads the shared on-disk cache.

- rename module to github.com/paymog/slack-cli (go install/homebrew/ldflags)
- internal/toolcall: invoke the upstream tool handlers in-process; the only
  mcp-go coupling lives here, so pkg/handler and pkg/provider are reused
  byte-for-byte (clean upstream merges, fork-and-extend)
- internal/{cli,cmds,config,credstore,runtime,output}: cobra command tree,
  keyring-backed credential profiles, provider bootstrap, result printing
- 21 tools as subcommands (channels, conversations, users, usergroups,
  saved, reactions, attachments, cache); write tools keep their env gating
- goreleaser + homebrew release workflow; ships a skills/slack-cli skill
- unit tests for config/credstore/toolcall; MCP server still builds

The MCP server (cmd/slack-mcp-server) is kept intact.
2026-06-26 11:04:05 -05:00
George Bashi ae3c7b4f13 perf: remove sort param from channels_me, always use fast path
The sort=popularity option forced fetching every channel the user belongs
to before sorting client-side — hundreds of API calls on large workspaces.
The Slack API doesn't support server-side sorting, so this was inherently
expensive. Remove it and always stop fetching once we have enough results,
using the Slack API's native cursor for pagination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 22:20:31 +02:00
George Bashi 6f0114928a perf: stop fetching all API pages in channels_me when not needed
When sort is not "popularity", stop paginating the Slack API as soon as
we have enough results for the requested limit, and pass through the
API's native cursor. On large workspaces this avoids hundreds of API
calls when only a small number of channels are requested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 22:20:31 +02:00
George Bashi 55842fe2c8 feat: add channels_me tool
Add a new MCP tool to list channels the calling user is a member of,
using the users.conversations API. Follows the same pattern as
usergroups_me vs usergroups_list.

Unlike channels_list which returns all workspace channels, channels_me
returns only channels the user has joined — useful on large workspaces
where channels_list returns thousands of results.

Supports channel_types, sort (by popularity), limit, and cursor
parameters.
2026-05-14 22:20:31 +02:00
unsafe9 ab1cb7d1a1 refactor: align query_targets parsing with channel_types pattern
Use map[string]bool instead of struct, parse inline in handler with
warn logging for invalid values, matching filterChannelsByTypes style.
2026-03-25 01:05:16 +09:00
unsafe9 06fa3b1931 feat: add query and query_targets parameters to channels_list tool
Closes #251. Adds keyword filtering to channels_list so users can find
channels without paginating through the entire list. Matches are
case-insensitive substrings; query_targets controls which fields to
search (name by default, optionally topic and purpose).
2026-03-25 00:51:57 +09:00
Dmitrii Korotovskii b95d0e3ffd reduce logs 2025-07-20 13:44:14 +02:00
Dmitrii Korotovskii 4ed6f91f0a Added zap logger 2025-07-20 00:52:03 +02:00
Dmitrii Korotovskii 3b2ed88536 unify generic and edge api into single client, remove "slack2" dependency 2025-07-19 19:31:41 +02:00
Dmitrii Korotovskii 4acad7ff06 added authentication for resources 2025-07-16 10:40:42 +02:00
Dmitrii Korotovskii 70d9095a69 check if provider is ready 2025-07-15 15:27:12 +02:00
Dmitrii Korotovskii 627d668777 channels resource 2025-07-15 15:25:32 +02:00
Dmitrii Korotovskii be186667ac Indicate that sync process (users, channels) is in process andreport it to the user and into logs 2025-07-15 12:06:30 +02:00
Dmitrii Korotovskii 525a91deb7 channels_list fix for cursor, chaned channels cache default file name to invalidate cache for everyone 2025-07-10 00:36:03 +02:00
Dmitrii Korotovskii 4983e1098b add logic to improve fetching channels list on slack workspaces with enterprise setting 2025-06-29 22:45:50 +02:00
Dmitrii Korotovskii d5e746f5f3 make limit optional for channels_list 2025-06-21 20:07:23 +02:00
Dmitrii Korotovskii cce4e7e5b3 improved MpIM handling 2025-06-17 13:20:53 +02:00
Dmitrii Korotovskii 9b45cfd113 Merge pull request #20 from korotovsky/fetch-conversations-by-channel-name
Сhannels maps to resolve conversations.list by channel name
2025-06-17 12:16:12 +02:00
Octavian Rinciog 22b794504f fix: don't generate name for mpim conversation 2025-06-17 11:32:37 +03:00
Dmitrii Korotovskii 0ce5a61ba0 channels maps to resolve conversations.list by channel name instead of id 2025-06-16 20:27:52 +02:00
Octavian Rinciog b8ede8e1df feat: display username in conversation list 2025-06-16 18:34:26 +03:00
Dmitrii Korotovskii c25910e7fe fix for channels_list, added limit check on maximum limit value 2025-06-13 09:29:53 +02:00
Shuyang Wang fcfcd31ebd Update format and README 2025-06-07 12:17:18 -07:00
Shuyang Wang b4cabd12af Use Get method of CallToolRequest for safe param access 2025-06-06 19:18:55 -07:00
Shuyang Wang ae75f5563d more flexible params for channels_list 2025-06-06 12:49:27 -07:00
Dmitrii Korotovskii 0958f563f0 channels_list tool accepts channel_types now as a plain comma-separated string to simplify interface and tool discovery instead of complex array struct, added extra validations 2025-06-06 10:24:33 +02:00
Dmitrii Korotovskii 6bfa56fccf changed project layout, prepare for npm releases 2025-04-23 14:18:18 +02:00