# Dub.co MCP for AI Agents MCP

> Dub.co lets you manage your marketing links completely through chat. Instantly create custom short URLs, track detailed click analytics (including geographic breakdowns and device type), update existing redirects, and audit link performance without ever leaving your AI agent.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** link-shortening, url-tracking, marketing-analytics, custom-domains, click-metrics, redirects

## Description

This MCP connects your AI client directly to Dub.co, the modern platform for managing campaign links. You can now handle everything from generating a custom short link to pulling detailed performance reports using only natural conversation. For instance, you can ask your agent to check if an old URL needs updating or pull all click data related to a specific tag across multiple workspaces.

It’s about having deep analytics—like knowing which countries are driving traffic and what device they're using—available instantly. This capability is managed through the Vinkius catalog, allowing your AI agent access to thousands of services in one place. You don't need to jump between dashboards or copy data into a spreadsheet; you just ask for it.

## Tools

### create_short_link
Creates a brand new short link pointing to any destination URL.

### delete_short_link
Permanently removes an existing short link from your account.

### get_workspace_analytics
Retrieves the overall click and performance metrics for all links in your current workspace.

### get_link_details
Pulls detailed information, including click history, for one specific short link.

### get_url_metatags
Checks the Open Graph metatags for any given URL before you use it in a campaign.

### list_domains
Retrieves a list of all custom domains associated with your account.

### list_links
Pulls a complete list of every short link currently active in the workspace.

### list_tags
Retrieves all custom tags you've used to categorize and filter your links.

### list_workspaces
Shows a list of all different campaign workspaces you have access to.

### update_short_link
Changes the destination URL or slug for an existing short link.

## Prompt Examples

**Prompt:** 
```
What were the total clicks last month, and which top 3 countries saw the most traffic?
```

**Response:** 
```
**📊 Workspace Analytics Report**

*   **Total Clicks (Last 30 Days):** 14,892
*   **Top Traffic Sources:**
    1.  United States: 5,120 clicks (34%) - *High volume, primarily mobile traffic.*
    2.  Canada: 2,880 clicks (19%) - *Steady growth from desktop.* 
    3.  UK: 1,760 clicks (12%) - *Good conversion rate noted.*
```

**Prompt:** 
```
I'm launching a new campaign for 'summer-sale'. Create the link and make sure it uses the tag 'Summer 24'.
```

**Response:** 
```
**✅ Link Created Successfully**

Your short URL is `dub.co/summer-sale`. It points to your specified destination.

*   **Status:** Active
*   **Custom Slug:** summer-sale
*   **Assigned Tag:** Summer 24
*   **Next Steps:** Remember to monitor the analytics using the tag 'Summer 24' for performance tracking.
```

**Prompt:** 
```
Before I link this URL, can you check its Open Graph tags? It’s for a blog post about AI tools.
```

**Response:** 
```
**🔍 Metadata Check: Blog Post on AI Tools**

| Tag Type | Value Found |
| :--- | :--- |
| **og:title** | The Future of AI Writing |
| **og:description** | A deep dive into prompt engineering and LLMs. |
| **og:type** | article |

*Conclusion:* Metatags look solid for social sharing. Ready to link!
```

## Capabilities

### Generate and modify short links
You can create new, custom-sluggable links pointing anywhere, or update an existing link's destination URL.

### Analyze performance metrics
Retrieve overall click data for a workspace, or dive into the specifics of any single short link to see who clicked it and where they came from.

### Audit URLs before linking
Check Open Graph metatags for any destination URL to make sure your content looks good across social media platforms.

### Manage domains and workspaces
List all available custom domains or switch between different campaign workspaces associated with your account.

### Organize links using tags
Pull a list of existing short links, filtered by specific organizational tags you've applied.

## Use Cases

### A new campaign needs launch tracking
The PM asks the agent to create a short link for the new landing page using `create_short_link`. The agent confirms the URL and tag, allowing the team to share it immediately while knowing where all clicks will be tracked.

### Need to check if an old link is broken
The marketer asks the agent about a specific redirect. The agent uses `get_link_details` to pull up the full history and confirms that the link is active, saving time spent manually checking dashboard reports.

### Quarterly performance review
The content creator asks for aggregate analytics across all projects. The agent executes `get_workspace_analytics`, providing a summary of clicks and geographic breakdowns in seconds, eliminating hours of spreadsheet work.

### Switching between client accounts
The agency employee needs to analyze data for two different clients. They use the agent to `list_workspaces` first, then ask for analytics on a specific workspace, ensuring they pull the correct metrics without mixing up client data.

## Benefits

- Generate links on the fly: Use `create_short_link` to instantly deploy a custom, trackable URL without leaving your chat window.
- Get deep analytics immediately: The `get_workspace_analytics` tool aggregates total clicks and traffic breakdowns for immediate campaign assessment.
- Audit content before launch: Run `get_url_metatags` on any destination URL to ensure social media previews look professional every time.
- Keep things organized: You can list all links and filter them by tags using the `list_tags` tool, making cleanup effortless.
- Manage multiple clients: Use `list_workspaces` to switch between different client or project accounts instantly, keeping data siloed.

## How It Works

The bottom line is that your AI client handles all the API calls; you just talk to it like you're talking to a colleague who already knows where the data lives.

1. First, subscribe to this MCP and provide your Dub.co API Key.
2. Next, tell your AI agent what kind of link data or analytics you need (e.g., 'Show me the US click stats for last month').
3. Your agent accesses Dub.co's tools, retrieves the specific link details or reports, and gives you a clean summary in chat.

## Frequently Asked Questions

**How does the Dub.co MCP help me track campaign performance?**
It allows you to pull comprehensive reports instantly. You can ask for total clicks, see which countries are sending traffic, and even find out if people are using mobile or desktop devices without leaving your chat.

**Can I use the Dub.co MCP to manage links across multiple clients?**
Yes. The MCP lets you list all available workspaces, so you can tell your agent exactly which client's data you want analyzed or modified without mixing up accounts.

**I need to make sure my new link is properly formatted for social media.**
You can use the MCP to check a URL's Open Graph metatags. This confirms that when the link is shared, it will display professional titles and descriptions on platforms like LinkedIn.

**Does Dub.co make it easy to update links that were created last year?**
Absolutely. Instead of logging into the dashboard, you just tell your agent which link needs changing, provide the new destination URL, and it updates it for you.

**What if I want to see performance data only for links related to a specific campaign tag?**
You can ask the MCP to filter the analytics results by any custom tag. This is crucial for isolating the ROI of one single, targeted effort.