logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

dubco-tool-adapter-for-ai

Provides an interface for conversational agents to provision, modify, and retire URL shorteners hosted via the Dub.co service through its dedicated API.

Author

dubco-tool-adapter-for-ai logo

Gitmaxd

MIT License

Quick Info

GitHub GitHub Stars 5
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

gitmaxdnpmcloudservices gitmaxddub apigitmaxd dubco

Dub.co Link Management Adapter (MCP Server)

npm version License: ISC Node.js Version smithery badge

This implementation functions as an unofficial Model Context Protocol (MCP) server designed to abstract the operations available through the Dub.co URL shortening platform's Application Programming Interface (API). It standardizes link lifecycle management (creation, modification, erasure) for consumption by advanced Artificial Intelligence (AI) assistants.

Unofficial dubco-mcp-server MCP server

🌟 Core Capabilities

This adapter facilitates the following actions via the Dub.co backend:

  • Link Fabrication: Generate novel, concise URLs utilizing user-specified domains.
  • Record Modification: Alter parameters of extant short links.
  • Link Invalidation: Permanently remove specified short links.
  • Protocol Compliance: Ensures smooth, protocol-adherent interaction with AI orchestration layers.

🧰 Requirements

To successfully deploy and operate this server, the following prerequisites must be satisfied:

  • Execution environment must support Node.js version 16.0.0 or newer.
  • Access credentials for a registered Dub.co account are mandatory.
  • A valid API authentication token obtained from the Dub.co developer settings portal is required.

📥 Deployment Methods

Installation via Smithery Utility

For automated setup integrated with supported AI clients (like Claude Desktop) using the Smithery ecosystem:

npx -y @smithery/cli install @Gitmaxd/dubco-mcp-server-npm --client claude

System-Wide Installation

npm install -g dubco-mcp-server

Local Project Inclusion

npm install dubco-mcp-server

Immediate Execution (npx)

npx dubco-mcp-server

🔐 Configuration Directives

The server's operation is gated by the requirement for a valid Dub.co authorization token. This token must be supplied to the environment.

Set the required token via an environment variable:

export DUBCO_API_KEY=your_secure_api_key

For enduring configuration across sessions, append the export command to your shell initialization file (e.g., .bashrc or .zshrc):

echo 'export DUBCO_API_KEY=your_secure_api_key' >> ~/.zshrc

🖥️ Integration with Cursor IDE

Cursor IDE offers built-in functionality for utilizing MCP services. Ensure you are running version 0.4.5.9 or later.

Phase 1: Tool Acquisition

If not already present, acquire and install the Cursor IDE application.

Phase 2: Accessing Settings

  1. Launch Cursor IDE.
  2. Navigate to configuration via the settings icon (bottom-left) or shortcut (Cmd+, / Ctrl+,).
  3. Locate and select the 'Features' pane.
  4. Scroll to the dedicated 'MCP Servers' management section.

Phase 3: Registering the Service

  1. Initiate the addition process by clicking "+ Add new MCP server".
  2. Populate the configuration dialogue as follows:
  3. Name: Define a recognizable identifier, such as "Dub.co Link Service".
  4. Type: Specify "command".
  5. Command: Input the execution string, substituting the placeholder key: env DUBCO_API_KEY=your_actual_key npx -y dubco-mcp-server
  6. Finalize by clicking "Save".

Phase 4: Status Validation

A successful connection is indicated by a green status marker adjacent to the server's entry. If connectivity issues arise (yellow or red status), perform these diagnostics:

  1. Reconfirm the accuracy of the supplied API credential.
  2. Initiate a restart of the Cursor IDE instance.
  3. Verify the correct installation and availability of Node.js (v16+).

Phase 5: Operationalizing the Adapter

Once linked, the tools become accessible within Cursor's advanced interaction modes (Composer or Agent):

  1. Activate either Composer or Agent functionality.
  2. Explicitly prompt the AI to invoke the Dub.co toolset (e.g., create_link, update_link, delete_link).
  3. Approve the subsequent tool utilization suggestions presented by the system.

🛠️ Model Context Protocol Utilization

This adapter exposes capabilities for any MCP-compliant orchestration layer. To integrate it, incorporate the server definition into your primary MCP configuration structure.

Configuration Snippet Example

{
  "mcpServers": {
    "dubco": {
      "command": "npx",
      "args": ["-y", "dubco-mcp-server"],
      "env": {
        "DUBCO_API_KEY": "your_secure_api_key"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Defined Interface Functions

Initiates the generation of a novel short alias via Dub.co.

Parameters Schema:

{
  "url": "https://target-destination.org",
  "key": "optional-custom-slug",
  "externalId": "optional-tracking-identifier",
  "domain": "optional-assigned-domain"
}

Invocation Example:

{
  "url": "https://github.com/gitmaxd/dubco-mcp-server-npm",
  "key": "mcp-adapter"
}

Applies modifications to an existing resource identifier.

Parameters Schema:

{
  "linkId": "identifier-to-modify",
  "url": "https://new-endpoint.net",
  "domain": "revised-domain-slug",
  "key": "revised-slug"
}

Invocation Example:

{
  "linkId": "clwxyz123456",
  "url": "https://github.com/gitmaxd/dubco-mcp-server-npm/releases/latest"
}

Decommissions a specific short link resource.

Parameters Schema:

{
  "linkId": "identifier-to-remove"
}

Invocation Example:

{
  "linkId": "clwxyz123456"
}

🧠 Operational Flow

The adapter establishes a secure connection to the Dub.co API utilizing the provided secret key. It exposes a structured function set for AI agents. Upon tool invocation:

  1. Input arguments undergo validation against the defined schema.
  2. The corresponding API call is constructed and dispatched to Dub.co.
  3. The resultant data from Dub.co is parsed and transformed into a standardized output format consumable by the invoking AI agent.

🏗️ Maintenance and Building

Source Code Compilation

To build the necessary artifacts from the source repository:

git clone https://github.com/gitmaxd/dubco-mcp-server-npm.git
cd dubco-mcp-server-npm
npm install
npm run build

Running in Debug Mode

npm run dev

This software component is distributed under the terms of the ISC License. Refer to the associated LICENSE file for comprehensive licensing details.

🤝 Community Contributions

We welcome enhancements and bug fixes! To contribute:

  1. Fork the repository.
  2. Branch out for new work (git checkout -b feature/contribution-name).
  3. Commit changes clearly (git commit -m 'feat: Added feature X').
  4. Push the changes (git push origin feature/contribution-name).
  5. Submit a Pull Request for review.

👤 Author Information

This unauthorized Dub.co adapter for MCP was engineered by GitMaxd (Find me on X as @gitmaxd).

This project was initiated as a practical exercise in mastering the Model Context Protocol specification and developing compatible server integrations. Dub.co was selected due to its clean API design and direct utility, making it an excellent subject for protocol implementation practice.

Though I maintain no official partnership with Dub.co, their service is highly recommended for both manual and automated link management workflows, thanks to their accessible API documentation. Feedback, suggestions, or contributions are greatly appreciated via the repository.

See Also

`