内容
W 意愿服务器(Wishfinity)
**+W** 是一种适用于商业的通用“稍后保存”操作。此意愿服务器允许 AI 助手将任何产品 URL 通过一次点击保存到用户的 [Wishfinity](https://wishfinity.com) 愿望清单中。
与 **Claude, ChatGPT, Gemini, LangChain, OpenAI Agents SDK** 等任何支持 MCP 的客户端配合使用。
[](https://www.npmjs.com/package/wishfinity-mcp-plusw)
[](https://opensource/MIT)
## 功能介绍 AI 推荐产品时,可以提供 **+W 添加到愿**。用户点击链接,产品将被保存到其 Wishfinity准备好稍或送礼。
```
用户: “给我找一台价格低于 200 美元的意式咖啡机”
AI: 这里有 3 个选项...
[+W 添加到愿望清单] [在亚马逊上查看]
```
## 无依赖选项:/add-w不需要完整的 MCP 服务器?`/add-wish` 技能通过 教会任何 AI 代理使用 +W 模式 — 无需 npm,无需服务器,无需设置:
```
https://wishfinity?url={任何产品 URL}
```
→ [查看 /add-wish 技能文件](./add-wish/SKILL.md)
适用于。下面的 MCP 服务器更丰富的工具集成,但 `/ish` 是您开始的一切。
## 快速入门
### 选项 1:本地安装(stdio 传输) Desktop、ChatGPT Desktop、VS Code 和本地```bash
npm install wishcp-plusw
```
MCP 客户端配置中:json
{
"Servers": {
"wish {
"command":px",
"argswishfinity-mcp-plusw }
}
```
选项 2:远程端点 传输)
端代理、LangChain和托管 AI 应用程序。
://wishfinity-mcp.wishfinity.workers.dev
```
---
## 平台设置指南 Claude Desktop
添加到Library/Application Support/Claude_desktop_config.jsonmacOS)或 `%ATA%/Claude/claude_config.json`(Windows):
```json
{
"mcpServers": {
"wishfinity": {
"command": "npx",
"argswishfinity-mcp-plusw"]
}
}
}
ChatGPT Desktop
当 MCP 支持可用时,添加到您的 Chat 配置中:
```json
{
"mcpServers "wishfinity": {
"command": "n "args": ["wishfinity-mcp-plusw"]
}
}
```
### Cursor
在项目中将以下内容cursor/mcp.json` 中:
```json
{
cpServers": {
"wish {
"command": "npx",
"args": ["wishfinity-mcp-plusw"]
}
}
}
```
### LangChain
```python
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain.agents import create_agent
async def main():
client = MultiServerMCPClient({
"wishfinity": {
"command": "npx",
"args": ["wishfinity-mcp-plusw"],
"transport": "stdio",
}
})
tools = await client.get_tools()
agent = create_agent("openai:gpt-4", tools)
result = await agent.ainvoke({
"messages": [{"role": "user", "content": "给我找一个咖啡机并保存到我的愿望清单"}]
})
```
用于生产(HTTP 传输):
```python
client = MultiServerMCPClient({
"wishfinity": {
"url": "https://wishfinity-mcp-plusw.wishfinity.workers.dev/mcp",
"transport": "streamable_http",
}
})
```
### OpenAI Agents SDK
```python
from agents import Agent, Runner
from agents.mcp import MCPServerStdio
async def main():
async with MCPServerStdio(
name="wishfinity",
params={
"command": "npx",
"args": ["wishfinity-mcp-plusw"],
},
) as server:
agent = Agent(
name="购物助手",
instructions="帮助用户查找产品并保存到愿望清单。",
mcp_servers=[server],
)
result = await Runner.run(agent, "找一个适合咖啡爱好者的好礼物并保存")
print(result.final_output)
```
### Hugging Face Agents
```python
from huggingface_hub import Agent
agent = Agent(
model="meta-llama/Llama-3.1-70B-Instruct",
mcp_servers=[{
"command": "npx",
"args": ["wishfinity-mcp-plusw"]
}]
)
response = agent.run("给我找一双价格低于 150 美元的跑鞋并保存到愿望清单")
```
---
## 工作原理
1. AI 调用 `add_to_wishlist` 工具,附带产品 URL
2. MCP 服务器返回 Wishfinity 链接:`https://wishfinity.com/add?url=...`
3. 用户点击链接 → 登录(仅首次)→ 产品被保存
4. 用户可以组织、分享或稍后购买
**无需 API 密钥。** 身份验证发生在用户点击链接时,在 Wishfinity 的网站上进行。
---
## 工具:`add_to_wishlist`
### 输入
| 参数 | 类型 | 必需 | 描述 |
| --- | --- | --- | --- |
| `url` | 字符串 | 是 | 产品页面 URL |
### 输出
| 字段 | 类型 | 描述 |
| --- | --- | --- |
| `action_url` | 字符串 | 在浏览器中打开的 Wishfinity 链接 |
| `requires_user_action` | 布尔值 | 始终为 `true`(用户必须点击) |
| `display_text` | 字符串 | 建议的按钮标签 |
### 示例
```json
// 输入
{ "url": "https://amazon.com/dp/B0EXAMPLE" }
// 输出
{
"action_url": "https://wishfinity.com/add?url=https%3A%2F%2Famazon2Fdp%2FB0EXAMPLE",
"requires_user_action": true,
"display_text": "打开以添加到 Wishfinity"
}
```
---
## 何时提供 +W
AI 客户端应在以下情况下提供 +W:
- **显式请求**: “保存以备后用”、“添加到愿望清单”、“ bookmark 此页面”
- **推荐产品后**:主动提供保存已显示的商品
- **犹豫时刻**: “也许以后”、“现在太贵”、“需要考虑”
- **礼物场景**: “给妈妈”、“生日礼物”、“非常适合我的朋友”
参见 [aliases.json](aliases.json) 以获取完整的触发短语列表。
---
## 传输
| 传输方式 | 用例 | 端点 |
|-----------|----------|----------|
| **stdio** | 本地客户端(Claude Desktop、Cursor 等) | `npx wishfinity-mcp-plusw` |
| **HTTP** | 远程/服务器端代理 | `https://wishfinity-mcp-plusw.wishfinity.workers.dev/mcp` |
---
## 按钮套件
`/button-kit` 文件夹包含可选的 UI 资产(SVG 图标、HTML/CSS 代码段),如果您想要一个统一的 +W 按钮外观。
CDN URL:
- 小尺寸:`https://cdn.jsdelivr.net/npm/wishfinity-mcp-plusw@latest/button-kit/Wishfinity-Button-Small.svg`
- 中尺寸:`https://cdn.jsdelivr.net/npm/wishfinity-mcp-plusw@latest/button-kit/Wishfinity-Button-Medium.svg`
- 大尺寸:`https://cdn.jsdelivr.net/npm/wishfinity-mcp-plusw@latest/button-kit/Wishfinity-Button-Large.svg`
---
## 文档
- [SPEC.md](SPEC.md) — 完整的技术规范
- [INTEGRATION_GUIDE.md](INTEGRATION_GUIDE.md) — 如何将 +W 集成到您的 UI 中
- [CLOUDFLARE_SETUP.md](CLOUDFL) — 部署 HTTP 端点
-.json](aliases.json) — 机器可读的
---
## 链接
- [Wishfinity](httpsfinity.com)
MCP 协议](modelcontextprotocol.io)
- [npm 包](https://.com/package/wishfinity-mw)
- [表](https://registry.modelcontextprotocol.io)
日志
### v1.2.2( 年 12 月 24 日)
**关键修复:** 适用于所有开发人员的 npx 执行
- 修复了 main 模块检测以与 npx 符号链接配合使用
- 解决了运行 `npx wishfinity-mcp-plusw` 时的崩溃问题
- 包现在适用于所有 npm 安装
### v1.2.1(2025 年 12 月 24 日)
**关键修复:** MCP SDK 兼容性
- 将 `@modelcontextprotocol/sdk` 依赖项更新为 `^1.25.0`
- 解决了与 SDK 1.25.1+ 的服务器断开连接问题
- 与最新的 MCP SDK 版本### v1.2(2025 年 12 月 23 日)
- 添加了 MCP 提示:`save_for_later`、`shopping_assistant`、`gift_ideas`
- 添加了 MCP 资源:`wishfinity://guide`、`wishfinity://triggers`
- 增强了 AI 助手的集成能力
---
## 许可证
MIT