# lc.cx — how to use (mcp.ai)

Connect your lc.cx account and use 10 tools for URL shortener straight from your AI agent. Connect with your own API key. lc.cx provides URL shortening, branded domains, workspaces, tags, click statistics, and QR code generation through its API.

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

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

### Endpoints
- `POST https://api.mcp.ai/api/lc_cx/create/short/link` — Shorten one destination URL on lc.cx, optionally choosing its path, tags, note, and workspace. Warning: each successful creation permanently consumes one unit of the current monthly quota, even if the
  - body: { note?: string, tag_ids?: string[], domain_id?: string, custom_path?: string, destination: string, workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/create/tags` — Create one or more tags in a workspace and return their ids for attaching to short links.
  - body: { tags: object[], workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/delete/short/link` — Permanently delete one short link. Deletion does not restore the monthly creation quota.
  - body: { link_id: string, workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/delete/tag` — Permanently delete one tag from the selected workspace.
  - body: { tag_id: string, workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/get/account/context` — Return lc.cx plan and short-link quota information together with available domains and workspaces needed to create and route short links.
- `POST https://api.mcp.ai/api/lc_cx/get/short/link` — Retrieve one short link by its lc.cx link id from the selected workspace.
  - body: { link_id: string, workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/list/short/links` — Return one page of recently created short links in the selected workspace, with an offset for the next page when one may exist.
  - body: { offset?: integer, workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/list/tags` — Return all tags available in the selected workspace for organizing short links.
  - body: { workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/update/short/link` — Update a short link's destination, note, or complete tag assignment. tag_ids is the full replacement list; resend current ids to preserve them or [] to clear.
  - body: { note?: string, link_id: string, tag_ids: string[], destination?: string, workspace_id?: string }
- `POST https://api.mcp.ai/api/lc_cx/update/tag` — Update the name or color of one tag in the selected workspace.
  - body: { name?: string, color?: string, tag_id: string, workspace_id?: string }

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

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