Skip to content

shrtnr

Self-hosted short link service on Cloudflare Workers with REST API, SDKs and an MCP server

Permissive (OSI) · Apache-2.0

Listed by , founder & editor

74

Health

Active

Overview

Stars

33

Last commit

today

Nov 2026

Repository age

8 months

since Mar 2026

Latest version

app-v0.43.2

Nov 2026

Contributors

–

3 active in 90 days

Releases

25

last 12 months

Language

TypeScript

shrtnr is a URL shortener you run on your own Cloudflare account. It uses Workers and D1 and is built to fit inside the free tier. You manage links from a dashboard, from code, or through an AI assistant.

Every deployment includes a REST API with an OpenAPI 3.1 spec and a live reference page. Typed SDKs exist for TypeScript, Python and Dart. A native MCP server lets Claude, Copilot and other MCP clients shorten URLs, add slugs, group links into bundles and query analytics. Sign-in goes through Cloudflare Access, so each teammate has their own identity and API keys act as that person. Only a link's creator can edit, disable or delete it.

One destination can have several slugs, each with its own click count. Bundles combine the clicks of a campaign's links into one report. Analytics cover countries, referrers, devices, browsers and QR scans versus link clicks. It is a self-hosted alternative to Bitly.

Who it's for

Developers adding short links to an app

The OpenAPI-documented REST API, typed SDKs and idempotent link creation fit into existing code.

Skip if: You only need a simple dashboard and do not want to write code against an API.

Teams who want per-person ownership of links

Cloudflare Access gives each person an identity, and only creators can change their links.

Skip if: You want everyone to edit everything or cannot use Cloudflare Access.

People who want an AI assistant to manage links

The built-in MCP server exposes link, bundle and analytics tools with OAuth sign-in.

Skip if: You do not use MCP clients.

The problem it solves

Hosted link shorteners charge for API access and keep your links and click data on their servers. shrtnr gives you your own shortener that code and AI assistants can drive, with per-user ownership of links.

Strengths

  • Native MCP server with tools for links, slugs, bundles, QR codes and analytics
  • REST API with OpenAPI 3.1 spec and SDKs for TypeScript, Python and Dart
  • Bundles report combined clicks, countries, referrers and devices for a campaign
  • Several slugs per link, each with separate click tracking
  • Runs on Cloudflare Workers and D1 within the free tier

Trade-offs

  • Needs a Cloudflare account to run
  • No link-in-bio pages
  • No built-in UTM builder
  • Young project with a small contributor base

shrtnr replaces

Self-host shrtnr

Self-hostable
Yes

Frequently asked questions

Is shrtnr free?

Yes. It is Apache-2.0 licensed and designed to run inside the Cloudflare free tier.

Can I self-host it?

Yes. You deploy it to your own Cloudflare account using Workers and D1.

Which SDKs are available?

TypeScript on npm, Python on PyPI and Dart or Flutter on pub.dev.

Does it work with AI assistants?

Yes. The MCP server works with Claude, Copilot and other MCP clients, authenticated through OAuth on Cloudflare Access.

Does it replace Bitly?

For shortening, custom slugs, QR codes and click analytics, yes. It has no link-in-bio pages.

Other Bitly alternatives

Compare all 5 Bitly alternatives →

Similar tools in Marketing and customer engagement tools

Shlink

Marketing and customer engagement tools

Self-hosted PHP URL shortener with REST API and CLI for your own domain

5.4k 456 2 days ago Thriving MIT

Replaces Bitly

Formbricks

Marketing and customer engagement tools

Self-hosted survey platform for product teams running in-app and link surveys

13k 2.6k today Thriving AGPL-3.0

Replaces Google FormsQualtricsTypeform

Postiz

Marketing and customer engagement tools

Self-hostable social media scheduler with AI features and a public API

42k 8.1k today Thriving AGPL-3.0

Replaces BufferHootsuite

serpbear

Marketing and customer engagement tools

Self-hosted Google keyword rank tracker with email alerts, for site owners and SEO teams

2.2k 315 24 days ago Slowing MIT

YOURLS

Marketing and customer engagement tools

Self-hosted PHP URL shortener with stats and plugins for your own domain

12k 2.1k 4 days ago Active MIT