gitmaxd_dubco_mcp_server_npm

gitmaxd_dubco_mcp_server_npm

by Gitmaxd

Global Installation

Skip to content

You signed in with another tab or window. Reload
to refresh your session. You signed out in another tab or window. Reload
to refresh your session. You switched accounts on another tab or window. Reload
to refresh your session. Dismiss alert

Gitmaxd / dubco-mcp-server-npm Public

The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.

4 stars
1 fork
Branches
Tags
Activity

Star

Notifications
You must be signed in to change notification settings

Gitmaxd/dubco-mcp-server-npm

main

1 Branch
0 Tags


Go to file

Code

Folders and files

| Name | | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| Latest commit
-------------

Gitmaxd
Gitmaxd

chore: Bump version to 1.0.5 and improve documentation

Mar 7, 2025

e697606
Β Β·Β Mar 7, 2025

History
-------

7 Commits

| | |
| build | | build | chore: Bump version to 1.0.5 and improve documentation | Mar 7, 2025 |
| src | | src | chore: Bump version to 1.0.5 and improve documentation | Mar 7, 2025 |
| .gitignore | | .gitignore | v1.0.3: Improve error handling and remove upsert_link functionality | Mar 7, 2025 |
| README.md | | README.md | chore: Bump version to 1.0.5 and improve documentation | Mar 7, 2025 |
| package-lock.json | | package-lock.json | chore: Bump version to 1.0.5 and improve documentation | Mar 7, 2025 |
| package.json | | package.json | chore: Bump version to 1.0.5 and improve documentation | Mar 7, 2025 |
| server.log | | server.log | v1.0.3: Improve error handling and remove upsert_link functionality | Mar 7, 2025 |
| tsconfig.json | | tsconfig.json | v1.0.3: Improve error handling and remove upsert_link functionality | Mar 7, 2025 |
| View all files | | |

Repository files navigation

Unofficial dubco-mcp-server

npm version
License: ISC
Node.js Version

A Model Context Protocol (MCP) server for creating and managing Dub.co
short links (unofficial). This server enables AI assistants to create, update, and delete short links through the Dub.co API.

πŸš€ Features

  • Create custom short links with your Dub.co domains
  • Update existing short links
  • Delete short links
  • Seamless integration with AI assistants through the Model Context Protocol

πŸ“‹ Prerequisites

  • Node.js 16.0.0 or higher
  • A Dub.co account with API access
  • An API key from the Dub.co dashboard

πŸ’» Installation

Global Installation

npm install -g dubco-mcp-server

Local Installation

npm install dubco-mcp-server

Direct Usage with npx

npx dubco-mcp-server

βš™οΈ Configuration

This MCP server requires a Dub.co API key to function. You can get your API key from the Dub.co dashboard
.

Set the API key as an environment variable:

export DUBCO_API_KEY=your_api_key_here

For persistent configuration, add this to your shell profile (e.g., .bashrc, .zshrc):

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

πŸ–₯️ Cursor IDE Setup

Cursor IDE provides native support for MCP servers. Follow these steps to set up the dubco-mcp-server in Cursor:

Step 1: Install Cursor IDE

If you haven't already, download and install Cursor IDE
(version 0.4.5.9 or later).

Step 2: Open Cursor Settings

  1. Open Cursor IDE
  2. Click on the gear icon in the bottom left corner, or use the keyboard shortcut Cmd+, (Mac) or Ctrl+, (Windows/Linux)
  3. Navigate to the Features section
  4. Scroll down to find the "MCP Servers" section

Step 3: Add the MCP Server

  1. Click on "+ Add new MCP server"
  2. In the dialog that appears:
    • Name: Enter "Dub.co MCP Server" (or any name you prefer)
    • Type: Select "command" from the dropdown
    • Command: Enter env DUBCO_API_KEY=your_api_key_here npx -y dubco-mcp-server (Replace your_api_key_here with your actual Dub.co API key)
  3. Click "Save" to add the server

Step 4: Verify the Connection

After adding the MCP server, you should see a green status indicator next to the server name. If it shows a red or yellow status, try:

  1. Checking that your API key is correct
  2. Restarting Cursor IDE
  3. Verifying that Node.js (16.0.0+) is properly installed

Step 5: Using the Server

The dubco-mcp-server provides tools that can be used with Cursor's AI features:

  1. Open Cursor's Composer or Agent mode (MCP only works in these modes)
  2. Explicitly instruct the AI to use the Dub.co tools (create_link, update_link, delete_link)
  3. Accept the tool usage prompts when they appear

πŸ”§ Usage with MCP

This server provides tools that can be used by AI assistants through the Model Context Protocol. To use it with an MCP-compatible AI assistant, add it to your MCP configuration.

MCP Configuration Example

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

Available Tools

create_link

Create a new short link on Dub.co.

Parameters:

{
  "url": "https://example.com",
  "key": "optional-custom-slug",
  "externalId": "optional-external-id",
  "domain": "optional-domain-slug"
}

Example:

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

update_link

Update an existing short link on Dub.co.

Parameters:

{
  "linkId": "link-id-to-update",
  "url": "https://new-destination.com",
  "domain": "new-domain-slug",
  "key": "new-custom-slug"
}

Example:

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

delete_link

Delete a short link on Dub.co.

Parameters:

{
  "linkId": "link-id-to-delete"
}

Example:

{
  "linkId": "clwxyz123456"
}

πŸ” How It Works

The server connects to the Dub.co API using your API key and provides a standardized interface for AI assistants to interact with Dub.co through the Model Context Protocol. When a tool is called:

  1. The server validates the input parameters
  2. It sends the appropriate request to the Dub.co API
  3. It processes the response and returns it in a format that the AI assistant can understand

πŸ› οΈ Development

Building from Source

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

Running in Development Mode

npm run dev

πŸ“ License

This project is licensed under the ISC License - see the LICENSE
file for details.

πŸ”— Links

πŸ‘₯ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ‘¨β€πŸ’» Created By

This unofficial Dub.co MCP Server was created by GitMaxd
(@gitmaxd
on X).

This project was developed as a learning exercise to understand the Model Context Protocol and how to build MCP servers. I chose Dub.co as the integration target because of its straightforward API and practical utility, making it an ideal candidate for a learning project.

While I have no official affiliation with Dub.co, I highly recommend their service for both manual and automated short link creation. Their API is well-documented and easy to work with, making it perfect for this kind of integration.

If you find this project helpful or have suggestions for improvements, feel free to reach out or contribute to the repository. Happy link shortening!

About

The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.

Topics

ai
mcp
cline
cursorai

Resources

Readme

Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork

Report repository

Releases


No releases published

Packages 0


No packages published

Languages

You can’t perform that action at this time.

Features & Capabilities

Categories
mcp_server model_context_protocol

Implementation Details

Stats

0 Views
0 Favorites
4 GitHub Stars

Repository Info

Gitmaxd Organization

Similar Servers

continuedev_continue by continuedev
0
0
0