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

@cloud9-labs/mcp-discord

v0.1.0

Published

Discord MCP Server - Interact with Discord API via Model Context Protocol

Readme

Discord MCP Server

Discord API integration for Model Context Protocol (MCP). Interact with Discord servers, channels, messages, and users through Claude Desktop or any MCP client.

Features

  • 12 Discord API Tools for comprehensive Discord automation
  • Rate Limiting (5 requests/second with automatic retry)
  • Type-Safe with TypeScript and Zod schemas
  • Proper MCP SDK Pattern using McpServer and StdioServerTransport

Tools

| Tool | Description | |------|-------------| | discord_send_message | Send a message to a channel | | discord_edit_message | Edit an existing message | | discord_delete_message | Delete a message | | discord_get_channel | Get channel details | | discord_list_guild_channels | List all channels in a server | | discord_get_channel_messages | Get message history (up to 100 messages) | | discord_get_guild | Get server details | | discord_list_guild_members | List server members (up to 1000) | | discord_get_user | Get user details | | discord_add_reaction | Add emoji reaction to a message | | discord_create_channel | Create a new channel | | discord_search_guild_members | Search members by username/nickname |

Setup

1. Create a Discord Bot

  1. Go to Discord Developer Portal
  2. Click "New Application" and give it a name
  3. Go to "Bot" section and click "Add Bot"
  4. Under "Token", click "Reset Token" and copy it
  5. Enable these Privileged Gateway Intents:
    • Server Members Intent
    • Message Content Intent
  6. Go to "OAuth2 > URL Generator"
    • Select scopes: bot
    • Select permissions: Send Messages, Read Message History, Manage Channels, Add Reactions
  7. Copy the generated URL and invite the bot to your server

2. Configure MCP Server

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/Users/A5O1/書類/AI/mcp-discord/dist/index.js"],
      "env": {
        "DISCORD_BOT_TOKEN": "YOUR_BOT_TOKEN_HERE"
      }
    }
  }
}

3. Restart Claude Desktop

After saving the config, restart Claude Desktop to load the MCP server.

Usage Examples

Send a Message

Use discord_send_message to send "Hello from Claude!" to channel ID 123456789

Get Channel Messages

Use discord_get_channel_messages to get the last 10 messages from channel 123456789

Create a Channel

Use discord_create_channel to create a text channel named "general-chat" in guild 987654321

Search Members

Use discord_search_guild_members to find users named "john" in guild 987654321

Finding Discord IDs

Channel ID

  • Right-click a channel → Copy Channel ID (requires Developer Mode enabled)

Guild ID

  • Right-click the server icon → Copy Server ID

User ID

  • Right-click a user → Copy User ID

Message ID

  • Right-click a message → Copy Message ID

Enable Developer Mode: User Settings → Advanced → Developer Mode

Rate Limiting

The client implements token bucket rate limiting:

  • 5 requests per second
  • Automatic retry on HTTP 429 (rate limit exceeded)
  • Respects Retry-After headers from Discord API

API Reference

All tools follow Discord API v10 specifications: https://discord.com/developers/docs/reference

Development

# Build
npm run build

# Watch mode
npx tsc --watch

License

MIT

Repository

https://github.com/cloud9-labs/mcp-discord