Tollbooth Shortlinks logo

Tollbooth Shortlinks

Creates memorable, expiring short URLs backed by Neon Postgres for OAuth flows and other MCP service links.

Install Tollbooth Shortlinks

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://api.schwab.com/v1/oauth/authorize?client_id=abc123&redirect_uri=https%3A%2F%2F

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Claude Code command
claude mcp add --transport http tollbooth-shortlinks 'https://api.schwab.com/v1/oauth/authorize?client_id=abc123&redirect_uri=https%3A%2F%2F'

Run in your terminal, then run /mcp in Claude Code to sign in if the server asks.

Overview

tollbooth-shortlinks MCP server creates memorable four-word slugs for long URLs, stores them in Neon Postgres, and exposes lookup, deletion, and status tools. Links expire after 24 hours, while a companion Val Town handler can redirect requests with a 302 response and no interstitial page. Reach for it when an MCP service needs to share a temporary, copy-friendly OAuth or callback URL without relying on a traditional link-shortening service.

Use cases

  • Create temporary OAuth authorization links
  • Share long callback URLs in a copy-friendly form
  • Resolve a shortlink before following it
  • Remove temporary links before expiration
  • Monitor active links and their TTL

Key features

  • Four-word memorable slugs
  • Optional caller-defined slugs
  • 24-hour automatic expiration
  • Neon Postgres storage
  • 302 redirects through a Val Town handler
  • MCP tools for creation, lookup, deletion, and status

Tools4

What Tollbooth Shortlinks lets your agent do. Expand a tool for its parameters.

Self-reported~63 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 84d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit5d agoMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.

How Tollbooth Shortlinks works

What tollbooth-shortlinks does

tollbooth-shortlinks provides temporary short URLs for the Tollbooth ecosystem and other MCP workflows that need to pass around long URLs. A submitted URL is associated with a memorable slug, such as a four-word phrase, and the resulting full short URL is returned to the caller. Callers may also provide their own slug.

The service is designed for short-lived links, including OAuth authorization flows. Each mapping is retained for 24 hours before expiration. The project does not require credits, an npub, or a Tollbooth ledger to use its MCP tools.

How it works

The MCP process writes and reads link mappings in a Neon Postgres database. create_shortlink inserts a URL and returns its slug and short URL; resolve_shortlink retrieves the destination without performing a redirect. delete_shortlink removes a mapping early, and shortlink_status reports the active-link count and configured time-to-live.

Redirect traffic is handled separately by the Val Town function in val/redirect.js. It reads the same Neon database, finds the slug, and responds with an HTTP 302 redirect. The redirect host defaults to https://tollbooth.val.run, while the MCP response includes the complete short URL so callers do not need to construct that host themselves.

Peer Tollbooth services can discover the service URL through the DPYC Oracle. Operators using tollbooth-dpyc can call the shortlink helper, which performs discovery and the request on a best-effort basis.

Setup and configuration

Install the package with:

Terminal
pip install -e ".[dev]"

Set NEON_SHORTLINKS_URL to a Neon Postgres connection string before starting the MCP process. SHORTLINK_REDIRECT_BASE optionally changes the host placed in generated short URLs; if omitted, the default is https://tollbooth.val.run.

Run the local MCP process with:

server.ts
python -c "from server import mcp; mcp.run()"

The Val Town redirect handler must use the same NEON_SHORTLINKS_URL value. The repository also includes a fastmcp.json configuration prepared for fastmcp deploy.

Tools and capabilities

  • create_shortlink: Stores a destination URL and generates a memorable slug, or uses a caller-supplied slug.
  • resolve_shortlink: Returns the destination associated with a slug without redirecting the requester.
  • delete_shortlink: Deletes a shortlink before its automatic expiration.
  • shortlink_status: Provides a health-oriented view of active links and their TTL.
  • Automatic expiration: Removes links after 24 hours.
  • HTTP redirection: The companion Val Town handler returns a direct 302 response without an interstitial page.

Limitations and notes

Shortlinks are intentionally ephemeral rather than permanent. The MCP tools manage database records, while browser-facing redirects depend on the separate Val Town handler. Neon Postgres is required for shared storage between those components. The redirect base can be changed for generated URLs, but the handler and MCP service must be configured against the same database.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Tollbooth Shortlinks

tollbooth-shortlinks is an MCP server that connects MCP services to Neon Postgres for temporary URL storage. Its main tools create memorable shortlinks, resolve slugs without redirecting, delete links early, and report active-link count and TTL. A companion Val Town handler provides browser-facing 302 redirects.

Install it with `pip install -e ".[dev]"`. Set `NEON_SHORTLINKS_URL` to a Neon Postgres connection string, then start it with `python -c "from server import mcp; mcp.run()"`.

Set `SHORTLINK_REDIRECT_BASE` to the host you want included in generated short URLs. The default is `https://tollbooth.val.run`; the Val Town handler must use the same `NEON_SHORTLINKS_URL` as the MCP service.

Links remain available for 24 hours. `delete_shortlink` can remove a mapping sooner, and expired rows are deleted automatically.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTollbooth Shortlinks AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/tollbooth-shortlinks?style=directory)](https://allmcps.com/mcp/tollbooth-shortlinks)
HTML Embed
<a href="https://allmcps.com/mcp/tollbooth-shortlinks"><img src="https://allmcps.com/api/badge/tollbooth-shortlinks?style=directory" alt="Tollbooth Shortlinks on AllMCPs" /></a>