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 Agent | Configuration Instructions | Notes |
|---|---|---|
| ChatGPT | Configure ChatGPT | OAuth with Dynamic Client Registration |
| Claude Web Interface (claude.ai) | Configure Claude Web | OAuth with Dynamic Client Registration |
| Claude Desktop | Configure Claude Desktop | Supports both OAuth and API token |
| Claude Code | Configure Claude Code | HTTP transport – supports both OAuth and API token |
| Cursor | Configure Cursor | HTTP transport – supports both OAuth and API token |
| VS Code | Configure VS Code | HTTP transport – supports both OAuth and API token |
| Windsurf | Configure Windsurf | Uses npx proxy for local connection |
| Most other HTTP-compatible agents | Check our Configuration section | Generic 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
npxsupport.
{
"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:
- Navigate to your Claude workspace settings
- Go to the MCP servers configuration section
- Add the Bitly MCP Server:
- Server URL:
https://api-ssl.bitly.com/v4/mcp - Authentication: OAuth
- Server URL:
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:
- In ChatGPT, go to Settings > Apps & Connectors > Advanced Settings
- Toggle Developer Mode on
- Go back and click Create
- Add the Bitly MCP Server:
- Server URL:
https://api-ssl.bitly.com/v4/mcp - Authentication: OAuth
- Server URL:
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:
- Redirect you to Bitly's authorization page
- Ask you to log in and authorize the connection
- Automatically register as an OAuth client using DCR
- Receive and manage access tokens transparently
API Token (Alternative)
For simpler setups or clients without OAuth support:
- Log in to your Bitly account at bitly.com
- Navigate to Settings → API
- Click Generate Access Token
- Copy the token and store it securely
- 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!