DWZ Short URL MCP Server
The DWZ Short URL MCP Server provides comprehensive short URL management capabilities for AI assistants through MCP protocol integration with a dwz-server backend.
Core Capabilities:
Create Short URLs - Generate shortened links with custom domains, titles, descriptions, optional custom codes, and expiration dates
Batch Operations - Create up to 50 short URLs simultaneously for improved efficiency
Retrieve URL Information - Get detailed data for specific short URLs, including original URLs, click statistics, and creation timestamps
List and Search URLs - Browse paginated lists with filtering by domain and keyword search across URLs, titles, and descriptions
Delete URLs - Permanently remove specific short URLs by ID
Manage Domains - List all available domains with configuration details, activation status, and usage statistics
Track Analytics - Access click statistics and usage data for shortened URLs
Secure Operations - API authentication via Bearer Token with comprehensive validation and error handling
Error Handling - Automatic retry mechanisms for reliable operations
Runtime environment used to execute the MCP server
Package manager used for installing dependencies and distributing the MCP server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DWZ Short URL MCP Server shorten this product page URL: https://www.example.com/products"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mliev Short URL MCP Client
A short URL management client based on MCP (Model Context Protocol) protocol, providing complete short URL generation, management, and statistics functionality for AI assistants. This MCP server is implemented based on the API interface of the dwz-server project.
๐๏ธ Server Architecture
This MCP client calls the short URL service API based on the dwz-server project. dwz-server is a high-performance short URL service developed in Go language, providing complete short URL generation, management, and statistics functionality.
Deploy dwz-server with Docker
It is recommended to deploy dwz-server using Docker as the backend service for the MCP client:
# docker-compose.yml
services:
dwz-server:
container_name: dwz-server
image: docker.cnb.cool/mliev/open/dwz-server:latest
restart: always
ports:
- "8080:8080"
volumes:
- "./config/:/app/config/"
environment:
- TZ=Asia/Shanghai
- GIN_MODE=releaseStart the service:
docker-compose up -dAfter the service starts, the API address will be http://localhost:8080. Configure it in the MCP client:
REMOTE_BASE_URL=http://localhost:8080Related MCP server: linkbit-mcp
โจ Features
๐ Short URL Creation: Support custom domains, short codes, titles, and descriptions
๐ Batch Operations: Create multiple short URLs at once to improve efficiency
๐ Search & Filter: Support domain filtering and keyword search
๐ Statistics & Analytics: Get detailed click statistics information
๐ก๏ธ Error Handling: Comprehensive error handling and retry mechanisms
๐ Security Authentication: API authentication based on Bearer Token
๐ Quick Start
Prerequisites
Node.js >= 18.0.0
npm or yarn
Direct MCP Usage
{
"mcpServers": {
"dwz-mcp": {
"name": "dwz-mcp",
"type": "stdio",
"isActive": true,
"registryUrl": "",
"command": "npx",
"args": [
"-y",
"@muleiwu/dwz-mcp"
],
"env": {
"REMOTE_BASE_URL": "Your short URL service address",
"REMOTE_API_KEY": "apiKey"
}
}
}
}Install Dependencies
npm installConfigure Environment Variables
Copy the environment variable template and configure:
cp .env.example .envEdit the .env file:
# Remote short URL server configuration
REMOTE_BASE_URL=https://api.example.com
REMOTE_API_KEY=your-api-key-here
# Other optional configuration
REQUEST_TIMEOUT=10000
MAX_RETRIES=3
LOG_LEVEL=infoStart Service
# Development mode
npm run dev
# Production mode
npm start๐ MCP Tool List
1. create_short_url
Create a new short URL
Parameters:
original_url(required): Original URL addressdomain(required): Short URL domaintitle(required): Web page titlecustom_code(optional): Custom short codedescription(optional): Description informationexpire_at(optional): Expiration time
Example:
{
"original_url": "https://www.example.com/products",
"domain": "short.ly",
"title": "Product Page",
"description": "Our product showcase page",
"custom_code": "products"
}2. get_url_info
Get detailed information about a short URL
Parameters:
id(required): Short URL ID
Example:
{
"id": 123
}3. list_short_urls
List short URLs with pagination and search support
Parameters:
page(optional): Page number, default 1page_size(optional): Items per page, default 10domain(optional): Domain filterkeyword(optional): Search keyword
Example:
{
"page": 1,
"page_size": 20,
"domain": "short.ly",
"keyword": "product"
}4. delete_short_url
Delete a short URL
Parameters:
id(required): Short URL ID
Example:
{
"id": 123
}5. batch_create_short_urls
Batch create short URLs
Parameters:
urls(required): URL array (maximum 50)domain(required): Short URL domain
Example:
{
"urls": [
"https://www.example1.com",
"https://www.example2.com"
],
"domain": "short.ly"
}6. list_domains
Get list of all available domains
Parameters: None required
Example:
{}Return Information:
Domain basic information: ID, domain, protocol
Website information: website name, registration information
Configuration information: activation status, parameter pass-through settings
Statistics information: total count, active count, inactive count
๐๏ธ Project Structure
mliev-dwz-mcp/
โโโ src/
โ โโโ index.js # Entry file
โ โโโ config/
โ โ โโโ remoteConfig.js # Configuration management
โ โโโ services/
โ โ โโโ httpClient.js # HTTP client
โ โ โโโ shortLinkService.js # Short link service
โ โโโ utils/
โ โ โโโ validation.js # Parameter validation
โ โ โโโ errorHandler.js # Error handling
โ โโโ mcp/
โ โโโ server.js # MCP server
โ โโโ tools/ # MCP tools
โ โโโ createShortUrl.js
โ โโโ getUrlInfo.js
โ โโโ listShortUrls.js
โ โโโ deleteShortUrl.js
โ โโโ batchCreateShortUrls.js
โ โโโ listDomains.js
โโโ tests/ # Test files
โโโ package.json # Project configuration
โโโ .env.example # Environment variable template
โโโ README.md # Project documentation๐ง Development Guide
Available Scripts
# Start development server (hot reload)
npm run dev
# Build project
npm run build
# Run production environment
npm start
# Run tests
npm test
# Code linting
npm run lint
# Auto-fix code formatting
npm run formatAdding New Tools
Create a new tool file in the
src/mcp/tools/directoryImplement the tool object, including
name,description,inputSchema, andhandlerRegister the new tool in
src/mcp/server.js
Error Handling
The project uses a unified error handling mechanism:
ErrorHandler.asyncWrapper(): Wrap async functions, automatically handle errorsCustomError: Custom error base classValidationError: Parameter validation errorNetworkError: Network request error
๐ API Specification
Response Format
All API responses follow a unified format:
{
"success": true,
"message": "Operation successful",
"data": {
// Response data
},
"meta": {
"operation": "Operation name",
"timestamp": "2024-01-01T00:00:00.000Z"
}
}Error Response
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Error description",
"details": {},
"timestamp": "2024-01-01T00:00:00.000Z"
}
}๐ Configuration Instructions
Environment Variables
Variable Name | Description | Default Value | Required |
| Remote server address | - | โ |
| API key | - | โ |
| API version | v1 | โ |
| Request timeout (ms) | 10000 | โ |
| Maximum retry count | 3 | โ |
| Log level | info | โ |
Domain Configuration
Ensure that the domains used are correctly configured in the remote short URL service.
๐จ Troubleshooting
Common Issues
Connection Failed
Check
REMOTE_BASE_URLandREMOTE_API_KEYconfigurationConfirm network connection is normal
Verify remote service status
Authentication Failed
Confirm API key is correct
Check if the key has sufficient permissions
Parameter Validation Failed
Check if parameter format is correct
Confirm all required parameters are provided
Log Debugging
Set log level to debug to view detailed information:
LOG_LEVEL=debug npm start๐ค Contributing Guide
Fork the project
Create feature branch (
git checkout -b feature/AmazingFeature)Commit changes (
git commit -m 'Add some AmazingFeature')Push to branch (
git push origin feature/AmazingFeature)Open a Pull Request
๐ License
This project is open source under the MIT License - see the LICENSE file for details.
๐ Support
If you encounter problems or have suggestions, please:
Check the Troubleshooting section
Search existing Issues
Create a new Issue describing the problem
๐ Version History
v1.0.0 - Initial version
Basic short URL management functionality
MCP protocol support
Complete error handling mechanism
Available Tools
6 toolsbatch_create_short_urlsB
ๆน้ๅๅปบๅคไธช็ญ็ฝๅ๏ผๆ้ซๅๅปบๆ็ใๆๅคๆฏๆ50ไธชURLใ
Inputs: urls (required), domain (required).
create_short_urlC
ๅๅปบไธไธชๆฐ็็ญ็ฝๅใๆฏๆ่ชๅฎไนๅๅใ็ญไปฃ็ ใๆ ้ขๅๆ่ฟฐไฟกๆฏใ
Inputs: original_url (required), domain (required), title (required), custom_code, +2 more.
delete_short_urlA
ๅ ้คๆๅฎ็็ญ็ฝๅใๅ ้คๅๆ ๆณๆขๅค๏ผ่ฏท่ฐจๆ ๆไฝใ
Inputs: id (required).
get_url_infoC
ๆ นๆฎ็ญ็ฝๅID่ทๅ่ฏฆ็ปไฟกๆฏ๏ผๅ ๆฌๅๅงURLใ็นๅป็ป่ฎกใๅๅปบๆถ้ด็ญใ
Inputs: id (required).
list_domainsB
่ทๅๆๆๅฏ็จ็ๅๅๅ่กจ๏ผๅ ๆฌๅๅ้ ็ฝฎไฟกๆฏๅ็ถๆใ
Inputs: no named parameters.
list_short_urlsB
ๅๅบ็จๆท็็ญ็ฝๅๅ่กจ๏ผๆฏๆๅ้กตใๅๅ็ญ้ๅๅ ณ้ฎ่ฏๆ็ดขใ
Inputs: page, page_size, domain, keyword.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap. Batch creation, single creation, deletion, info retrieval, domain listing, and URL listing all target specific operations in the short URL domain, making misselection unlikely.
All tools follow a consistent verb_noun pattern with snake_case (e.g., create_short_url, list_domains). The naming is predictable and readable across all six tools.
Six tools is well-scoped for a short URL management server. It covers core CRUD operations (create, get, delete, list) plus domain management and batch creation, with each tool earning its place without bloat.
The toolset provides strong coverage for short URL lifecycle management, including creation, deletion, listing, and info retrieval, plus domain handling. A minor gap is the lack of an update tool for modifying existing short URLs, but agents can work around this by deletion and recreation.
Maintenance
Related MCP Connectors
Create short links and see their click counts from your AI assistant.
Create and manage short links, track clicks, and automate URL management
Make, find, pause and track short links and QR codes from your AI assistant. Create short links with an optional custom address, title and tags; find links and QR codes; update, pause, resume, archive or restore them; and read click analytics (clicks, unique visitors, countries, referrers, devices, browsers) for a link, a QR code or the whole account. Sign in with OAuth and choose what the assistant may do. Every change can be undone; nothing is ever permanently deleted. Works on every plan, including Free.
Free URL shortener: manage short links, QR codes and click analytics from AI clients.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to shorten URLs, manage links, and track click analytics through 8 first-class tools, designed for use with Claude Desktop, Cursor, and other MCP clients.945 npmMIT
- AlicenseAqualityBmaintenanceEnables users to shorten links, bulk create URLs, generate QR codes, manage and disable links, and retrieve click analytics from MCP clients like Claude, ChatGPT, Cursor, and n8n.9MIT
- AlicenseBqualityCmaintenanceEnables users to shorten links, bulk-create URLs, generate QR codes, and retrieve click analytics through MCP clients such as Claude, ChatGPT, Cursor, and n8n.947 npmMIT

esyURL MCP serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to create, update, organize, and delete short links; render styled QR codes; route visitors by device or country; and read click and scan statistics. Agents can also manage groups and custom domains while changing destinations without breaking printed QR codes or shared short URLs.MIT