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

opn-mcp

v1.1.0

Published

Model Context Protocol server for opn.onl — the open-source, self-hostable URL shortener. Lets AI assistants shorten links, read analytics, and manage links.

Readme

opn-mcp

An MCP server for opn.onl — the open-source, self-hostable URL shortener. It lets AI assistants (Claude Desktop, Cursor, etc.) shorten links, read analytics, generate QR codes, and manage links in natural language.

Works against the hosted service or your own self-hosted instance.

Setup

1. Get an API key

On your opn.onl instance, go to Settings → API Keys, create a key, and copy it (it starts with opn_ and is shown once).

2. Add the server to your MCP client

Claude Desktop — edit claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):

{
  "mcpServers": {
    "opn": {
      "command": "npx",
      "args": ["-y", "opn-mcp"],
      "env": {
        "OPN_API_KEY": "opn_your_key_here"
      }
    }
  }
}

Restart your client. That's it — it talks to the hosted API (https://l.opn.onl) by default.

Not published to npm yet? Use the GitHub source instead — same config, just swap the args: "args": ["-y", "github:ysalitrynskyi/opn-mcp"] (it builds on install).

Self-hosted instance

Point OPN_BASE_URL at your own instance's API host:

{
  "mcpServers": {
    "opn": {
      "command": "npx",
      "args": ["-y", "opn-mcp"],
      "env": {
        "OPN_API_KEY": "opn_your_key_here",
        "OPN_BASE_URL": "https://l.your-domain.com"
      }
    }
  }
}

Configuration

| Env var | Required | Default | Description | |---------|----------|---------|-------------| | OPN_API_KEY | ✅ | — | Your API key (opn_…), from Settings → API Keys | | OPN_BASE_URL | — | https://l.opn.onl | API base URL — set this for a self-hosted instance |

Tools

| Tool | Description | |------|-------------| | shorten_url | Create a short link (url, optional alias / title / expiry / password) | | list_links | List your links (limit, offset, search) | | get_link_stats | Click analytics for a link (geo, devices, browsers, referrers) | | update_link | Update a link's destination, title, expiry or password | | delete_link | Delete a link | | get_qr_code | Get a link's QR image — optional brand colour, centre logo, PNG/SVG | | check_url_health | Check a destination URL is reachable before shortening |

Example prompts

  • "Shorten https://example.com/very/long/url and call it launch-2026"
  • "How many clicks did link 42 get, and from which countries?"
  • "Give me a branded SVG QR code for link 42"
  • "List my last 10 links"

Development

npm install
npm run build      # tsc → dist/
npm test           # vitest
OPN_API_KEY=opn_… npm run dev   # run from source (stdio)

License

MIT © ysalitrynskyi. Part of the opn.onl project.