# Connect Claude Code to LotsLink

Canonical page: https://lots.link/agents/claude-code
Steps checked: 2026-10-05

Ask Claude Code to create your short links, make QR codes and read click analytics in LotsLink. Add LotsLink to Claude Code as a remote MCP server and sign in once.

MCP server URL: https://api.lots.link/mcp
REST API docs: https://api.lots.link/docs
Setup instructions for your agent: https://lots.link/skill.md

## What you can do once connected

- Create and edit short links with custom slugs, UTM parameters and expiry dates, on lots.link or your own verified domain.
- Make a QR code for any link.
- Organize links into projects and switch several links on or off at once.
- Read click analytics by link or workspace, and export CSV or JSON.
- Add custom domains and manage workspaces and teammates, in your role.

The LotsLink dashboard does the whole job too: links, QR codes, projects, domains, analytics and team. Your agent for speed, the dashboard for control.

## You need

- Claude Code with a Claude plan
- A LotsLink account. You can create one during sign-in.

## Connect Claude Code to LotsLink

1. **Add the server.** Run this in your terminal. It adds LotsLink to the current project; nothing else to install.

```
claude mcp add --transport http lots-link https://api.lots.link/mcp
```

Every project:

```
claude mcp add --transport http --scope user lots-link https://api.lots.link/mcp
```

2. **Sign in from Claude Code.** Start Claude Code and run /mcp. Select lots-link, choose Authenticate, then choose Allow on the LotsLink page that opens in your browser.

```
/mcp
```

3. **Check the connection.** Back in Claude Code, ask a read-only question to confirm the tools work.

```
List my LotsLink workspaces
```

## What to ask next

- “Shorten https://example.com/spring-sale as spring-sale with utm_source newsletter.”
- “Make a QR code for the spring-sale link so I can print it on the flyer.”
- “Which of my links got the most clicks this week, and from which countries?”
- “Make a short link and a QR code for this project’s docs URL”

## Questions and troubleshooting

### How do I connect Claude Code to LotsLink?

Follow the Claude Code setup above to add https://api.lots.link/mcp. Complete sign-in using the authentication method shown. Then ask “List my LotsLink workspaces”.

### Can I add LotsLink to every Claude Code project?

Yes. Use the second command in step 1 (the --scope user variant) to add LotsLink for every project on your computer instead of the current one.

### Do I need an API key to use LotsLink with Claude Code?

No. Claude Code signs in to LotsLink in your browser. API keys are for the REST API, for scripts and your own apps.

### What does LotsLink cost?

Current plans and prices are on https://lots.link/pricing. Your agent’s own plan or usage fees are separate.

### Can I change where a printed QR code goes?

Yes. Your agent changes the link’s destination and the short URL and QR code stay the same, so printed codes keep working and keep counting scans. The change reaches every visitor at once.

### Can my agent delete my links?

When you ask it to. Switching a link off is the choice you can undo; deleting is permanent and removes the link’s click statistics and QR codes. Your agent works in your role: members change their own links, owners and admins change any link, and viewers read only.

### What do the click analytics include?

Recorded visits by link or workspace, with source, device and approximate location when available. Known bots, previews and prefetches are not counted.

### lots-link shows as needing authentication

Run /mcp, select lots-link and choose Authenticate, or run claude mcp login lots-link in your terminal.

### The browser says Claude Code registered itself and is not verified

That is normal for Claude Code: it registers with each MCP server and receives the sign-in on your own computer. Allow it when the return address is localhost.

## Sources

- [Claude Code: MCP](https://code.claude.com/docs/en/mcp)
