lonniev

Tollbooth Shortlinks

Community lonniev
Updated

Ephemeral, human-friendly short URLs for Tollbooth MCP services

Tollbooth Shortlinks

LicenseVersionPython

Don't Pester Your Customer™ (DPYC™) — Ephemeral, human-friendly short URLs for the Tollbooth ecosystem.

The metaphors in this project are drawn with admiration from The Phantom Tollbooth by Norton Juster, illustrated by Jules Feiffer (1961). Milo, Tock, the Tollbooth, Dictionopolis, and Digitopolis are creations of Mr. Juster's extraordinary imagination. We just built the payment infrastructure.

Why This Exists

OAuth Authorization URLs are long, ugly, and hostile to copy-paste:

https://api.schwab.com/v1/oauth/authorize?client_id=abc123&redirect_uri=https%3A%2F%2F
fastmcp.cloud%2Foauth%2Fcallback%3Fserver_id%3D...&scope=...&response_type=code&state=...

Traditional link shorteners have become opinionated. They inject interstitialpages, track clicks, require accounts, gate features behind paywalls, orsilently expire links on their own schedule. When an MCP server needs to handa patron a one-time URL for an OAuth dance, none of that belongs in the path.

Tollbooth Shortlinks is a community utility with no monetization. It turnsany URL into a memorable four-word phrase like brave-otter-finds-gold, storesthe mapping in Neon Postgres, and expires it after 24 hours. A companionVal Town HTTP handler does the 302 redirect with zero interstitial.

How It Works

MCP Server                    Shortlinks MCP              Val Town
    |                              |                         |
    |-- create_shortlink(url) ---->|                         |
    |<-- brave-otter-finds-gold ---|                         |
    |                              |                         |
    |  (patron clicks short URL)   |                         |
    |                              |    GET /brave-otter-..  |
    |                              |<------------------------|
    |                              |    Neon lookup           |
    |                              |-- 302 redirect -------->|
    |                              |                         |
    |        (24h later)           |                         |
    |                              |  link expires silently   |

Tools

Tool Description
create_shortlink Store a URL, get back a memorable slug (or supply your own)
resolve_shortlink Look up where a slug points without redirecting
delete_shortlink Remove a shortlink before it expires
shortlink_status Health check showing active link count and TTL

All tools are free -- no credits, no npub, no Tollbooth ledger required.

Install

pip install -e ".[dev]"

Run Locally

export NEON_SHORTLINKS_URL="postgres://user:[email protected]/shortlinks"
python -c "from server import mcp; mcp.run()"

Deploy to Horizon

The .fastmcp.yaml at the repo root is ready for fastmcp deploy.

DPYC Identity

Tollbooth Shortlinks is registered as an Advocate in the DPYC Social Contract.Peer MCP servers discover its URL via registry lookup:

from tollbooth import resolve_service_by_name

shortlinks_url = resolve_service_by_name("tollbooth-shortlinks")
redirect_base  = resolve_service_by_name("tollbooth-shortlinks-redirect")

Related Repos

The Tollbooth DPYC™ ecosystem:

Repo Role
tollbooth-dpyc The wheel -- operator-side credit ledger, BTCPay client, tool gating, constraint engine
tollbooth-authority The institution -- fee collection, Schnorr signing, purchase certification
dpyc-oracle The oracle -- Social Contract governance, membership, ban elections
dpyc-community The registry -- governance data, operator catalog, community rules
tollbooth-sample Reference operator -- weather API with full Tollbooth wiring
cypher-mcp Monetized graph answers -- named Cypher over Neo4j/AuraDB
schwab-mcp Charles Schwab brokerage MCP -- trading, quotes, portfolio access
excalibur-mcp eXcalibur -- formatted posting to X (Twitter)
thebrain-mcp Personal Brain MCP -- thought graphs, knowledge management
taxsort-mcp Tax sorting and classification MCP
optionality-mcp Options analytics MCP
tollbooth-shortlinks (this repo) Community utility -- ephemeral short URLs for OAuth flows
tollbooth-oauth2-collector OAuth2 callback collector -- browser-based token exchange
tollbooth-pricing-studio iOS app -- operator dashboard and pricing model editor

License

Apache-2.0. See LICENSE for details.

MCP Server · Populars

MCP Server · New

    PSU3D0

    agent-spreadsheet

    MCP server for spreadsheet analysis and editing. Slim, token-efficient tool surface designed for LLM agents.

    Community PSU3D0
    pitiflautico

    NeoBrowser

    MCP server that drives real Chrome with your real logged-in sessions — genuine fingerprint (passes bot.sannysoft), human-like input, bot-wall aware. 43 tools, single static Rust binary.

    Community pitiflautico
    aeonfun

    Aeon MCP Server

    The most autonomous AI agent framework: runs unattended on GitHub Actions, self-healing skills, drives Claude Code, Grok, Codex & more. No approval loops. Configure once, forget forever.

    Community aeonfun
    nhadaututtheky

    NeuralMemory

    NeuralMemory stores experiences as interconnected neurons and recalls them through spreading activation, mimicking how the human brain works. Instead of searching a database, memories are retrieved through associative recall - activating related concepts until the relevant memory emerges.

    Community nhadaututtheky
    norrietaylor

    Distillery

    Team knowledge evaporates daily — pairing sessions, debugging context, architectural rationale lost to Slack. Distillery captures it at the point of creation, connects it into a living graph, and surfaces it conversationally. It monitors feeds, tracks what matters to your projects, and alerts you before you know to ask. A team brain that learns.

    Community norrietaylor