Tollbooth Shortlinks

io.github.lonniev由 GitHub 账号 lonniev 发布v0.2.0更新于 Oct 24, 2026

Ephemeral, human-friendly short URLs for Tollbooth MCP services

已验证Streamable HTTP可网页运行效率与工作流开发者工具

概览

AI 生成的概览

把长网址转换成 24 小时后过期的四词短链接,适用于 OAuth 等一次性链接。

可以做什么
  • 根据网址创建短链接,可自定义 slug,并返回完整短网址
  • 查询某个 slug 指向哪里,而不实际跳转
  • 在 24 小时过期前删除短链接
  • 查看服务健康状态、有效链接数量和 TTL
适用场景
适合需要把简短、便于复制粘贴的网址交给用户时使用,例如 OAuth 授权链接,且不希望出现中间页或点击追踪。它是社区小工具,并非通用链接管理服务。
运行要求
通过 streamable HTTP 连接的远程端点;未声明需要认证、环境变量或请求头。若改为本地运行,需要 Python、在 NEON_SHORTLINKS_URL 中配置 Neon Postgres 连接串,并可选设置 SHORTLINK_REDIRECT_BASE 指定跳转域名。
安装前请注意
任何能访问该端点的人都能创建、查询和删除短链接,且未声明任何认证。链接是公开的并在 24 小时后过期,不要用于机密信息或需要长期可访问的内容。创建的网址会存入第三方 Postgres 数据库,跳转由另一个 Cloudflare Worker 提供。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Tollbooth Shortlinks,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.lonniev%2Ftollbooth-shortlinks/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "tollbooth-shortlinks": {
      "type": "http",
      "url": "https://tollbooth-shortlinks.fastmcp.app/mcp"
    }
  }
}

README

Tollbooth Shortlinks

[License] [Python]

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%2Ffastmcp.cloud%2Foauth%2Fcallback%3Fserver_id%3D...&scope=...&response_type=code&state=...

Traditional link shorteners have become opinionated. They inject interstitial pages, track clicks, require accounts, gate features behind paywalls, or silently expire links on their own schedule. When an MCP server needs to hand a 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 turns any URL into a memorable four-word phrase like brave-otter-finds-gold, stores the mapping in Neon Postgres, and expires it after 24 hours. A companion Cloudflare Worker does the 302 redirect with zero interstitial.

How It Works

MCP Server / Patron          Shortlinks MCP        Neon        CF Worker    |                              |                 |              |    |-- create_shortlink(url) ---->|-- INSERT ------>|              |    |<-- short_url ----------------|                 |              |    |                              |                 |              |    |-- GET /brave-otter-finds-gold ---------------------------->   |    |                              |                 |<-- lookup ---|    |<-- 302 redirect ----------------------------------------------|    |                              |                 |              |    |        (24h later)           |  expired rows are deleted      |

Tools

ToolDescription
create_shortlinkStore a URL, get back a memorable slug (or supply your own)
resolve_shortlinkLook up where a slug points without redirecting
delete_shortlinkRemove a shortlink before it expires
shortlink_statusHealth check showing active link count and TTL

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

Install

bash
pip install -e ".[dev]"

Run Locally

bash
export NEON_SHORTLINKS_URL="<your Neon connection string>"# optional: the redirect host put in front of each slug (default https://go.tollbooth-dpyc.com)export SHORTLINK_REDIRECT_BASE="https://go.tollbooth-dpyc.com"python -c "from server import mcp; mcp.run()"

The redirect Worker in worker/redirect.js reads the same NEON_SHORTLINKS_URL, set as a Worker secret. A change to it on main deploys it (.github/workflows/deploy-worker.yml, which needs the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repo secrets).

Deploy to Horizon

The fastmcp.json 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 by asking the Oracle, and create_shortlink returns the full short_url, so a peer never needs the redirect host:

python
from tollbooth.oracle_client import default_oracle_client
svc = await default_oracle_client().resolve_service(name="tollbooth-shortlinks")shortlinks_url = (svc or {}).get("url", "")

Operators built on tollbooth-dpyc get this for free: tollbooth.shortlinks.create_shortlink(url) does the lookup and the call, best-effort.

Related Repos

The Tollbooth DPYC™ ecosystem:

RepoRole
tollbooth-dpycThe wheel -- operator-side credit ledger, BTCPay client, tool gating, constraint engine
tollbooth-authorityThe institution -- fee collection, Schnorr signing, purchase certification
dpyc-oracleThe oracle -- Social Contract governance, membership, ban elections
dpyc-communityThe registry -- governance data, operator catalog, community rules
tollbooth-sampleReference operator -- weather API with full Tollbooth wiring
cypher-mcpMonetized graph answers -- named Cypher over Neo4j/AuraDB
schwab-mcpCharles Schwab brokerage MCP -- quotes, positions, orders and transaction history (read-only)
excalibur-mcpeXcalibur -- formatted posting to X (Twitter)
thebrain-mcpPersonal Brain MCP -- thought graphs, knowledge management
taxsort-mcpTax sorting and classification MCP
optionality-mcpOptions analytics MCP
goodearth-mcpGood Earth -- region-scoped farm climate analytics
beesknees-mcpThe Bee's Knees -- a monetized multiplayer race to the queen
roastify-mcpRoastify coffee catalog and packaging artwork
ChartRemotely-mcpChartRemotely -- drives a desktop chart through a paired agent
tollbooth-webShared browser SDK for operator front ends
tollbooth-shortlinks (this repo)Community utility -- ephemeral short URLs for OAuth flows
tollbooth-oauth2-collectorOAuth2 callback collector -- browser-based token exchange
tollbooth-pricing-studioiOS app -- operator dashboard and pricing model editor

License

Apache-2.0. See LICENSE for details.

来源:README.md,提交 b7fc2d0

工具

4

版本历史

2
  1. v0.2.0最新Oct 21, 2026
  2. v0.1.0Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分