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

@lenkli/mcp-server

v0.1.0

Published

Official MCP (Model Context Protocol) server for Lenkli — give your AI agents the ability to create branded short links, generate QR codes, and read click analytics.

Readme

@lenkli/mcp-server

Official Model Context Protocol server for Lenkli — give your AI agents the ability to shorten URLs, generate dynamic QR codes, and read click analytics, all on your own branded domain.

npm version license node

Works with Claude Desktop, Cursor, Continue.dev, ChatGPT Connectors, Claude.ai web, and any MCP-compatible client.

Install (30 seconds)

Add this to your client's MCP config and you are done — sign-in happens automatically through your browser. No env vars, no copy-pasted API key.

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "lenkli": {
      "command": "npx",
      "args": ["-y", "@lenkli/mcp-server"]
    }
  }
}

Restart Claude Desktop. The first tool call opens your browser to authorize the workspace; subsequent calls reuse the saved token at ~/.lenkli/credentials.json.

If your client launched the server before you signed in, run this once in a terminal:

npx -y @lenkli/mcp-server login

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "lenkli": {
      "command": "npx",
      "args": ["-y", "@lenkli/mcp-server"]
    }
  }
}

Continue.dev

~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@lenkli/mcp-server"]
        }
      }
    ]
  }
}

Claude.ai web / ChatGPT Connectors / any HTTP client

These clients speak Streamable HTTP and OAuth 2.1 natively — point them at the hosted endpoint and the browser flow handles the rest:

https://lenkli.com/mcp

No npx, no local install, no env vars.

Tools

| Tool | Scope | Description | | --- | --- | --- | | create_link | write | Shorten a URL on your branded domain. Optional custom slug, title, description, in-app browser bypass. | | list_links | read | Paginate workspace links. Filters: search, archived. | | update_link | write | Change destination, title, or description. | | delete_link | admin | Permanently delete. Requires Business plan. | | get_analytics | read | Click totals, top countries, device breakdown for a link. Default range 30d. | | create_qr_code | read | Render a QR code as base64 PNG or SVG for any link. |

Resources

| Resource | Description | | --- | --- | | lenkli://workspace | Plan, usage, API key scopes — useful for the agent to introspect what it can and cannot do. | | lenkli://link/{id} | Full snapshot of a link including its current destination, click count, and creation metadata. |

CLI

npx -y @lenkli/mcp-server [command]

Commands:
  (no command)  Start the MCP server in stdio mode (default)
  login         Sign in via your browser, store the token locally
  logout        Forget the stored token
  whoami        Show which workspace the current token belongs to
  help          Show this message
  --http        Boot the HTTP transport instead of stdio
  --port <n>    Port for the HTTP transport (default 3333)

Configuration

The server picks credentials in this order:

  1. LENKLI_API_KEY environment variable — useful for headless or CI contexts where the browser flow is not appropriate. Get a key at lenkli.com/dashboard/api-keys.
  2. ~/.lenkli/credentials.json — written by login, the default for desktop clients.

Additional optional env vars:

  • LENKLI_API_URL — override the API host (default https://lenkli.com). Used for staging or self-hosted instances.
  • LENKLI_TELEMETRY — set to 0, false, or off to opt out of the anonymous adoption beacon. The beacon contains zero PII (tool name + duration + status + client name + version) and is fire-and-forget.

Plans

  • Free — unlimited tool calls for the first 25 links per month.
  • Pro ($9/mo) — unlimited links, custom domains, no watermark.
  • Business ($25/mo) — team workspace, admin scope for the delete_link tool, deeper analytics retention.

See lenkli.com/pricing.

Privacy and security

  • Tokens are stored at ~/.lenkli/credentials.json with 0600 permissions on POSIX (owner read+write only).
  • The login flow is the OAuth 2.1 Device Authorization Grant — the same pattern as gh auth login, vercel login, linear login.
  • The hosted endpoint at https://lenkli.com/mcp advertises OAuth 2.1 discovery via WWW-Authenticate so HTTP clients can register themselves dynamically without any operator setup.
  • All data is EU-hosted (Hetzner Germany), GDPR-compliant by default.

Source + bug reports

Code lives in the Lenkli monorepo under apps/mcp-server/. Issues and pull requests welcome.

License

MIT