JS

joelio/stocky

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

28 stars 14 forks 质量 80 趋势 25MIT

一个用于搜索和下载图库照片的MCP服务器。

概览

Stocky 是一个 MCP 服务器,允许 AI 助手搜索、检查并下载来自 和 的免版税库存照片。 如果指向stocky_mcp.py,说明该文件还在并启动服务器。升级时没有任何故障。—— 那个文件已经消失,setup.py 也没了。从源代码检查开始,安装时用 或 代替。关于两分钟版本,请参见从 1.x 升级,或所有内容的 CHANGELOG 。标题是:pycurl 消失了(不再有 C 构建错误),搜索实际上并发运行,失败的提供者现在报告原因而非返回任何内容,Python 3.10+ 是必需的。

概述(AI 翻译)

Stocky 是一个让 AI 出现的 MCP 服务器 助理搜索、检查并下载免版税库存照片,来源 Pexels 和 Unsplash。

🆕 版本2.0 — 已经在用Stocky了吗?请阅读

你的MCP客户端配置依然正常。 如果它指向stocky_mcp.py, 那个文件还在,服务器依然启动。没有任何故障 升级。

但pip install -r requirements.txt会失败——该文件已消失,且 setup.py 也是如此。从源代码检查中,使用 uv sync 或安装 pip install -e . 代替。参见从 1.x 升级 两分钟版本,或者所有内容的CHANGELOG。

标题变了:pycurl 消失了(所以不再有 C 构建错误), 搜索实际上是同时进行的,失败的服务提供者现在会报告原因 而不是返回任何东西,而是 Python 3.10+ 是必需的。

✨ 特色

  • 🔍 多提供者搜索 — 同时查询Pexel和Unsplash
  • 📊 丰富的元数据 — 尺寸、摄影师、标签及每种图片尺寸
  • ⚖️ 许可意识 — 生成每个提供者所需的归属信息,且 报告Unsplash下载内容符合其API指南的要求

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Stocky is an MCP server that lets an AI assistant search, inspect and download royalty-free stock photography from Pexels and Unsplash.

🆕 Version 2.0 — already using Stocky? Read this

Your MCP client config keeps working. If it points at stocky_mcp.py, that file is still there and still starts the server. Nothing breaks on upgrade.

But pip install -r requirements.txt will fail — that file is gone, and so is setup.py. From a source checkout, install with uv sync or pip install -e . instead. See Upgrading from 1.x for the two-minute version, or the CHANGELOG for everything.

The headline changes: pycurl is gone (so no more C build errors), searches actually run concurrently, failed providers now report why instead of returning nothing, and Python 3.10+ is required.

✨ Features

  • 🔍 Multi-provider search — queries Pexels and Unsplash concurrently
  • 📊 Rich metadata — dimensions, photographer, tags and every image size
  • ⚖️ Licence-aware — generates the attribution each provider requires, and reports Unsplash downloads as their API guidelines demand
  • ⏱️ Search caching — a short TTL cache keeps repeat queries off your quota
  • 🛡️ Honest errors — a failing provider is reported, not silently returned as “no results”
  • 🎯 Filters — orientation, colour and sort, validated per provider

Beautiful stock photography at your fingertips Example image used for demonstration purposes

Stunning landscapes available through multiple providers

Photo by Simon Berger on Unsplash

🚀 Quick start

1. Get API keys

Both are free:

Provider Where Notes
Pexels 📷 pexels.com/api 200 requests/hour by default
Unsplash 🌅 unsplash.com/developers 50/hour in demo mode, 1000/hour once your app is approved

You only need one — Stocky runs with whichever providers are configured.

2. Add it to your MCP client

The recommended configuration needs no installation at all:

{
  "mcpServers": {
在 GitHub 查看完整 README

安装

uvx stocky-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "stocky": { "command": "uvx", "args": ["stocky-mcp"], "env": { "PEXELS_API_KEY": "your_pexels_key", "UNSPLASH_ACCESS_KEY": "your_unsplash_key" } } } }