Making Historical Context Easily Discoverable from Slack with AI - Building slack-explorer-mcp

S

shibayu36

Guest
When working on engineering projects, we often need to understand "why things are the way they are now." Even after reading the code, it's often unclear why certain design decisions were made or why specific specifications exist.

Historical context is often preserved in commit logs, GitHub Pull Requests, and Slack discussions. By combining these sources, we can discover the background behind design decisions, the reasoning for specification choices, and troubleshooting processes that aren't visible in the code itself.

However, finding past discussions in Slack can be quite challenging because:

  • Finding the right search queries for the problem is difficult
  • Extracting the information you need from search results is time-consuming
  • Unlike commit logs or GitHub Pull Requests, there are limited ways for AI agents to directly access Slack information

To make it easier to discover historical context using AI agents, I created an MCP server called slack-explorer-mcp that can retrieve Slack discussions. This has made tracking down historical context incredibly efficient. Let me introduce this tool today.

https://github.com/shibayu36/slack-explorer-mcp

What is slack-explorer-mcp?​


slack-explorer-mcp is an MCP server specifically designed to retrieve Slack messages and thread information using a Slack User Token. It can be used with MCP-compatible AI agents like Claude Code, Claude Desktop, and Cursor.

Key features include:

  • Message search (with advanced filtering by channel, user, date range, reactions, file presence, and more)
  • Retrieving thread replies
  • Fetching user information (by User ID or Display name)

Installation and Setup​


For detailed installation instructions, please refer to the README.md. Basically, you just need to create a Slack App to obtain a User Token, then add the MCP server to your MCP-compatible AI agent like Claude Code or Cursor.

If you have Docker installed and want to add it to Claude Code, you can use the following command with your User Token:


Code:
claude mcp add slack-explorer-mcp -- docker run -i --rm --pull always -e SLACK_USER_TOKEN=xoxp-your-token-here ghcr.io/shibayu36/slack-explorer-mcp:latest

Example 1: Investigating Historical Context​


Let me share some specific examples of when this tool is useful.

Finding Why a BigQuery Table Became a Materialized View​


Recently, I was wondering "Why is this BigQuery table a materialized view?" I could ask Claude Code to investigate with a prompt like:


Code:
Find out from Slack discussions why the foo_summary table in BigQuery is a materialized view.

The AI then investigated the historical context through the following process:

  • Thinking of search queries and performing an initial search
  • Based on the results, creating more specific search queries for several additional searches
  • Reading all content when threads are found

Through this investigation process, it created a summary like "The table was changed to a materialized view at [specific time] for [specific reason]." If you request permalinks, it will also return links to the actual logs so you can verify the details.

Investigating Current SaaS Contract Terms​


Questions like "Why is this SaaS on an annual contract?" or "Why is the quota limit set to this number?" can also be investigated from past Slack content. For example:


Code:
Research from past Slack discussions why the oo SaaS service is on an annual contract and why the quota limit is set to this specific number

Example 2: Other Useful Applications​


Since this tool leverages the Search in Slack functionality, it can be used for various purposes beyond investigating historical context.

  • Summarizing weekly topics in a specific channel
    • Summarize all topics discussed this week in the #random channel
    • Analyzes the week's conversations in the specified channel and lists main topics. Useful for weekly reviews and understanding team trends
  • Summarizing who you talked to and what you discussed today
    • Summarize who shibayu36 talked to today and what they discussed
    • Can summarize a specific user's daily activities. Useful for writing daily reports or summarizing someone's activities

Conclusion​


With slack-explorer-mcp, you can easily search and analyze past Slack discussions from Claude Code or Cursor. Try it out when you need to understand historical context that isn't visible in code, or when you want to summarize team activities. I think you'll find it quite useful!

References​

Appendix: Differences from Other MCP Tools​


While there are other MCP tools for Slack, I created this new one because existing tools had some limitations for my use case.

  • ubie-oss/slack-mcp-server
    • Provides various bot-perspective operations with many features
    • To focus only on information retrieval, you need to add the bot to many channels, which was inconvenient for casual information gathering
    • Should be useful when you want AI agents to operate Slack bots
  • korotovsky/slack-mcp-server
    • Similar to this tool, offers many features for information retrieval
    • However, it requires browser authentication tokens, which I felt was quite poor security practice, so I didn't want to use it

Continue reading...
 


Join 𝕋𝕄𝕋 on Telegram
Channel PREVIEW:
Back
Top