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

discord-readonly-mcp

v1.0.1

Published

A tiny, dependency-free, read-only Discord MCP server: fetch any message by ID (any age), paginate channel history, and read channel/guild info. No write or admin tools.

Readme

discord-readonly-mcp

A tiny, dependency-free, read-only Model Context Protocol server for Discord.

It lets an MCP client (Claude Code, Claude Desktop, Cursor, …) read Discord: fetch any message by ID (no matter how old), page through channel history, and look up channel/server info — and nothing else. It only issues GET requests, so it can never send, delete, or modify anything. Ideal for letting an AI read a support/bug-report channel without granting it write access.

Quick start (npx)

Published on npm — no clone or install needed. Add this to your MCP client config (Claude Code / Cursor .mcp.json, Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "discord-readonly": {
      "command": "npx",
      "args": ["-y", "discord-readonly-mcp@latest"],
      "env": { "DISCORD_TOKEN": "your_bot_token" }
    }
  }
}

Restart the client, approve the server, and you're done. (See Requirements below for how to get a bot token.)

Why this exists

Most Discord MCP servers either can't fetch an old/specific message by ID (they only return the newest ~100 with no cursor), or they bundle lots of write/admin tools you may not want pointed at a production community. This one is GET-only, has zero npm dependencies, and is a single ~200-line file.

Tools

| Tool | What it does | |------|--------------| | discord_get_message | Fetch one message by ID — any age. Use for links like …/channels/<guild>/<channel>/<message>. | | discord_read_messages | List messages oldest-first; limit 1–100; before/after/around cursors to page through history. | | discord_get_channel | Channel/thread metadata (name, type, parent, guild). | | discord_get_server_info | A guild and the list of its channels. |

Requirements

  • Node 18+ or bun (uses the runtime's global fetch; no install/build step).
  • A Discord bot token:
    1. Create an app + bot at https://discord.com/developers/applications.
    2. Copy the bot token (Bot → Reset Token).
    3. Invite the bot to your server with View Channels + Read Message History (OAuth2 → URL Generator → scope bot).
    • Message Content Intent is not required — the REST API returns message content to an authorized bot regardless of the gateway intent.

Run

git clone https://github.com/Vorakorn1001/discord-readonly-mcp.git
cd discord-readonly-mcp
DISCORD_TOKEN=your_bot_token node index.mjs   # or: bun index.mjs

The server talks MCP over stdio, so you normally don't run it by hand — your MCP client launches it. Token can also be passed as --config <token> instead of the env var.

Use it in an MCP client

Claude Code / Cursor (.mcp.json)

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/absolute/or/relative/path/to/discord-readonly-mcp/index.mjs"],
      "env": { "DISCORD_TOKEN": "your_bot_token" }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

Same shape under mcpServers. Restart the client and approve the server on first use.

Keep your token out of version control — put it in the client config's env, not in code. This repo intentionally contains no token.

Quick manual test

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{}}}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| DISCORD_TOKEN=your_bot_token node index.mjs

You should see an initialize result followed by the four tools.

How it works

MCP's stdio transport is just newline-delimited JSON-RPC 2.0: the client launches this process and exchanges one JSON message per line over stdin/stdout. The server handles initialize, tools/list, and tools/call, mapping each tool to a Discord REST GET. All logging goes to stderr so stdout stays a clean protocol stream.

Security

  • Read-only: only performs GET requests. No message sending, deleting, moderation, or server management.
  • The bot can only see servers it has been invited to, with whatever channel permissions you grant it.

License

MIT © Vorakorn Kosidphokin