flickr-mcp-server
An MCP server that integrates AI assistants with the Flickr API, enabling management of photos, albums, groups, and contacts via natural language commands.
README
Flickr MCP Server
An MCP (Model Context Protocol) server that connects AI assistants to the Flickr API. Manage albums, tag photos, and organize your Flickr library through natural language.
Features
27 tools covering photo, album, group, and social management:
Photo Tools
| Tool | Description | Read/Write |
|---|---|---|
flickr_search_photos |
Search photos by keyword, tags, date range | Read |
flickr_get_photo_info |
Get detailed photo metadata | Read |
flickr_get_photo_sizes |
Get image URLs for all available sizes | Read |
flickr_get_exif |
Get camera & EXIF metadata for a photo | Read |
flickr_get_explore |
Get photos from Flickr Explore (interestingness) | Read |
flickr_list_my_photos |
List your own photos (including private) | Read |
flickr_get_not_in_set |
List photos not in any album | Read |
flickr_set_photo_tags |
Replace all tags on a photo | Write |
flickr_add_photo_tags |
Append tags to a photo | Write |
flickr_set_photo_meta |
Update photo title and description | Write |
flickr_set_photo_license |
Set photo license (All Rights Reserved, CC, etc.) | Write |
flickr_set_photo_perms |
Set photo visibility and permissions | Write |
flickr_add_favorite |
Add a photo to your favorites (like) | Write |
flickr_remove_favorite |
Remove a photo from your favorites (unlike) | Write |
flickr_add_comment |
Post a comment on a photo | Write |
Album Tools
| Tool | Description | Read/Write |
|---|---|---|
flickr_list_albums |
List all albums | Read |
flickr_get_album_photos |
List photos in an album | Read |
flickr_create_album |
Create a new album | Write |
flickr_add_photo_to_album |
Add a photo to an album | Write |
flickr_remove_photo_from_album |
Remove a photo from an album | Write |
flickr_edit_album_meta |
Update album title and description | Write |
Group Tools
| Tool | Description | Read/Write |
|---|---|---|
flickr_list_my_groups |
List all groups you've joined | Read |
flickr_search_groups |
Search for groups by keyword | Read |
flickr_add_photo_to_group |
Submit a photo to a group pool | Write |
flickr_leave_group |
Leave a group | Delete |
Contact Tools
| Tool | Description | Read/Write |
|---|---|---|
flickr_follow_user |
Follow a user (add as contact) | Write |
flickr_unfollow_user |
Unfollow a user (remove contact) | Write |
All list/search tools return thumbnail and medium image URLs for AI-powered visual analysis.
Prerequisites
- Node.js >= 18
- A Flickr account
- Flickr API key (apply here)
Setup
1. Clone and install
git clone https://github.com/chochinlu/flickr-mcp-server.git
cd flickr-mcp-server
npm install
2. Get your Flickr API key
- Go to Flickr App Garden
- Create a new app to get your API Key and API Secret
- Create a
.envfile:
cp .env.example .env
- Fill in
FLICKR_API_KEYandFLICKR_API_SECRETin.env
3. Authenticate with OAuth
Run the interactive setup script:
npm run oauth-setup
This will:
- Generate an authorization URL
- Open Flickr in your browser to grant access
- Ask you to enter the verification code
- Save the OAuth tokens to
.env
Flickr OAuth tokens never expire -- you only need to do this once.
4. Build
npm run build
5. Configure your MCP client
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"flickr": {
"command": "node",
"args": ["/absolute/path/to/flickr-mcp-server/dist/index.js"]
}
}
}
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"flickr": {
"command": "node",
"args": ["/absolute/path/to/flickr-mcp-server/dist/index.js"]
}
}
}
Usage Examples
Once connected, you can ask your AI assistant things like:
- "List all my Flickr albums"
- "Show me photos not in any album"
- "Search my photos tagged with
travel" - "Add tags
tokyo,japan,2024to photo 12345678" - "Create a new album called 'Tokyo Trip' with photo 12345678 as the cover"
- "Move these photos into the Tokyo Trip album"
- "List all groups I've joined"
- "Submit this photo to the Street Photography group"
- "Leave all inactive groups with less than 100 photos"
- "Like this photo and follow the photographer"
- "Add this photo to my favorites"
Project Structure
src/
index.ts # MCP server entry point (stdio transport)
config.ts # Environment variable validation (Zod)
flickr-client.ts # Flickr API client with rate limiting
tools/
photos.ts # Photo management tools (incl. favorites)
albums.ts # Album management tools
groups.ts # Group management tools
contacts.ts # Contact/follow tools
auth/
oauth-setup.ts # One-time OAuth setup CLI
scripts/
batch-set-license.ts # Batch update all photos to a specified license
API Rate Limits
- Flickr allows 3,600 requests/hour (~1 req/sec)
- The client enforces a 1-second minimum interval between requests
- List endpoints return up to 500 items per page with pagination support
License
MIT
Flickr MCP Server (正體中文)
一個 MCP (Model Context Protocol) 伺服器,讓 AI 助手能透過 Flickr API 管理你的相簿、標記照片、整理照片庫。
功能
26 個工具,涵蓋照片、相簿、群組與社交管理:
照片工具
| 工具 | 功能 | 讀/寫 |
|---|---|---|
flickr_search_photos |
依關鍵字、標籤、日期範圍搜尋照片 | 讀 |
flickr_get_photo_info |
取得照片詳細資訊 | 讀 |
flickr_get_photo_sizes |
取得照片各尺寸的圖片 URL | 讀 |
flickr_get_exif |
取得照片的相機與 EXIF 資訊 | 讀 |
flickr_get_explore |
取得 Flickr Explore 精選照片 | 讀 |
flickr_list_my_photos |
列出自己的照片(含私人照片) | 讀 |
flickr_get_not_in_set |
列出未歸入任何相簿的照片 | 讀 |
flickr_set_photo_tags |
設定照片標籤(覆蓋原有標籤) | 寫 |
flickr_add_photo_tags |
新增標籤(不覆蓋) | 寫 |
flickr_set_photo_meta |
更新照片標題與描述 | 寫 |
flickr_set_photo_license |
設定照片授權條款(All Rights Reserved、CC 等) | 寫 |
flickr_set_photo_perms |
設定照片可見性與權限(公開/私人) | 寫 |
flickr_add_favorite |
將照片加入最愛(按讚) | 寫 |
flickr_remove_favorite |
從最愛移除照片(取消按讚) | 寫 |
flickr_add_comment |
在照片下發布留言 | 寫 |
相簿工具
| 工具 | 功能 | 讀/寫 |
|---|---|---|
flickr_list_albums |
列出所有相簿 | 讀 |
flickr_get_album_photos |
列出相簿內照片 | 讀 |
flickr_create_album |
建立新相簿 | 寫 |
flickr_add_photo_to_album |
將照片加入相簿 | 寫 |
flickr_remove_photo_from_album |
從相簿移除照片 | 寫 |
flickr_edit_album_meta |
修改相簿標題與描述 | 寫 |
群組工具
| 工具 | 功能 | 讀/寫 |
|---|---|---|
flickr_list_my_groups |
列出已加入的所有群組 | 讀 |
flickr_search_groups |
依關鍵字搜尋群組 | 讀 |
flickr_add_photo_to_group |
將照片投稿到群組 | 寫 |
flickr_leave_group |
退出群組 | 刪除 |
聯絡人工具
| 工具 | 功能 | 讀/寫 |
|---|---|---|
flickr_follow_user |
追蹤使用者(加入聯絡人) | 寫 |
flickr_unfollow_user |
取消追蹤(移除聯絡人) | 寫 |
所有列表/搜尋工具都會回傳縮圖與中等尺寸圖片 URL,方便 AI 進行視覺分析。
前置需求
- Node.js >= 18
- Flickr 帳號
- Flickr API 金鑰(在此申請)
安裝設定
1. 下載並安裝
git clone https://github.com/chochinlu/flickr-mcp-server.git
cd flickr-mcp-server
npm install
2. 取得 Flickr API 金鑰
- 前往 Flickr App Garden 建立應用程式
- 取得 API Key 與 API Secret
- 建立
.env檔案:
cp .env.example .env
- 在
.env中填入FLICKR_API_KEY和FLICKR_API_SECRET
3. OAuth 認證
執行互動式設定腳本:
npm run oauth-setup
腳本會引導你:
- 產生授權 URL
- 在瀏覽器中開啟 Flickr 進行授權
- 輸入頁面上顯示的驗證碼
- 自動將 OAuth token 存入
.env
Flickr 的 OAuth token 永不過期,只需設定一次。
4. 編譯
npm run build
5. 設定 MCP 用戶端
Claude Code
在專案的 .mcp.json 中加入:
{
"mcpServers": {
"flickr": {
"command": "node",
"args": ["/absolute/path/to/flickr-mcp-server/dist/index.js"]
}
}
}
Claude Desktop
在 claude_desktop_config.json 中加入:
{
"mcpServers": {
"flickr": {
"command": "node",
"args": ["/absolute/path/to/flickr-mcp-server/dist/index.js"]
}
}
}
使用範例
連線後,你可以用自然語言請 AI 助手幫你:
- 「列出我所有的 Flickr 相簿」
- 「找出沒有歸入任何相簿的照片」
- 「搜尋標記了
travel的照片」 - 「幫照片 12345678 加上
tokyo、japan、2024標籤」 - 「建立一個叫『東京之旅』的新相簿,用照片 12345678 當封面」
- 「把這些照片移到東京之旅相簿」
- 「列出我加入的所有群組」
- 「把這張照片投稿到街拍群組」
- 「退出所有照片數不到 100 的不活躍群組」
- 「幫我對這張照片按讚,然後追蹤這個攝影師」
- 「把這張照片加入我的最愛」
API 限制
- Flickr 允許每小時 3,600 次請求(約每秒 1 次)
- Client 內建 1 秒最小間隔的速率限制
- 列表類 API 每頁最多 500 筆,支援分頁
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。