hrva.cc
cc.hrva由 hrva.cc 發布官方發布者v2.33.1更新於 Nov 6, 2026
Create, list and check hrva.cc short links and read their click statistics.
概覽
hrva.cc 的託管 MCP 連接器,讓助理建立、列出與檢查短連結,並讀取點擊統計。
- 可以做什麼
- 建立短連結,支援自訂別名、到期日、造訪次數上限、密碼與標籤
- 列出並檢查既有的短連結
- 讀取連結的點擊統計,例如訪客、來源、裝置、國家與 QR 碼掃描
- 開啟兩步驟驗證後,可透過管理工具處理審核佇列等連結審核事務
- 適用情境
- 適合在撰寫訊息或文件時讓助理縮短網址,或不必打開網頁後台就能查看某個連結的成效。
- 執行需求
- 透過 streamable HTTP 連線到 hrva.cc 遠端端點,無需本機安裝。登入使用 OAuth 2.1,需要 hrva.cc 帳號;管理功能要求該帳號已開啟兩步驟驗證。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 hrva.cc,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/cc.hrva%2Furl-shortener/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"hrva-cc": {
"type": "http",
"url": "https://hrva.cc/mcp"
}
}
}README
URL-Shortener
Overview
hrva.cc is a privacy-first URL shortener with built-in link safety. This repository is the backend: a Spring Boot API that creates and redirects short links, checks them for phishing and malware, and counts clicks without tracking anyone. The frontend lives in HrvaLabs/URL-Shortener-FE.
The changelog is shown at app.hrva.cc/changelog and kept in CHANGELOG.md. AGENTS.md documents the architecture, commands, endpoints and configuration.
Features
Links
- Random short links, or a custom alias when you're signed in. Links can also be made without an account, with a stricter rate limit.
- Expiry dates, visit limits, password protection and tags.
- Bulk creation, and an API with API keys (
X-Api-Key). Each key makes up to 600 requests an hour by default (Site settings); every response carriesRateLimit-Limit,RateLimit-RemainingandRateLimit-Reset, and a key over the limit gets a 429 withRetry-After. A key expires after the days you choose (1 to 3,650), after 12 months by default, or never. Keys are stored as SHA-256 hashes: the full key is shown once, when it is made, and the lists show its first characters. - A campaign tag (UTM) builder.
- QR codes that count their scans.
- Opt-in notifications by email or to Discord, Slack, Telegram, ntfy or a webhook: dead destinations, expiry reminders, and daily or weekly summaries.
Custom domains
- Short links on your own subdomain, like
go.example.com/menu. You apply in Settings; once an admin approves, you add one CNAME record and the certificate is issued through Cloudflare for SaaS. - Aliases on your domain are separate from hrva.cc's, and its links get the same stats, limits, passwords and expiry dates.
Bio pages
- One page at
hrva.cc/@yourname, with a button for each of your short links. - Views are counted per day, and changing your handle keeps the old one held for 30 days.
Safety
- Every new link, every click and a nightly rescan go through:
- Google Safe Browsing
- admin-managed blocklists (HaGeZi, OpenPhish, PhishTank, Phishing.Database, URLhaus)
- Spamhaus DBL
- domain age (RDAP)
- redirect-chain and look-alike checks
- Visitors can report links and bio pages.
- Suspicious links go to a review queue rather than being blocked blindly.
- A phishing-wave alert warns when many new links point at the same new domain.
Privacy-first analytics
- Clicks are stored only as daily totals per link: visitors, referrers, devices, browsers, countries, and QR scans against other clicks.
- Unique visitors come from a one-way hash under a key that changes every day, kept only in Redis.
- Bots are counted apart.
- The public hrva.cc in numbers page shows site-wide totals.
Accounts
- Sign in with email and password, Google, or a passkey or security key.
- Two-step verification works with every sign-in method, using an authenticator app or a passkey, with recovery codes.
- You can export your data and delete your account.
AI connector
- AI apps such as Claude use hrva.cc over MCP at
https://hrva.cc/mcp, signing in with OAuth 2.1.
Admin
- Pages for stats, the review queue, moderation, blocklists, domain rules, reserved aliases, bio pages, custom domains and the audit log.
- Discord alerts, a weekly summary and a daily decisions email.
Technologies Used
- Backend: Java 25, Spring Boot 4.1, Spring Security and Spring Authorization Server, Spring AI (MCP)
- Database: PostgreSQL with Liquibase migrations, and Redis
- Frontend: Next.js 16 on Cloudflare Workers (separate repository)
- Deploy: GitHub Actions builds the Docker image and triggers a Portainer stack webhook. The site runs behind Cloudflare.
Running it
Build, test and run commands, local dev users and the end-to-end check (scripts/mcp-e2e.sh) are in AGENTS.md. The short version: docker compose -f docker/docker-compose.yml up -d for Postgres and Redis, then mvn spring-boot:run -Dspring-boot.run.profiles=local. For tests, run mvn -B test.
Production requirements
- Docker image: two stages on
eclipse-temurin:25-jre, run by the non-root userapp(uid 10001), listening on 8080, with aHEALTHCHECKthat asks/actuator/health/livenessevery 30 s (120 s start period, so the first boot and its Liquibase run aren't marked unhealthy). The check names a primary host (HEALTHCHECK_HOST, else the firstAPP_DOMAINS_PRIMARY_HOSTSentry, elsehrva.cc), because every other host answers 404. CI pushes:latestand an immutable:<commit sha>. Java is PID 1, sodocker stopends the app cleanly with SIGTERM, well inside a 30 sstop_grace_period.- Pin by commit (optional): in the Portainer stack, change
image: ghcr.io/hrvalabs/url-shortener:latesttoimage: ghcr.io/hrvalabs/url-shortener:<full commit sha>and update the stack. The webhook then redeploys the same sha, so the stack changes only when you edit it; a rollback is one edit back to the earlier sha. Keep:latestif you want every push to deploy. - Port: the app needs no published port, because Nginx Proxy Manager reaches
url-shortener-backend:8080on the Docker network. The Portainer stack publishes none, so nobody can reach the origin around Cloudflare; keep it that way (or bind to127.0.0.1if a host port is ever needed).
- Pin by commit (optional): in the Portainer stack, change
- Actuator:
healthis exposed over HTTP, plus itslivenessandreadinessprobes, and (v2.30)prometheusonly whenAPP_METRICS_TOKENis set: it answers withAuthorization: Bearer <APP_METRICS_TOKEN>, 401 for a wrong or missing token, and 404 when the variable is unset.env,beans,metrics,cachesandinfoare off the web.https://hrva.cc/actuator/healthchecks the database and Redis (a 503 when either is down), disk space, ping and SSL, and not the mail server (management.health.mail.enabled: false): that check opened an SMTP connection on every call, about 110 of 185 ms in a local run with 30 ms of network delay to each service. The container check uses liveness. - How long a sign-in lasts (v2.31): a sign-in ends
app.jwt-token-validity-seconds(10 hours) after the last time the web app renewed it, which it does while you use it, and never later thanAPP_JWT_SESSION_MAX_SECONDSafter the sign-in (default 2592000, 30 days). Remember me keeps its 30 days. - Daily Browser Run allowance (v2.30):
APP_INSPECTION_BROWSER_SECONDS_DAILY_LIMIT(default 600, Cloudflare's free allowance) is what the admin Health page compares today's screenshot seconds with. - Redis down: the rate limits let requests through, except three that refuse until Redis is back: links made without an account, the link-password unlock and the password sign-in (each a 503 with
Retry-After: 60). Signed-in, API-key and MCP creates go on. - Admin accounts need two-step sign-in (v2.23): turn it on for every admin account before or right after the deploy. Until then, admin pages and the MCP moderation tools answer "Turn on two-step sign-in to use admin pages."
- Outbound egress (v2.23): every fetch the app makes is pinned to a checked public address, but block the container's egress to
169.254.169.254and the private ranges other than the stack's Docker network on the host as well (DOCKER-USERiptables rules). - Code scanning (v2.23):
codeql.ymlneeds code scanning on the repository anddependencies.yml's PR review needs the dependency graph; for a private repository both need GitHub Advanced Security. - Inactive accounts get an email 30 days before they are deactivated after 5 years without use (a sign-in, an API key or a connected MCP app counts as use). Nothing to set up; the first run after the deploy warns every account that is already past the limit and deactivates it 30 days later.
- PostgreSQL 15 or newer (the analytics counters use
MERGE) and Redis 6.2 or newer (GETDEL,SMISMEMBER). - Environment variables: the full list is in AGENTS.md (CI / Deploy, and MCP connector → Configuration).
APP_MCP_SIGNING_KEYis required, and the app won't start without it. Generate a private RSA JWK and keep it out of git and logs: APP_NOTIFICATIONS_KEYis required too, and the app won't start without it. It encrypts the notification channels' URLs and tokens and signs the unsubscribe links, so keep it next to the MCP signing key: losing it means everyone re-adds their channels. Generate 32 random bytes:- The human check on links made without an account needs
APP_TURNSTILE_SITE_KEYandAPP_TURNSTILE_SECRET_KEY(the Turnstile widget's keys); without them the app starts and no check runs. Keep the secret key out of git and logs. - Custom domains need
CLOUDFLARE_API_TOKENandCLOUDFLARE_ZONE_ID; without them the app starts and refuses approvals. The other variables (APP_DOMAINS_ENABLED,APP_DOMAINS_MAX_ACTIVE,APP_DOMAINS_FREE_ALLOWANCE,APP_DOMAINS_PER_USER,APP_DOMAINS_RESERVED,APP_DOMAINS_PRIMARY_HOSTS,APP_DOMAINS_IGNORED_HOSTNAMES,APP_DOMAINS_CNAME_TARGET,APP_CLOUDFLARE_API_BASE) have working defaults, listed in AGENTS.md (Config Profiles). Before the first deploy with custom domains:- O1:
CLOUDFLARE_ZONE_IDis the hrva.cc zone's id, and the token has Zone, SSL and Certificates, Edit on the hrva.cc zone only. Use that token nowhere else. - O2: the reverse proxy's catch-all
default_serverrefuses non-Cloudflare addresses (444), like the proxy hosts. Custom hostnames reach the origin through it. - O3: every hostname that must keep reaching the backend is in
APP_DOMAINS_PRIMARY_HOSTS(defaulthrva.cc,domains.hrva.cc; the host ofapp.server-urlalways counts). Any otherHostanswers 404 after the deploy, including a request to the container by IP orlocalhost, so health checks go throughhttps://hrva.cc/actuator/health. - O4:
APP_DOMAINS_IGNORED_HOSTNAMESlists the Cloudflare hostnames that aren't custom domains (defaulttest.karlo.cc), so the nightly reconcile doesn't flag them. They answer 404. - O5: the admin System tab shows PostgreSQL 15 or newer; migration 032 stops startup otherwise.
- O6: custom hostnames run through the hrva.cc zone's Cloudflare rules. Check that no cache, configuration, redirect or WAF skip rule they also need matches only
http.host eq "hrva.cc", and that redirects are never cached.
- O1:
- Cloudflare-only origin. The per-network rate limits trust
CF-Connecting-IP, and the country counts trustCF-IPCountry. The origin must therefore accept traffic only from Cloudflare, through a Cloudflare Tunnel or a firewall limited to Cloudflare's IP ranges. Otherwise anyone can forge those headers. - Cloudflare rules for the MCP paths and one-click unsubscribe. MCP clients aren't browsers, and neither are the mail providers that POST a one-click unsubscribe (RFC 8058) from the email's
List-Unsubscribeheader. A challenge breaks both:- Exempt
/mcp,/oauth2/*,/.well-known/*and/api/v1/notifications/unsubscribefrom WAF managed challenges and Super Bot Fight Mode. If Bot Fight Mode on the Free plan challenges them, turn it off. - Don't cache
GET /oauth2/authorizeor/.well-known/*at the edge.
- Exempt
- Smoke test after a deploy. Expect issuer
https://hrva.cc, resourcehttps://hrva.cc/mcp, and 401 from/mcpwithout a token:
Contribution
We welcome contributions from the community!
License
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Contact
For questions, issues, or feature requests, please open an issue on GitHub or contact me directly via email.
Thank you for using URL-Shortener or just viewing this page!
來源:README.md,提交 f07a6d5
工具
0版本歷史
7- v2.33.1最新Nov 6, 2026
- v2.33.0Nov 5, 2026
- v2.31.0Nov 4, 2026
- v2.30.0Nov 4, 2026
- v2.29.0Nov 3, 2026
- v2.28.0Nov 3, 2026
- v2.26.0Nov 1, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分