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-mcp-gateway

A standardized Model Context Protocol (MCP) interface for programmatic manipulation of URL redirection services hosted by Dub.co, facilitating seamless integration with automated systems and AI agents.

Author

dubco-mcp-gateway logo

Gitmaxd

MIT License

Quick Info

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

Tags

gitmaxdnpmdubcotools gitmaxdgitmaxd dubcodub links

Unofficial Dub.co URL Shortener Provider Interface

NPM Package Version License Type Node Compatibility Smithery Registry Badge

This implementation acts as an intermediary server adhering to the Model Context Protocol (MCP) specification, specifically designed to interface with the Dub.co platform's Application Programming Interface (API) for managing short URLs. It provides robust mechanisms for any MCP-compliant artificial intelligence assistant to dynamically provision, modify, or retire branded short links.

Unofficial dubco-mcp-server MCP service endpoint

⚙️ Core Functionality

This service exposes essential CRUD operations for URL management via the Dub.co backend:

  • Provisioning: Instantiate new shortened links, optionally specifying custom slugs and associated domain names.
  • Modification: Alter the destination URL or metadata of an existing redirect pointer.
  • Decommissioning: Permanently remove a specific short link.
  • AI Interoperability: Designed for native invocation within AI agent environments supporting the MCP standard.

🎯 Requirements

To deploy and utilize this server successfully, the following dependencies must be satisfied:

  • A runtime environment supporting Node.js version 16.0.0 or newer.
  • An active subscription to Dub.co granting access to their REST API.
  • A valid API Access Key obtainable from the Dub.co developer settings portal.

🚀 Deployment Methods

Automated Deployment via Smithery

Leverage the Smithery CLI for streamlined, automated setup for agents like Claude Desktop:

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

Standard NPM Installation

Install globally for system-wide access:

bash npm install -g dubco-mcp-server

Install locally within a project context:

bash npm install dubco-mcp-server

Direct Execution

Execute the utility directly using npx:

bash npx dubco-mcp-server

🔑 Configuration Protocol

Operational success hinges on providing the Dub.co API credential. This key must be exposed to the server process, typically via an environment variable:

bash export DUBCO_API_KEY=your_secret_api_token

For persistent shell configuration (e.g., Bash/Zsh profiles):

bash echo 'export DUBCO_API_KEY=your_secret_api_token' >> ~/.zshrc

🖥️ Integration with Cursor IDE

Cursor IDE natively incorporates MCP endpoints. Configure the service as follows (requires Cursor version 0.4.5.9+):

Setup Procedure

  1. Ensure Cursor IDE is installed.
  2. Access the application settings (Gear icon or Cmd+, / Ctrl+,).
  3. Navigate to the 'Features' pane.
  4. Locate and expand the "MCP Servers" configuration area.

Adding the Endpoint

  1. Select the "+ Add new MCP server" option.
  2. Populate the fields:

    • Name: Define a recognizable identifier (e.g., "Dub.co Link Manager").
    • Type: Set to "command".
    • Command: Input the execution string, embedding the API key directly for localized use: bash env DUBCO_API_KEY=your_actual_api_key npx -y dubco-mcp-server
  3. Finalize by clicking "Save".

Connectivity Verification

A successful connection is indicated by a green status indicator. Troubleshoot potential issues by confirming key validity, restarting Cursor, or ensuring Node.js prerequisites are met.

🛠️ Protocol Usage via MCP

Once integrated into your MCP environment, the server exposes methods corresponding to link lifecycle management.

MCP Manifest Configuration Sample

This JSON snippet illustrates how to declare the service within an overall MCP configuration object:

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

Exposed Toolkit Methods

Initiates the creation of a new short link resource within the Dub.co system.

Arguments Schema:

{ "url": "string (required): The target destination URL.", "key": "string (optional): Desired custom path segment (slug).", "externalId": "string (optional): An identifier for external tracking.", "domain": "string (optional): The specific Dub.co domain to use for the link." }

Invocation Example:

{ "url": "https://repository.example.org/project-x", "key": "proj-x-shrt" }

Modifies the attributes of an already existing short link.

Arguments Schema:

{ "linkId": "string (required): The unique identifier assigned by Dub.co.", "url": "string (optional): The new destination URL.", "domain": "string (optional): A new domain to associate with the link.", "key": "string (optional): A new custom slug." }

Invocation Example:

{ "linkId": "clabcd987654", "url": "https://new-destination-site.net" }

Removes a specific short link from the Dub.co registry.

Arguments Schema:

{ "linkId": "string (required): The identifier of the link to be erased." }

Invocation Example:

{ "linkId": "clabcd987654" }

🌐 Architectural Flow

The server operates as a translator between the abstract MCP calls and the concrete Dub.co REST interface. Upon method invocation:

  1. Input parameters undergo strict validation against defined schemas.
  2. The server constructs the necessary HTTP payload and directs the request to the appropriate Dub.co API endpoint, authenticating with the configured API key.
  3. The resulting API response is parsed and reformatted into a clear, structured output consumable by the calling AI assistant.

🧑‍💻 Development & Contribution

Local Build Process

To compile the project from source:

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

Runtime Execution (Development)

bash npm run dev

This module is distributed under the ISC License (refer to the LICENSE file for full terms).

External References

Community Engagement

Contributions are actively encouraged. Initiate development by forking the repository and submitting a Pull Request with your enhancements.

Origin Note

This utility was independently developed by GitMaxd as an exercise in implementing MCP server architectures. While there is no formal partnership with Dub.co, their API simplicity made it an excellent integration target. Feedback and improvements are welcomed via the repository.

See Also

`