The Bitly MCP Server

Welcome to the Bitly MCP Server guide.

If you're here, you probably already know what an MCP Server is, but if you need the primer, check out our What is MCP? page.

The Bitly MCP Server provides access to all of the functionality you'd expect out of a Bitly interface -- like the Bitly API, like the bitly.com website, like the Bitly Chrome Extension, like the Bitly Mobile app -- but this time for your AI agent of choice.

Want to use Bitly with ChatGPT? Bitly MCP Server or Bitly Custom GPT. Want to use Bitly with Claude? Bitly MCP Server. Want to use Bitly with Cursor, VSCode or Windsurf? Bitly MCP Server.

Quick Setup

The Bitly MCP Server is hosted at https://api-ssl.bitly.com/v4/mcp.

Authentication Options:

  • OAuth 2.1 (Recommended) - For clients that support OAuth, this provides secure, token-based authentication with automatic client registration
  • API Token - For simpler setups or clients without OAuth support, use your Bitly API token from https://bitly.com/settings/api

Below is the grid of configurations with links to detailed instructions -- if we're missing one that you use, you will find guidance on the Configuration Details page. We will be adding additional configuration guides over time.

AI AgentConfiguration InstructionsNotes
ChatGPTConfigure ChatGPTOAuth with Dynamic Client Registration
Claude Web Interface (claude.ai)Configure Claude WebOAuth with Dynamic Client Registration
Claude DesktopConfigure Claude DesktopSupports both OAuth and API token
Claude CodeConfigure Claude CodeHTTP transport – supports both OAuth and API token
CursorConfigure CursorHTTP transport – supports both OAuth and API token
VS CodeConfigure VS CodeHTTP transport – supports both OAuth and API token
WindsurfConfigure WindsurfUses npx proxy for local connection
Most other HTTP-compatible agentsCheck our Configuration sectionGeneric HTTP setup works for most

Configurations

Claude Code

Add to ~/.claude/mcp.json:

For OAuth (recommended):

{
  "mcpServers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp"
    }
  }
}

For API Token:

{
  "mcpServers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_BITLY_AUTH_TOKEN"
      }
    }
  }
}

Restart Claude Code after adding the configuration.

Cursor

Add to ~/.cursor/mcp.json:

For OAuth (recommended):

{
  "mcpServers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp"
    }
  }
}

For API Token:

{
  "mcpServers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_BITLY_AUTH_TOKEN"
      }
    }
  }
}

Restart Cursor after adding the configuration.

Claude Desktop

Add to your Claude configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

For OAuth (recommended):

{
  "mcpServers": {
    "Bitly": {
      "url": "https://api-ssl.bitly.com/v4/mcp"
    }
  }
}

For API Token (using npx proxy):

Prerequisite: Requires Node.js 20 LTS or higher with npx support.

{
  "mcpServers": {
    "Bitly": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api-ssl.bitly.com/v4/mcp",
        "--header",
        "Authorization: Bearer ${AUTH_TOKEN}"
      ],
      "env": {
        "AUTH_TOKEN": "YOUR_BITLY_AUTH_TOKEN"
      }
    }
  }
}

Restart Claude Desktop after adding the configuration.

VS Code

Add to ~/.vscode/mcp.json in your workspace:

For OAuth (recommended):

{
  "servers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp"
    }
  }
}

For API Token:

{
  "servers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_BITLY_AUTH_TOKEN"
      }
    }
  }
}

Windsurf

Add to ~/.windsurf/config.json:

{
  "mcpServers": {
    "Bitly": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api-ssl.bitly.com/v4/mcp",
        "--header",
        "Authorization: Bearer ${AUTH_TOKEN}"
      ],
      "env": {
        "AUTH_TOKEN": "YOUR_BITLY_AUTH_TOKEN"
      }
    }
  }
}

Claude Web

For Claude on the web (claude.ai), use OAuth authentication:

  1. Navigate to your Claude workspace settings
  2. Go to the MCP servers configuration section
  3. Add the Bitly MCP Server:
    • Server URL: https://api-ssl.bitly.com/v4/mcp
    • Authentication: OAuth

When prompted, log in to your Bitly account and authorize the connection. Claude will handle the OAuth flow automatically using Dynamic Client Registration.

Note: OAuth support in Claude Web requires Workspace Admin enablement for Team and Enterprise Plans.

ChatGPT

For ChatGPT, use OAuth authentication:

  1. In ChatGPT, go to Settings > Apps & Connectors > Advanced Settings
  2. Toggle Developer Mode on
  3. Go back and click Create
  4. Add the Bitly MCP Server:
    • Server URL: https://api-ssl.bitly.com/v4/mcp
    • Authentication: OAuth

When prompted, log in to your Bitly account and authorize the connection. ChatGPT will handle the OAuth flow automatically using Dynamic Client Registration.

Note: MCP support in ChatGPT requires Plus, Team, Enterprise, or Edu plans. For workspace plans, you must be an admin to access these settings.

Authentication

The Bitly MCP Server supports two authentication methods:

For clients that support OAuth (like Claude Web, ChatGPT, and other modern AI assistants), OAuth provides:

  • Enhanced Security - No need to manually manage API tokens
  • Automatic Client Registration - Dynamic Client Registration (DCR) handles client setup automatically
  • Token Refresh - Automatic token renewal without manual intervention

When configuring OAuth, your AI client will:

  1. Redirect you to Bitly's authorization page
  2. Ask you to log in and authorize the connection
  3. Automatically register as an OAuth client using DCR
  4. Receive and manage access tokens transparently

API Token (Alternative)

For simpler setups or clients without OAuth support:

  1. Log in to your Bitly account at bitly.com
  2. Navigate to Settings → API
  3. Click Generate Access Token
  4. Copy the token and store it securely
  5. Use it in your MCP client configuration as shown in the examples above

Test It Out

Once configured, try asking your AI:

"What Bitly tools are available?" 

or

"Please shorten this URL: https://example.com/very-long-url"

From there you should be all set!