About Short URL
Short URL is an MCP server published by fengzhongsen in the AI category: 简单易用的短链接生成工具,完全开源、免费、无需登录,可私有化部署,链接永久有效!.
The repository has 18 stars and 4 forks, with the last commit 10 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/fengzhongsen/short-urlThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Short URL
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 10 hours ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- ✓License declaredUsable under a stated license.
- !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
申明
该项目起初 Fork 自 onee-io/short-url ,在工程方面进行了全面重构(采用 Monorepo 结构),UI 基于 Antd6 重写,同时增加了注册/登录/登出等能力,短链生成算法也采用了业界最佳实践,并增加了 MCP (Model Context Protocol) 服务支持。
项目结构
本项目采用 Monorepo 结构管理:
packages/short-client: 前端项目 (React + Antd)packages/short-server: 后端服务 (Express + Redis)packages/short-mcp-server: MCP 服务 (用于 AI 助手集成)
效果演示
环境依赖
- NodeJS 16+
- Redis 5+
环境变量
将 .env.example 文件重命名为 .env,并按你的 Redis 实际情况填写好配置信息,说明如下:
| 配置 | 默认值 | 说明 |
|---|---|---|
| PORT | 3001 | 服务端口 |
| REDIS_HOST | 127.0.0.1 | Redis 服务 IP 地址,支持 IPv6 |
| REDIS_PORT | 6379 | Redis 服务端口 |
| REDIS_USERNAME | 用户名,没有留空即可 | |
| REDIS_PASSWORD | 密码,没有留空即可 | |
| JWT_SECRET | 'short-url-jwt-secret' | JWT 密钥 |
| JWT_EXPIRES_IN | '2h' | JWT 过期时间 |
| ENCRYPT_KEY | 'short-url-encrypt-key' | 密码加密密钥 |
| USER_URL_LIMIT | 10 | 用户生成短链接数量限制 |
调试
# 安装所有依赖 (根目录)
npm install
# 一键启动前后端服务 (并发启动)
npm start
# 或者分别启动:
# 仅启动后端服务 (端口 3001)
npm run start:server
# 仅启动前端服务 (端口 3000)
npm run start:client
部署
方式一:Docker 部署 (推荐)
docker compose up -d --build
方式二:手动部署
# 安装依赖
npm install
# 构建前端静态资源
npm run build
# 启动后端服务 (会自动托管前端构建产物)
npm run server
MCP 服务集成
本项目提供了 MCP (Model Context Protocol) Server,允许 AI 助手(如 Claude Desktop, VS Code + Cline 等)直接调用你的短链服务生成短链接。
Claude Desktop 配置
编辑 claude_desktop_config.json:
{
"mcpServers": {
"short-url": {
"command": "npx",
"args": ["-y", "short-mcp-server"],
"env": {
"API_ORIGIN": "http://localhost:3001",
"API_KEY": "YOUR_API_KEY"
}
}
}
}
VS Code 配置
编辑 VS Code settings.json:
{
"mcp.servers": {
"short-url": {
"command": "npx",
"args": ["-y", "short-mcp-server"],
"env": {
"API_ORIGIN": "http://localhost:3001",
"API_KEY": "YOUR_API_KEY"
}
}
}
}
注意:请将
YOUR_API_KEY替换为你登录系统后生成的 API Key。如果部署在公网,请将API_ORIGIN替换为实际域名。
README fetched from the repository 10 hours ago. The original is authoritative.