# Shorten.REST — how to use (mcp.ai)

Connect your Shorten.REST account and use 6 tools for URL shortener straight from your AI agent. Connect with your own API key. Shorten.REST is a link shortening and management app that allows you to generate unique, branded URLs with advanced tracking capabilities.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_shorten_rest?ms=1787291400000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `shorten_rest_create_alias`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/shorten_rest`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/shorten_rest/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/shorten_rest/create/alias` — Tool to create a new alias (short URL) under a specified domain. Use when you need to shorten a URL. If no domain is specified, the alias will be attached to the default domain Short.fyi. You can over
  - body: { metatags?: object[], snippets?: object[], aliasName?: string, domainName?: string, destinations: object[] }
- `POST https://api.mcp.ai/api/shorten_rest/delete/alias` — Tool to delete a single alias by providing alias and domain. Use when you need to remove an existing shortened URL. If no domain is provided, the API searches for the matching alias within the Short.f
  - body: { aliasName: string, domainName?: string }
- `POST https://api.mcp.ai/api/shorten_rest/get/aliases` — Tool to retrieve all URL aliases of the authenticated user. Use when you need to list existing aliases (supports pagination).
  - body: { limit?: integer, cursor?: string }
- `POST https://api.mcp.ai/api/shorten_rest/get/clicks` — Tool to retrieve click data for shortened URLs. Use to check click analytics for your aliases. Returns a list of click records which may be empty if no clicks have occurred yet. Returned records may r
  - body: { alias?: string, limit?: integer, cursor?: string }
- `POST https://api.mcp.ai/api/shorten_rest/list/aliases/by/domain` — Tool to retrieve all alias names associated with your account and a given domain. Results are in descending order by creation date. Use when you need to list alias names (not full details) for a speci
  - body: { limit?: integer, domain_name?: string, continue_from?: string }
- `POST https://api.mcp.ai/api/shorten_rest/update/alias` — Tool to update an existing short URL alias by providing its alias name and domain. Use when you need to modify destinations, metatags, or snippets for an existing alias. IMPORTANT: When updating array
  - body: { metatags?: object[], snippets?: object[], aliasName: string, domainName?: string, destinations?: object[] }

## Example prompts
- "What can I do in Shorten.REST?"
- "Show me a summary of my Shorten.REST account"

## More
- Page: https://mcp.ai/shorten_rest
- Agent spec (llms.txt): https://mcp.ai/shorten_rest/llms.txt
- Postman collection: https://mcp.ai/shorten_rest/postman.json
