Bitly MCP Server

oficial

Transforme seu assistente de IA em um hub de marketing digital que cria, organiza e analisa links e QR Codes sob demanda.

Documentação

O Servidor MCP do Bitly

Bem-vindo ao guia do Servidor MCP do Bitly.

Se você está aqui, provavelmente já sabe o que é um Servidor MCP, mas se precisar de uma introdução, confira nossa página O que é MCP?.

O Servidor MCP do Bitly oferece acesso a todas as funcionalidades que você espera de uma interface do Bitly -- como a API do Bitly, o site bitly.com, a Extensão do Bitly para Chrome, o Aplicativo Móvel do Bitly -- mas desta vez para o seu agente de IA de preferência.

Quer usar o Bitly com o ChatGPT? Servidor MCP do Bitly ou GPT Personalizado do Bitly. Quer usar o Bitly com o Claude? Servidor MCP do Bitly. Quer usar o Bitly com o Cursor, VSCode ou Windsurf? Servidor MCP do Bitly.

Configuração Rápida

O Servidor MCP do Bitly está hospedado em https://api-ssl.bitly.com/v4/mcp.

Opções de Autenticação:

  • OAuth 2.1 (Recomendado) - Para clientes que suportam OAuth, isso fornece autenticação segura baseada em tokens com registro automático do cliente
  • Token de API - Para configurações mais simples ou clientes sem suporte a OAuth, use seu token de API do Bitly de https://bitly.com/settings/api

Abaixo está a grade de configurações com links para instruções detalhadas -- se estiver faltando alguma que você usa, você encontrará orientação na página Detalhes da Configuração. Adicionaremos guias de configuração adicionais ao longo do tempo.

Agente de IAInstruções de ConfiguraçãoObservações
ChatGPTConfigurar ChatGPTOAuth com Registro Dinâmico de Cliente
Interface Web do Claude (claude.ai)Configurar Claude WebOAuth com Registro Dinâmico de Cliente
Claude DesktopConfigurar Claude DesktopSuporta tanto OAuth quanto token de API
Claude CodeConfigurar Claude CodeTransporte HTTP – suporta tanto OAuth quanto token de API
CursorConfigurar CursorTransporte HTTP – suporta tanto OAuth quanto token de API
VS CodeConfigurar VS CodeTransporte HTTP – suporta tanto OAuth quanto token de API
WindsurfConfigurar WindsurfUsa proxy npx para conexão local
Maioria dos outros agentes compatíveis com HTTPConsulte nossa seção de ConfiguraçãoConfiguração HTTP genérica funciona para a maioria

Configurações

Claude Code

Adicione ao arquivo ~/.claude/mcp.json:

Para OAuth (recomendado):

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

Para Token de API:

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

Reinicie o Claude Code após adicionar a configuração.

Cursor

Adicione ao arquivo ~/.cursor/mcp.json:

Reinicie o Cursor após adicionar a configuração.

Claude Desktop

Adicione ao seu arquivo de configuração do Claude:

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

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

Para Token de API (usando proxy npx):

Pré-requisito: Requer Node.js 20 LTS ou superior com suporte a npx.

{
  "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"
      }
    }
  }
}

Reinicie o Claude Desktop após adicionar a configuração.

VS Code

Adicione ao arquivo ~/.vscode/mcp.json no seu espaço de trabalho:

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

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

Windsurf

Adicione ao arquivo ~/.windsurf/config.json:


### 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:

### OAuth 2.1 with Dynamic Client Registration (Recommended)

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:

"Quais ferramentas do Bitly estão disponíveis?"

"Por favor, encurte esta URL: https://example.com/very-long-url"


A partir daí, você deve estar pronto!

---