Add MCP server feature for querying Slack message history#118
Merged
Conversation
Implements an MCP (Model Context Protocol) HTTP server that runs alongside the Slack RTM client, allowing Claude and other MCP clients to reference and retrospect on observable Slack messages. - Add lib/mcp-server.js: StreamableHTTP transport with 6 tools (search_messages, get_recent_messages, list_channels, get_messages_by_channel, get_messages_by_date_range, get_thread_messages) - Add --mcp-port <port> CLI option and mcp.port YAML config support - Add test/mcp_server_test.js: integration tests for all MCP tools Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/mcp-server.jsを新規作成し、プログラム起動中にMCPサーバーとして動作する機能を追加--mcp-port <port>CLIオプション(またはYAMLのmcp.port)指定時にHTTP MCPサーバーを起動公開MCPツール(6種)
list_channelsget_recent_messagessearch_messagesget_messages_by_channelget_messages_by_date_rangeget_thread_messages使い方
Test plan
npm test— 全53テストパス(MCPサーバーテスト8件を含む)npm run lint— ESLintエラーなしPOST /mcpへの initialize リクエストが200を返すことを確認🤖 Generated with Claude Code