
Shorten a long URL to a Bitlink. Simplest way to create a short link. Returns the new short URL.
Create a Bitlink with full options including title, tags, and deeplinks. Use shorten_bitlink for simple URL shortening.
Get details of a Bitlink by its ID (e.g., 'bit.ly/abc123'). Returns title, long URL, tags, and metadata.
Update a Bitlink's title, tags, long URL, or archived status. Use get_bitlink to verify the bitlink exists.
Delete a Bitlink permanently. This cannot be undone. Use get_bitlink to verify before deleting.
Expand a short Bitlink to its original long URL. Provide the bitlink ID (e.g., 'bit.ly/abc123').
List all branded short domains (BSDs) available to the current user.
List channels in a group. Channels are distribution methods for campaigns. Use list_groups to find valid group GUIDs.
List all groups the current user belongs to. Returns group GUIDs needed for other operations.
Get details of a specific Bitly group. Use list_groups to find valid GUIDs.
Update a Bitly group's name or settings. Use list_groups to find valid GUIDs.
List bitlinks in a group with optional filters. Supports pagination via searchafter cursor. Use listgroups to find valid GUIDs.
Get all tags used in a group. Use list_groups to find valid GUIDs.
Get preferences for a group including default domain. Use list_groups to find valid GUIDs.
Update group preferences such as default domain. Use list_groups to find valid GUIDs.
List all organizations the current user belongs to.
Get details of a specific Bitly organization by GUID. Use list_organizations to find valid GUIDs.
Get plan limits for an organization. Use list_organizations to find valid GUIDs.
Get the current authenticated Bitly user's profile including name, email, and default group.
Get platform rate limits for the current Bitly user.
Validate Bitly credentials by fetching the current user profile.

In an mcp.json file, add the configuration below, and restart Cursor.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5 "headers": {
6 "Authorization": "Bearer yMt*****"
7 }
8 }
9 }
10}
11Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.
Make sure Claude is using the Node v20+.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "yMt*****"
14 }
15 }
16 }
17}Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "<ah-production-access-key>"
14 }
15 }
16 }
17 }In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".
You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.
Learn more in the official documentation ↗
1{
2 "inputs": [
3 {
4 "type": "promptString",
5 "id": "agent-handler-auth",
6 "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7 "password": true
8 }
9 ],
10 "servers": {
11 "agent-handler": {
12 "type": "stdio",
13 "command": "npx",
14 "args": [
15 "-y",
16 "mcp-remote@latest",
17 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18 "--header",
19 "Authorization: Bearer ${input:agent-handler-auth}"
20 ]
21 }
22 }
23}It's an MCP server that connects your agents to Bitly's link management platform via tools. Your agents can invoke these tools to shorten URLs, retrieve click analytics, update link destinations, manage link groups, and more.
Bitly offers an official MCP server, but you can also use one from a third-party platform, like Merge Agent Handler.
The use cases naturally depend on the agent you've built, but here are a few common ones:
Here are some of the most commonly used tools:
create_bitlink: generates a shortened Bitly URL from a long link, with optional custom back-half and title. Use this when an agent needs to produce a trackable short URL as part of a publishing or distribution workflowget_bitlink: fetches metadata and click statistics for a specific bitlink. Helpful when an agent needs to pull performance data for reporting or verify a link's current destinationupdate_bitlink: modifies a bitlink's destination URL, title, or archived state. Good for workflows that handle domain migrations or need to swap out a link target without changing the short URLlist_group_bitlinks: returns all bitlinks within a group, filterable by tag, keyword, or creation date. Call this when an agent needs to audit or process a collection of links in bulkexpand_bitlink: resolves a shortened Bitly URL back to its full original destination. Useful for agents that need to verify where a short link points before taking a downstream actionget_group_tags: retrieves all tags applied to links within a group. Use this when an agent needs to categorize or filter links by campaign, content type, or teamHere's why teams choose Merge Agent Handler's Bitly MCP server over building their own or using another option:
You can take the following steps:
1. Create or log into your Merge Agent Handler account and navigate to Tool Packs (collections of connector tools scoped to a specific use case).
2. Create a new Tool Pack, then find and enable the Bitly connector. Choose which tools to include: enable read tools like get_bitlink and list_group_bitlinks for analytics and auditing use cases, or add write tools like create_bitlink and update_bitlink if your agent needs to create or modify links.
3. Add a Registered User inside the Tool Pack. This is the identity context under which your agent operates. Merge generates a unique MCP URL scoped to this user once it's created.
4. From the Registered User detail page, authenticate Bitly by completing the OAuth or API key credential flow. Merge stores and manages the credentials going forward.
5. Copy the MCP URL from the Tool Pack detail page and generate an API key from Settings. You'll need both to connect your agent.
6. Add the MCP server to your agent or IDE using the MCP URL and API key. Your Bitly tools are now accessible through that endpoint.
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now