
Image Resolver
io.github.ahmaddioxide由 GitHub 账号 ahmaddioxide 发布v0.2.0更新于 Oct 24, 2026
MCP server for context-aware royalty-free image search from Pexels and Unsplash
概览
一个本地 MCP 服务器,让助手从 Pexels 和 Unsplash 搜索免版税图片,并返回带署名信息的结构化结果。
- 可以做什么
- 按自然语言查询搜索免版税图片,支持数量、页码和方向参数,并将 Pexels 与 Unsplash 的结果合并为含链接、尺寸、摄影师和标签的结构化列表。把自由文本转换为简洁的图片搜索词。为查询返回单张最佳图片,或并行执行多个搜索。为指定摄影师和来源生成符合平台要求的署名文本。
- 适用场景
- 适合让助手为博客头图、应用主视觉、样机或设计草稿寻找图库或免版税照片,并直接得到可用的署名文字。若你已有或愿意申请免费的 Pexels 或 Unsplash API 密钥,最为合适。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js 18 或更高版本。至少需要一个 API 密钥:PEXELS_API_KEY 或 UNSPLASH_ACCESS_KEY,以环境变量方式提供。需要能访问 Pexels 和 Unsplash 的 API。
安装
在 SourceWeft 中
- 打开 控制台中的 Image Resolver,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP Image Resolver Server
An MCP (Model Context Protocol) server that provides royalty-free image search for AI hosts like Cursor, Claude Desktop, VS Code, Windsurf, and more. Ask your AI assistant to find images by natural language—it uses the search_images tool and returns structured results from Pexels and Unsplash.
Features
- search_images — Search for royalty-free images (supports limit, page, orientation)
- extract_image_query — Transform free-form text into an image search query
- get_best_image — Return a single best image for a query
- search_images_batch — Run multiple searches in parallel
- resolve_image_attribution — Generate provider-compliant attribution text
- Pexels & Unsplash — Multi-provider support (free tier for both)
- Unified response — Structured results with url, source, dimensions, photographer, tags
- Works everywhere — Any MCP client that supports stdio servers
Requirements
- Node.js 18+
- At least one API key: Pexels (pexels.com/api) and/or Unsplash (unsplash.com/oauth/applications)
Quick Start (No Installation Required)
No cloning or building needed. Just add this config to your MCP client and it runs via npx automatically:
At least one API key is required. Both are free — get them here:
- Pexels: pexels.com/api
- Unsplash: unsplash.com/oauth/applications
Architecture (High-Level)
Flow: MCP client → stdio → index.ts (registers tools) → search-images.ts → Pexels and Unsplash providers (when keys are set). Results are merged (Pexels first, then Unsplash) and normalized to the unified ImageResult schema.
Client Setup
Cursor
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
Restart Cursor after config changes.
Claude Desktop
Add to your Claude config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Via Settings: Developer → Edit Config
Restart Claude Desktop completely after saving.
VS Code
Add to .vscode/mcp.json (workspace) or your user profile mcp.json:
Note: VS Code uses
servers(notmcpServers) and requires"type": "stdio".
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Refresh the MCP config after changes.
Other MCP Clients
Any client that supports stdio MCP servers (Amp, Continue.dev, Amazon Q, etc.) can use this server:
- Command:
npx - Args:
["-y", "@ahmaddioxide/mcp-image-resolver"] - Env:
{ "PEXELS_API_KEY": "your-key", "UNSPLASH_ACCESS_KEY": "your-key" }(at least one required)
Usage
Once configured, ask your AI assistant to find images in natural language. It will call the search_images tool automatically.
Example prompts:
- "Find royalty-free images of a sunset mosque"
- "Search for zen yoga images suitable for a wellness app"
- "Get some minimalist office workspace photos"
- "Find images for a cooking blog header"
The tool returns image URLs and metadata. Use the links to view or download images.
Tool Schema
Response: JSON with results array of { url, source, width, height, photographer, tags }. Each result includes source ("Pexels" or "Unsplash") for attribution.
Note: When both providers are configured, results are merged with Pexels first, then Unsplash. Use limit: 20 or higher to see results from both providers in a single search.
Testing
Example prompts to verify the tools:
- "Search for mountain landscape with limit 20 and show me which results came from Pexels vs Unsplash."
- "Use extract_image_query on: I need a hero image for a meditation app with mountains."
- "Use search_images_batch for 'sunset mosque', 'pakistani flag', and 'zen yoga'."
- "Get a single best image for coffee shop and generate attribution for it."
Development
To contribute or run locally, clone the repo and build from source:
Or run in development mode without building, using tsx:
Attribution
Images are sourced from Pexels and Unsplash. Per their API terms:
- Provide prominent links to Pexels and Unsplash
- Credit photographers: "Photo by [Name] on Pexels" / "Photo by [Name] on Unsplash"
- Response metadata includes
photographerandsource; useresolve_image_attributionfor compliant text
Contributing
Contributions are welcome. Please read CONTRIBUTING.md for guidelines and CODE_OF_CONDUCT.md for community standards. See SECURITY.md for vulnerability reporting.
License
MIT — see LICENSE.
来源:README.md,提交 e3ddd9f
工具
0版本历史
1- v0.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分