# Y gy — how to use (mcp.ai)

Connect your Y gy account and use 8 tools for URL shortener straight from your AI agent. Connect with your own API key. y.gy is a URL shortener and QR code generator that allows users to create short, memorable links from long URLs, customize them with unique endings, and integrate with an API for programmatic link creation.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_y_gy?ms=1787293560000`
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. `y_gy_create_link`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/y_gy`
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/y_gy/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/y_gy/create/link` — Tool to create a comprehensive Y.gy shortened link with advanced features. Supports custom domains, suffixes, QR codes, password protection, expiration dates, social media previews, device-specific re
  - body: { name?: string, tags?: integer[], domain?: string, suffix?: string, og_image?: string, og_title?: string, password?: string, disable_png?: string, webhook_url?: string, og_description?: string, destination_url: string, expiration_date?: string, webhook_auth_key?: string, ios_link_destination?: string, qr_code_background_hex?: string, qr_code_foreground_hex?: string, android_link_destination?: string }
- `POST https://api.mcp.ai/api/y_gy/create/tag` — Tool to create a new tag. Use after determining the tag name to categorize links.
  - body: { name: string }
- `POST https://api.mcp.ai/api/y_gy/delete/short/link` — Tool to delete a specific short link by its ID. Use when you need to remove a short link after confirming its ID.
  - body: { id: string }
- `POST https://api.mcp.ai/api/y_gy/delete/tag` — Tool to delete a tag. Use when you need to remove a tag by its ID after confirming it exists.
  - body: { id: string }
- `POST https://api.mcp.ai/api/y_gy/get/all/links` — Tool to fetch all short links with optional pagination. Use when you need to list existing links with filters.
  - body: { tag?: string, page?: integer, limit?: integer, search?: string }
- `POST https://api.mcp.ai/api/y_gy/get/all/tags` — Tool to retrieve all tags associated with the organization. Use when you need to list all available tags for categorizing resources.
- `POST https://api.mcp.ai/api/y_gy/get/link` — Tool to retrieve a specific short link by its ID. Returns the complete link object including destination URL, QR codes, tags, and all configuration options. Use when you need full details about a shor
  - body: { id: string }
- `POST https://api.mcp.ai/api/y_gy/register/user` — Tool to register a new user account. Use when onboarding a new user to the y.gy system with their chosen username, password, and email.
  - body: { email: string, password: string, username: string }

## Example prompts
- "What can I do in Y gy?"
- "Show me a summary of my Y gy account"

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