# U301 — how to use (mcp.ai)

Connect your U301 account and use 3 tools for URL shortener straight from your AI agent. Connect with your own API key. U301 provides an API to manage all U301 resources, currently under development.

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

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

### Endpoints
- `POST https://api.mcp.ai/api/u301/delete/link` — Tool to delete a shortened link by its link identifier. Use when you need to remove a shortened link from the system.
  - body: { link: string }
- `POST https://api.mcp.ai/api/u301/list/shorten/domains` — Tool to list available domains for URL shortening, including public domains and custom domains. Use when you need to see what domains are available for creating short links. Supports pagination and fi
  - body: { page?: integer, per_page?: integer, visibility?: string }
- `POST https://api.mcp.ai/api/u301/shorten/link` — Tool to shorten a long URL into a compact short link. Use after obtaining the long URL when you need a shareable link.
  - body: { url: string, slug?: string, title?: string, domain?: string }

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

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