← All guides

Developers · 6 min read · Updated June 14, 2026

Set up the Reslug MCP server

The Reslug MCP server lets AI assistants operate your Reslug workspace through the Model Context Protocol. From a conversation in Claude or an editor like Cursor, your assistant can create short links, search them, pull analytics, fetch QR codes, and manage tags.

It is a thin client over the Reslug REST API. It stores no credentials of its own; it forwards your API key. Every plan limit, scope, and rate limit is enforced by the API, exactly as for any other API client. API access is part of the Pro plan, so you need a Pro-workspace key.

Before you start

You need Node.js 18 or newer and a Pro-workspace API key. Create a key in the Reslug app under API Keys. No manual install is needed — the configuration below runs the server with npx, which downloads and caches it automatically.

API access is Pro-only. A key from a Free workspace is rejected with a clear message, and the server cannot work without a valid key.

Configuration

The server reads two environment variables, passed by your MCP client. Nothing is hardcoded.

Environment variables the Reslug MCP server reads.
VariableRequiredDefault
RESLUG_API_KEYYes
RESLUG_BASE_URLNohttps://api.reslug.com

Connect Claude

In Claude Desktop, open Settings, then Developer, then Edit Config, and add a server entry:

{
  "mcpServers": {
    "reslug": {
      "command": "npx",
      "args": ["-y", "reslug-mcp"],
      "env": {
        "RESLUG_API_KEY": "your_pro_api_key"
      }
    }
  }
}

Restart Claude Desktop. The Reslug tools appear in the tools menu.

Connect Cursor

Cursor and other editor clients use the same shape. Add this to your MCP settings (for Cursor, .cursor/mcp.json):

{
  "mcpServers": {
    "reslug": {
      "command": "npx",
      "args": ["-y", "reslug-mcp"],
      "env": {
        "RESLUG_API_KEY": "your_pro_api_key"
      }
    }
  }
}

Authentication and scoping

The server sends your key as an X-Api-Key header on every request. The key is scoped to one workspace and to the scopes you granted it, so an assistant can only see and change that workspace, and only through the scopes the key holds. The server adds no bypass.

If a call fails, the assistant receives a readable message: an invalid or non-Pro key, a missing scope, a slug already in use, a validation problem, or a rate-limit hit.

Tool catalog

The tools the Reslug MCP server exposes.
ToolWhat it does
create_linkCreate a short link (destination, slug, domain, title, tags, UTM values or a template name).
list_linksFind or list links by text, tag, or recency.
get_linkGet one link by id or exact slug.
get_link_analyticsClicks and country, device, and referrer breakdowns over a date range.
get_workspace_summaryWorkspace name and plan, total links, total and recent clicks.
get_qr_codeGet or generate the QR code image for a link.
list_tags, create_tagList tags or create one.
add_tags_to_link, remove_tag_from_linkAttach or detach tags on a link.
Read tools are safe to call freely. There are no delete or destructive tools in this version, so an assistant can explore without risk. Analytics respect your plan retention window (Free 30 days, Pro 365 days) and exclude bot traffic.

Try it

A good first conversation: ask your assistant to create a short link for a URL and tag it, then ask how that link is doing, then ask for its QR code. It will chain create_link, get_link_analytics, and get_qr_code on its own.

Frequently asked questions

Do I need a separate password or login for the MCP server?

No. The server uses your existing Reslug API key. It has no account of its own and stores no credentials.

Can the assistant delete my links?

No. This version exposes no delete or destructive tools. The most it can do is create links and tags and attach or detach tags.

Why does it say API access requires Pro?

The MCP server uses the Reslug API, which is part of the Pro plan. A key from a Free workspace is rejected. Upgrade the workspace to use it.

Keep reading