shorten.dev/docs
shorten.dev/docs
Getting StartedAuthentication
OverviewSetupTools Reference
MCP Integration

Setup

Step-by-step instructions for connecting AI clients to the Shorten MCP server.

Prerequisites

  1. A Shorten account with an active API key (sk_)
  2. An MCP-compatible client (Claude Desktop, Claude Code, Cursor, or similar)

Client setup

Add to your Claude Desktop configuration file:

PlatformPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "shorten": {
      "command": "npx",
      "args": ["@shorten-dev/mcp"],
      "env": {
        "SHORTEN_API_KEY": "sk_your_key_here"
      }
    }
  }
}

Restart Claude Desktop after saving. The Shorten tools will appear in the tools menu.

Add to your project's .mcp.json:

{
  "mcpServers": {
    "shorten": {
      "command": "npx",
      "args": ["@shorten-dev/mcp"],
      "env": {
        "SHORTEN_API_KEY": "sk_your_key_here"
      }
    }
  }
}

Add the MCP server through your editor's MCP settings:

{
  "mcpServers": {
    "shorten": {
      "command": "npx",
      "args": ["@shorten-dev/mcp"],
      "env": {
        "SHORTEN_API_KEY": "sk_your_key_here"
      }
    }
  }
}

Refer to your editor's MCP documentation for the exact configuration location.

Verify the connection

Once configured, ask your AI agent:

Create a short link for https://google.com

If the connection is working, you should receive a response with the shortened URL and slug.

Troubleshooting

IssueSolution
"Unauthorized" errorVerify API key is valid and has read/write scopes
Tools not appearingRestart your MCP client after configuration changes
Rate limit errorsRate limit is 300 req/hr per user — check current usage
Wrong tool resultsEnsure the API key has the required scope for the tool

Overview

Connect AI agents to Shorten using the Model Context Protocol.

Tools Reference

Complete reference for all available tools in the Shorten MCP server.

On this page

PrerequisitesClient setupVerify the connectionTroubleshooting