LinkMasher for your agents

LinkMasher is an MCP server. Claude, ChatGPT, Cursor, n8n, or an agent you built can ask it for a tracked link while writing the post, and the link comes back tagged under your rules, with a short link, logged in your workspace.

1. Get your API key

  1. Sign in with the email you bought with.
  2. Open the Your agents panel in the app. The key starts with lm_. Copy it.
  3. Add at least one site under Your sites. Links can only go to a site in your workspace, for agents too.

A key comes with either plan. Solo is $12 a month, or $9 a month billed yearly. Team is $27 a month, or $19 a month billed yearly, for up to 10 seats, and every member's agents share the workspace's rules and sites. The founding rate is the rate you keep.

A key exists only while the plan behind it is active. Cancel, refund or let the plan lapse and the key is deleted that minute, automatically, and every agent using it stops. The workspace owner can make a new key any time; the old one stops working the moment a new one is made. Anyone holding the key can make links in your workspace and read its log, so treat it like a password.

2. Connect your client

The server speaks MCP over Streamable HTTP. Two ways to present the key:

Claude Code

claude mcp add --transport http linkmasher https://linkmasher.com/mcp --header "Authorization: Bearer lm_YOURKEY"

Claude Desktop and claude.ai (custom connector)

Where the client asks for a remote MCP server URL, paste the address with the key in it, and leave authentication off:

https://linkmasher.com/mcp/lm_YOURKEY

Cursor

In .cursor/mcp.json (or the global one):

{
  "mcpServers": {
    "linkmasher": {
      "url": "https://linkmasher.com/mcp",
      "headers": { "Authorization": "Bearer lm_YOURKEY" }
    }
  }
}

ChatGPT

Add a connector that points at a remote MCP server (developer mode). Use the address with the key in it and no authentication:

https://linkmasher.com/mcp/lm_YOURKEY

n8n and other automation tools

Use the MCP Client node (or the HTTP-based MCP tool your platform offers) with the endpoint https://linkmasher.com/mcp and bearer authentication set to your key.

Your own agent

Any MCP SDK with a Streamable HTTP client transport works. Point it at https://linkmasher.com/mcp and send the Authorization header on every request. The server is stateless: no session to keep, one request per call.

3. What the agent can call

make_tracked_link

The main one. description in plain words (platform, placement, topic, date, and the post URL if it goes inside a post). Returns the destination, the five UTMs, the GA4 channel they land in, the full tagged URL and a short link. Logged in the workspace unless save is false.

create_tracked_link

When the agent already knows the exact values: destination (a site slug for its home page, or a page URL on one of your sites) plus all five utm_* values. Returns tagged_url and short_url.

list_destinations

Your sites: slug, name, host, home URL. Any page on those hosts, and on their subdomains, is an allowed destination.

recent_links

The newest links in your log with their short links and click counts, so the agent reuses a link instead of making a duplicate.

utm_rules

The convention every link follows: source codes, the fixed medium list, placement words.

An example call

make_tracked_link({
  "description": "Link to our pricing page in the first comment of my LinkedIn post about the spring launch, posting 2026-10-15"
})

What comes back

{
  "destination": "https://acme.com/pricing",
  "utms": {
    "utm_source": "linkedin",
    "utm_medium": "social",
    "utm_campaign": "acme-spring-launch",
    "utm_term": "first-comment",
    "utm_content": "2026-10-15-spring-launch"
  },
  "ga4_channel": "Organic Social",
  "tagged_url": "https://acme.com/pricing?utm_source=linkedin&utm_medium=social&utm_campaign=acme-spring-launch&utm_term=first-comment&utm_content=2026-10-15-spring-launch",
  "short_url": "https://go.mashertools.com/Hk7m2Q",
  "saved": true,
  "log_id": 184
}

4. Tell the agent when to use it

Put a line like this in the agent's instructions, project notes or system prompt:

Use the LinkMasher tools for EVERY link to one of our sites that you put into a blog post, social post, email, newsletter, carousel, video description or any other creative. Call make_tracked_link with where the link will be posted. Use short_url where length matters (X, captions, bios, spoken links) and tagged_url where a long link is fine. Check recent_links before making a duplicate. Do NOT use it for Meta ads: those tag themselves.

Then ask for work the normal way: "Write the LinkedIn post for the spring launch with a link to pricing in the first comment." The agent makes the link as part of the post.

5. The rules every link follows

The full list, with the source codes and the medium list, is the utm_rules tool, and the Rules panel in the app.

When something does not work