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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@el-el-san/discord-mcp

v1.3.0

Published

MCP server for Discord integration with messaging and media file capabilities (images, videos, audio, documents)

Readme

Discord MCP Server

Discord Model Context Protocol (MCP) server that provides tools for interacting with Discord channels. This server allows you to send messages, send images, retrieve messages, and retrieve images from Discord channels.

機能 (Features)

  • メッセージ送信: Discordチャンネルにテキストメッセージを送信
  • 画像送信: Discordチャンネルに画像ファイルを送信
  • メッセージ取得: Discordチャンネルからメッセージを取得
  • 画像取得: Discordチャンネルから画像を取得

インストール (Installation)

npxを使用した簡単インストール(推奨)

# パッケージを直接実行(自動インストール)
npx @el-el-san/discord-mcp

Claude Codeでの設定

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

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["--yes", "@el-el-san/discord-mcp@latest"],
      "env": {
        "DISCORD_BOT_TOKEN": "${DISCORD_BOT_TOKEN}"
      }
    }
  }
}

セットアップ (Setup)

1. Discordボットの作成

  1. Discord Developer Portal にアクセス
  2. "New Application" をクリックして新しいアプリケーションを作成
  3. "Bot" セクションに移動して "Add Bot" をクリック
  4. Bot Token をコピーして保存

2. Bot権限の設定

Bot に以下の権限を付与してください:

  • Send Messages
  • Read Message History
  • Attach Files
  • View Channels

3. プロジェクトのセットアップ

# 依存関係のインストール
npm install

# 環境変数の設定
cp env.example .env
# .envファイルにDiscord Bot Tokenを設定

# TypeScriptのコンパイル
npm run build

# サーバーの起動
npm start

4. 環境変数

.env ファイルを作成し、以下の環境変数を設定:

DISCORD_BOT_TOKEN=your_discord_bot_token_here

使用可能なツール (Available Tools)

discord_send_message

Discordチャンネルにテキストメッセージを送信します。

パラメータ:

  • channel_id (string): Discord チャンネル ID
  • message (string): 送信するメッセージ内容

discord_send_image

Discordチャンネルに画像を送信します。

パラメータ:

  • channel_id (string): Discord チャンネル ID
  • image_path (string): 送信する画像ファイルのローカルパス
  • message (string, optional): 画像に添付するメッセージ

discord_get_messages

Discordチャンネルからメッセージを取得します。

パラメータ:

  • channel_id (string): Discord チャンネル ID
  • limit (number, optional): 取得するメッセージ数 (デフォルト: 10, 最大: 100)

discord_get_images

Discordチャンネルから画像を取得します。

パラメータ:

  • channel_id (string): Discord チャンネル ID
  • limit (number, optional): 検索するメッセージ数 (デフォルト: 50, 最大: 100)

discord_get_messages_advanced

高度な検索機能を使用してメッセージを取得します。日時範囲指定、キーワード検索、ページネーションに対応。

パラメータ:

  • channel_id (string): Discord チャンネル ID
  • limit (number, optional): 取得するメッセージ数 (デフォルト: 50, 最大: 100)
  • before (string, optional): 指定したメッセージIDより前のメッセージを取得
  • after (string, optional): 指定したメッセージIDより後のメッセージを取得
  • start_date (string, optional): 開始日時 (ISO形式, 例: 2024-01-01T00:00:00Z)
  • end_date (string, optional): 終了日時 (ISO形式, 例: 2024-12-31T23:59:59Z)
  • keyword (string, optional): メッセージ内容で検索するキーワード
  • author (string, optional): 特定ユーザー名またはIDでフィルタ
  • has_attachments (boolean, optional): 添付ファイル付きメッセージのみ取得

開発 (Development)

# 開発モードで起動
npm run dev

# TypeScriptコンパイル
npm run build

手動インストール(開発者向け)

MCP サーバーの設定

  1. プロジェクトをクローン・ビルド:
git clone https://github.com/el-el-san/discord-mcp.git
cd discord-mcp
npm install
npm run build
  1. Claude Code の設定ファイルに以下を追加:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/path/to/discord-mcp/build/index.js"],
      "env": {
        "DISCORD_BOT_TOKEN": "your_discord_bot_token_here"
      }
    }
  }
}
  1. Claude Code を再起動

使用例

Claude Code で以下のようにDiscordツールを使用できます:

チャンネル ID 123456789 に "Hello, World!" というメッセージを送信して
チャンネル ID 123456789 から最新の10件のメッセージを取得して
/path/to/image.png をチャンネル ID 123456789 に送信して

高度な検索の例:

チャンネル ID 123456789 から2024年1月のメッセージを取得して
チャンネル ID 123456789 から "error" というキーワードを含むメッセージを検索して
チャンネル ID 123456789 から特定ユーザー "username" のメッセージだけを取得して

注意事項 (Notes)

  • Discord Bot Token は機密情報です。.env ファイルを git にコミットしないでください
  • チャンネル ID を取得するには、Discord で開発者モードを有効にし、チャンネルを右クリックして "Copy ID" を選択してください
  • Bot がチャンネルにアクセスできるよう、適切な権限が設定されていることを確認してください
  • Claude Code の設定ファイルのパスは絶対パスで指定してください