npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jict/slack-mcp-server

v0.4.0

Published

MCP server for Slack message retrieval and search

Downloads

17

Readme

Slack MCP Server

AI エージェント向けのSlack連携MCPサーバーです。Claude DesktopやClaude CodeなどのMCPクライアントから使用します。

🚀 MCP クライアント設定

Claude Desktop / Claude Code

設定ファイルに以下を追加:

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["@jict/slack-mcp-server@latest"],
      "env": {
        "SLACK_USER_TOKEN": "xoxp-your-user-token"
      }
    }
  }
}

Slack User Token の取得

OAuth認証システム でトークンを取得してください。

必要な Slack 権限

User Token には以下のスコープが必要です:

  • channels:read + channels:history - パブリックチャンネル
  • groups:read + groups:history - プライベートチャンネル
  • im:read + im:history - DM
  • mpim:read + mpim:history - グループDM
  • search:read - メッセージ検索
  • users:read - ユーザー情報(表示名取得)

⚙️ 開発コマンド

ビルド

pnpm -F @jict/slack-mcp-server build

開発モード(ファイル監視)

pnpm -F @jict/slack-mcp-server dev

本番実行

pnpm -F @jict/slack-mcp-server start

🧪 ローカル動作確認

各ツールを個別に動作確認できます:

セットアップ

# 1. .envファイルを作成
cp .env.example .env

# 2. .envファイルを編集してSLACK_USER_TOKENを設定
# SLACK_USER_TOKEN=xoxp-your-actual-token-here

使用方法

インタラクティブモード

対話的にツールをテストできます:

pnpm -F @jict/slack-mcp-server dev:tool

# Tool name: slack_get_message
# Slack message permalink: https://workspace.slack.com/archives/...
# [結果が表示されます]

コマンドラインモード

パラメータを直接指定して実行:

# メッセージ取得
pnpm -F @jict/slack-mcp-server dev:tool slack_get_message --link "https://workspace.slack.com/archives/..."

# スレッド取得
pnpm -F @jict/slack-mcp-server dev:tool slack_get_thread --channel C12345 --thread_ts 1234567890.123456

# メッセージ検索
pnpm -F @jict/slack-mcp-server dev:tool slack_search_messages --query "test" --from user123 --count 10

# メンション取得
pnpm -F @jict/slack-mcp-server dev:tool slack_get_mentions --mention_types personal channel

ヘルプ表示

pnpm -F @jict/slack-mcp-server dev:tool --help

🛠️ 利用可能なツール

slack_get_message

Slack メッセージのパーマリンクから個別メッセージを取得

{
  link: 'https://workspace.slack.com/archives/C1234567890/p1234567890123456'
}

slack_get_thread

スレッド全体のメッセージを取得

{
  channel: "C1234567890",
  thread_ts: "1234567890.123456",
  limit?: 1000  // デフォルト: 1000
}

slack_search_messages

メッセージを柔軟な条件で検索

{
  query?: "検索キーワード",       // オプション:検索クエリ
  channel?: "C1234567890",       // オプション:特定チャンネル内検索
  from?: "U1234567890",          // オプション:特定ユーザーの投稿を検索(ユーザーIDまたはユーザー名)
  after?: "2025-08-13",          // オプション:指定日以降のメッセージ(YYYY-MM-DD形式)
  before?: "2025-08-15",         // オプション:指定日以前のメッセージ(YYYY-MM-DD形式)
  on?: "2025-08-14",             // オプション:指定日のメッセージ(YYYY-MM-DD形式)
  count?: 20                     // 取得件数(デフォルト: 20、最大: 100)
}

注意: queryfromonafterbefore のいずれか1つ以上が必須です。

使用例

// ユーザー単位での検索(その人の発言を新しい順にリスト)
{
  from: "U03472W2HD5"
}

// 今日の特定ユーザーの投稿
{
  from: "U03472W2HD5",
  on: "2025-08-14"
}

// 特定チャンネルでの日付範囲検索
{
  channel: "C1234567890",
  after: "2025-08-13",
  before: "2025-08-15"
}

// キーワードと日付の組み合わせ
{
  query: "リリース",
  on: "2025-08-14"
}

slack_get_mentions

自分宛てのメンションを取得

{
  mention_types?: ["personal", "channel", "here", "usergroup"]  // 取得するメンションタイプ(デフォルト: 全タイプ)
}

メンションタイプ:

  • personal: 個人メンション(@username)
  • channel: @channel メンション
  • here: @here メンション
  • usergroup: ユーザーグループメンション(@team-name など)

使用例

// 全てのメンションを取得(デフォルト)
{
}

// 個人メンションのみ取得
{
  mention_types: ['personal']
}

// @channelと@hereメンションを取得
{
  mention_types: ['channel', 'here']
}

// ユーザーグループメンションを含む複数タイプ
{
  mention_types: ['personal', 'usergroup']
}

🌐 パブリック公開

このパッケージは npm でパブリック公開されています:

  • NPM パッケージ: https://www.npmjs.com/package/@jict/slack-mcp-server
  • アクセス: public (誰でも利用可能)
  • 認証: 不要

📄 ライセンス

MIT License

🔗 関連リンク