Bitly MCP Server
ทางการเปลี่ยนผู้ช่วย AI ของคุณให้เป็นศูนย์กลางการตลาดดิจิทัลที่สร้าง จัดระเบียบ และวิเคราะห์ลิงก์และคิวอาร์โค้ดตามความต้องการ
เอกสาร
Bitly MCP Server
ยินดีต้อนรับสู่คู่มือ Bitly MCP Server
หากคุณมาถึงที่นี่ คุณคงทราบแล้วว่า MCP Server คืออะไร แต่หากต้องการข้อมูลพื้นฐาน โปรดดูหน้า What is MCP? ของเรา
Bitly MCP Server มอบการเข้าถึงฟังก์ชันการทำงานทั้งหมดที่คุณคาดหวังจากอินเทอร์เฟซของ Bitly -- เช่น Bitly API, เว็บไซต์ bitly.com, Bitly Chrome Extension, แอป Bitly Mobile -- แต่ครั้งนี้สำหรับ AI agent ที่คุณเลือก
ต้องการใช้ Bitly กับ ChatGPT? Bitly MCP Server หรือ Bitly Custom GPT ต้องการใช้ Bitly กับ Claude? Bitly MCP Server ต้องการใช้ Bitly กับ Cursor, VSCode หรือ Windsurf? Bitly MCP Server
การตั้งค่าอย่างรวดเร็ว
Bitly MCP Server โฮสต์อยู่ที่ https://api-ssl.bitly.com/v4/mcp.
ตัวเลือกการยืนยันตัวตน:
- OAuth 2.1 (แนะนำ) - สำหรับไคลเอนต์ที่รองรับ OAuth วิธีนี้ให้การยืนยันตัวตนแบบใช้โทเค็นที่ปลอดภัย พร้อมการลงทะเบียนไคลเอนต์อัตโนมัติ
- API Token - สำหรับการตั้งค่าที่ง่ายกว่า หรือไคลเอนต์ที่ไม่รองรับ OAuth ให้ใช้ Bitly API token ของคุณจาก https://bitly.com/settings/api
ด้านล่างคือตารางการกำหนดค่าพร้อมลิงก์ไปยังคำแนะนำโดยละเอียด -- หากเราขาดตัวใดที่คุณใช้อยู่ คุณจะพบคำแนะนำในหน้า Configuration Details เราจะเพิ่มคู่มือการกำหนดค่าเพิ่มเติมเมื่อเวลาผ่านไป
| AI Agent | คำแนะนำการกำหนดค่า | หมายเหตุ |
|---|---|---|
| ChatGPT | กำหนดค่า ChatGPT | OAuth พร้อม Dynamic Client Registration |
| Claude Web Interface (claude.ai) | กำหนดค่า Claude Web | OAuth พร้อม Dynamic Client Registration |
| Claude Desktop | กำหนดค่า Claude Desktop | รองรับทั้ง OAuth และ API token |
| Claude Code | กำหนดค่า Claude Code | HTTP transport – รองรับทั้ง OAuth และ API token |
| Cursor | กำหนดค่า Cursor | HTTP transport – รองรับทั้ง OAuth และ API token |
| VS Code | กำหนดค่า VS Code | HTTP transport – รองรับทั้ง OAuth และ API token |
| Windsurf | กำหนดค่า Windsurf | ใช้ npx proxy สำหรับการเชื่อมต่อภายในเครื่อง |
| เอเจนต์ที่รองรับ HTTP ส่วนใหญ่ | ตรวจสอบส่วน Configuration ของเรา | การตั้งค่า HTTP ทั่วไปใช้ได้กับส่วนใหญ่ |
การกำหนดค่า
Claude Code
เพิ่มลงใน ~/.claude/mcp.json:
สำหรับ OAuth (แนะนำ):
{
"mcpServers": {
"Bitly": {
"type": "http",
"url": "https://api-ssl.bitly.com/v4/mcp"
}
}
}
สำหรับ API Token:
{
"mcpServers": {
"Bitly": {
"type": "http",
"url": "https://api-ssl.bitly.com/v4/mcp",
"headers": {
"Authorization": "Bearer YOUR_BITLY_AUTH_TOKEN"
}
}
}
}
รีสตาร์ท Claude Code หลังจากเพิ่มการกำหนดค่า
Cursor
เพิ่มลงใน ~/.cursor/mcp.json:
รีสตาร์ท Cursor หลังจากเพิ่มการกำหนดค่า
Claude Desktop
เพิ่มลงในไฟล์การกำหนดค่า 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"
}
}
}
สำหรับ API Token (ใช้ npx proxy):
ข้อกำหนดเบื้องต้น: ต้องใช้ Node.js 20 LTS หรือสูงกว่า พร้อมรองรับ
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"
}
}
}
}
รีสตาร์ท Claude Desktop หลังจากเพิ่มการกำหนดค่า
VS Code
เพิ่มลงใน ~/.vscode/mcp.json ในพื้นที่ทำงานของคุณ:
{
"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
เพิ่มลงใน ~/.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:
"มีเครื่องมือ Bitly อะไรบ้างที่พร้อมใช้งาน?"
"โปรดย่อ URL นี้: https://example.com/very-long-url"
จากนั้นคุณก็พร้อมใช้งานแล้ว!
---