Connect Bitly to Claude Code
Shorten and manage links and QR codes, and read their click analytics. Add Toolspoke to Claude Code once and it can use 16 Bitly actions. Your Bitly credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Bitly and connect it
Add Bitly to a project in your Toolspoke workspace.
Access token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Access token
- Bitly → Settings → Developer settings → API → enter your password → Generate token. The token acts as you, in every group you belong to.
Choose what Claude Code may do
All 16 actions start on. Switch off any of the 4 actions that change something in Bitly, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Bitly actions that only read, so they are safe to try first.
- The user this token belongs to, with their default group guid
- The groups this token can reach, each with the group_guid most other calls need
- One Bitlink's details, destination, title, tags, created date and archived state
- Return the long URL a Bitlink points to
What Claude Code can do in Bitly
12 actions read, 3 write and one deletes or permanently changes something.
Reads
Get user
The user this token belongs to, with their default group guid.
List groups
The groups this token can reach, each with the group_guid most other calls need. Reads real account data, so an install tests itself with it.
Get bitlink
One Bitlink's details, destination, title, tags, created date and archived state.
Expand bitlink
Return the long URL a Bitlink points to.
List group bitlinks
The Bitlinks in one group, newest first, optionally searched or filtered to archived links.
Get clicks
Click counts for one Bitlink, bucketed by time unit.
Get clicks summary
Total clicks on one Bitlink over a window.
Get click countries
One Bitlink's clicks broken down by country.
Get click referrers
One Bitlink's clicks broken down by referrer.
Get group clicks
Click counts across every Bitlink in a group, bucketed by time unit.
Get qr code
One QR code's details, title, destination and archived state.
List group qr codes
The QR codes in one group.
Writes
Shorten
Shorten a long URL into a Bitlink. Returns the existing Bitlink when this URL was already shortened in the group. Counts against the plan's monthly link limit.
Create bitlink
Create a Bitlink with a title and tags in one call. Use shorten when a bare short link is enough.
Update bitlink
Change a Bitlink's title or tags, or archive it. Does not change where the link points, redirecting a link everyone has already shared is deliberately not offered here.
Deletes or permanently changes
Delete bitlink
Delete a Bitlink. Destructive because it cannot be undone and anyone holding the short link stops reaching the destination.
Bitly in Claude Code: questions
Does Claude Code see my Bitly credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Bitly?
Yes. Each of the 16 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.
Will 16 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Bitly action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Bitly call does not run in a sandbox, so it bills nothing.
Bitly in your other apps
Try Bitly in Claude Code
Free to start, and tool calls cost nothing on any plan.