Bitly MCP Server
officielTransformez votre assistant IA en un hub de marketing numérique qui crée, organise et analyse des liens et des codes QR à la demande.
Documentation
Le serveur MCP Bitly
Bienvenue dans le guide du serveur MCP Bitly.
Si vous êtes ici, vous savez probablement déjà ce qu'est un serveur MCP, mais si vous avez besoin d'une introduction, consultez notre page Qu'est-ce que MCP ?.
Le serveur MCP Bitly donne accès à toutes les fonctionnalités que vous attendez d'une interface Bitly -- comme l'API Bitly, le site web bitly.com, l'extension Chrome Bitly, l'application mobile Bitly -- mais cette fois pour l'agent IA de votre choix.
Vous voulez utiliser Bitly avec ChatGPT ? Serveur MCP Bitly ou GPT personnalisé Bitly. Vous voulez utiliser Bitly avec Claude ? Serveur MCP Bitly. Vous voulez utiliser Bitly avec Cursor, VSCode ou Windsurf ? Serveur MCP Bitly.
Configuration rapide
Le serveur MCP Bitly est hébergé à l'adresse https://api-ssl.bitly.com/v4/mcp.
Options d'authentification :
- OAuth 2.1 (Recommandé) - Pour les clients qui prennent en charge OAuth, cela fournit une authentification sécurisée par jeton avec enregistrement automatique du client
- Jeton API - Pour les configurations plus simples ou les clients sans prise en charge OAuth, utilisez votre jeton API Bitly depuis https://bitly.com/settings/api
Voici la grille des configurations avec des liens vers des instructions détaillées -- s'il en manque une que vous utilisez, vous trouverez des conseils sur la page Détails de configuration. Nous ajouterons des guides de configuration supplémentaires au fil du temps.
| Agent IA | Instructions de configuration | Remarques |
|---|---|---|
| ChatGPT | Configurer ChatGPT | OAuth avec enregistrement dynamique du client |
| Interface Web Claude (claude.ai) | Configurer Claude Web | OAuth avec enregistrement dynamique du client |
| Claude Desktop | Configurer Claude Desktop | Prend en charge OAuth et le jeton API |
| Claude Code | Configurer Claude Code | Transport HTTP – prend en charge OAuth et le jeton API |
| Cursor | Configurer Cursor | Transport HTTP – prend en charge OAuth et le jeton API |
| VS Code | Configurer VS Code | Transport HTTP – prend en charge OAuth et le jeton API |
| Windsurf | Configurer Windsurf | Utilise un proxy npx pour la connexion locale |
| La plupart des autres agents compatibles HTTP | Consultez notre section Configuration | La configuration HTTP générique fonctionne pour la plupart |
Configurations
Claude Code
Ajoutez à ~/.claude/mcp.json :
Pour OAuth (recommandé) :
{
"mcpServers": {
"Bitly": {
"type": "http",
"url": "https://api-ssl.bitly.com/v4/mcp"
}
}
}
Pour le jeton API :
{
"mcpServers": {
"Bitly": {
"type": "http",
"url": "https://api-ssl.bitly.com/v4/mcp",
"headers": {
"Authorization": "Bearer YOUR_BITLY_AUTH_TOKEN"
}
}
}
}
Redémarrez Claude Code après avoir ajouté la configuration.
Cursor
Ajoutez à ~/.cursor/mcp.json :
Redémarrez Cursor après avoir ajouté la configuration.
Claude Desktop
Ajoutez à votre fichier de configuration 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"
}
}
}
Pour le jeton API (en utilisant le proxy npx) :
Prérequis : Nécessite Node.js 20 LTS ou supérieur avec la prise en charge de
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"
}
}
}
}
Redémarrez Claude Desktop après avoir ajouté la configuration.
VS Code
Ajoutez à ~/.vscode/mcp.json dans votre espace de travail :
{
"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
Ajoutez à ~/.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:
"Quels outils Bitly sont disponibles ?"
"Veuillez raccourcir cette URL : https://example.com/very-long-url"
À partir de là, vous devriez être prêt !
---