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

linuxdo

v0.2.1

Published

Linux.do CLI and MCP server

Downloads

320

Readme

linuxdo

npm version license

Linux.do CLI and MCP server. Browse topics, search posts, read notifications, and more -- all from your AI coding assistant or terminal.

Features

  • 6 MCP tools: list topics, read threads, search, notifications, bookmarks, private messages
  • 3-layer Cloudflare bypass: TLS fingerprinting → Playwright → real Chrome CDP fallback
  • Interactive auth: guided API key generation via Discourse User API protocol
  • Diagnostics: linuxdo doctor validates runtime and API connectivity

Install

npm install -g linuxdo
# or
pnpm add -g linuxdo

Requires Node.js >= 18. Playwright and Chrome are optional (used only when Cloudflare blocks the primary transport).

Quick Start

1. Get your API key

linuxdo auth

This opens a browser for Linux.do authorization and outputs your API key and username.

2. Configure MCP

Add to your MCP client config (e.g. .mcp.json for Claude Code):

{
  "mcpServers": {
    "linuxdo": {
      "command": "linuxdo-mcp",
      "env": {
        "LINUXDO_USER_API_KEY": "your-api-key",
        "LINUXDO_USERNAME": "your-username"
      },
      "type": "stdio"
    }
  }
}

3. Verify (optional)

linuxdo doctor --verify-api

MCP Tools

| Tool | Description | | ------------------- | ----------------------------------------------------------- | | list_topics | List topics by filter: latest, hot, top, new, unread, category, etc. | | read_topic | Read a topic's content with replies (supports pagination) | | search_topics | Search with Discourse syntax (in:title, category:, @user, etc.) | | get_notifications | Get recent notifications, filterable by type | | get_bookmarks | Get your bookmarked posts | | get_messages | Get your private messages |

Cloudflare Bypass

Linux.do uses Cloudflare protection. The server handles this automatically with a 3-layer strategy:

Request
  |
  v
TLS Transport (primary)          -- TLS fingerprint mimics Chrome
  |  blocked?
  v
Playwright Transport (fallback)  -- headless Chromium with anti-detection
  |  blocked?
  v
CDP Transport (last resort)      -- real Chrome, manual CF verification

CDP fallback: When Cloudflare Turnstile blocks automated browsers, a real Chrome window opens for you to complete verification manually. After that, the session is reused for all subsequent requests. The Chrome profile is persisted at ~/.cache/linuxdo-mcp/chrome-profile so future sessions often pass automatically.

CLI Commands

linuxdo mcp serve

Start the MCP server on stdio. Alias: linuxdo-mcp.

linuxdo auth

Interactive API key generation flow.

Options:

  • --app-name <name> -- application name (default: linuxdo)
  • --client-id <id> -- custom client ID
  • --scopes <list> -- comma-separated scopes
  • --no-open -- don't auto-open browser
  • --no-verify -- skip key verification

linuxdo doctor

Validate environment and runtime.

Options:

  • --verify-api -- perform a real API probe

Environment Variables

Required

| Variable | Description | | ---------------------- | ---------------------- | | LINUXDO_USER_API_KEY | Discourse User API Key | | LINUXDO_USERNAME | linux.do username |

Optional

| Variable | Default | Description | | ---------------------------------------- | --------- | ------------------------------- | | LINUXDO_PROXY_URL | | HTTP proxy URL | | LINUXDO_TIMEOUT_SECONDS | 30 | TLS request timeout | | LINUXDO_MAX_RETRIES | 3 | Rate-limit retry count | | LINUXDO_CDP_FALLBACK | true | Enable CDP real Chrome fallback | | LINUXDO_CDP_PORT | 9222 | Chrome remote debugging port | | LINUXDO_CDP_NAVIGATION_TIMEOUT_MS | 120000 | CDP CF verification timeout (ms)| | LINUXDO_CDP_CHROME_PATH | auto-detect| Chrome executable path override |

| Variable | Default | Description | | ---------------------------------------- | -------------------------------- | -------------------------------------- | | LINUXDO_USER_AGENT | Chrome 131 UA | UA for TLS transport requests | | LINUXDO_PLAYWRIGHT_FALLBACK | true | Enable Playwright fallback (auto-disabled when CDP is on) | | LINUXDO_PLAYWRIGHT_CHANNEL | chrome | Playwright browser channel | | LINUXDO_PLAYWRIGHT_HEADLESS | true | Headless mode for Playwright | | LINUXDO_PLAYWRIGHT_NAVIGATION_TIMEOUT_MS | 60000 | Playwright CF wait timeout (ms) | | LINUXDO_CDP_USER_DATA_DIR | ~/.cache/linuxdo-mcp/chrome-profile | Chrome profile directory (separate from your main Chrome to avoid profile lock conflicts) |

When CDP fallback is enabled, Playwright fallback is automatically skipped to avoid opening two browser windows.

Development

pnpm install
pnpm typecheck        # type checking
pnpm build            # compile TypeScript
npx vitest run        # run tests (158 tests)

Release

pnpm build:publish    # compile + obfuscate
pnpm publish:check    # dry-run
pnpm publish          # publish to npm

References

License

MIT