{"_id":"@agtools/mcp-tavily","_rev":"1-b88f01b2a29a6579005422f5743988e9","name":"@agtools/mcp-tavily","dist-tags":{"latest":"0.3.2"},"versions":{"0.3.1":{"name":"@agtools/mcp-tavily","version":"0.3.1","keywords":["mcp","tavily","search","ai","model-context-protocol"],"author":{"name":"kshern"},"license":"MIT","_id":"@agtools/mcp-tavily@0.3.1","maintainers":[{"name":"shern","email":"kshern@yeah.net"}],"homepage":"https://github.com/kshern/mcp-tavily#readme","bugs":{"url":"https://github.com/kshern/mcp-tavily/issues"},"dist":{"shasum":"8c5fa43c23721c630118c0aafa90e0f045bb080e","tarball":"https://registry.npmjs.org/@agtools/mcp-tavily/-/mcp-tavily-0.3.1.tgz","fileCount":7,"integrity":"sha512-QiTdQvqifN23EmZ07m42RN5XISCXjNni+UPVmPxvFp17/VeIE5sTPueISncwKJajlQTGWEgErC0k0sKR9+QC/g==","signatures":[{"sig":"MEQCIG3kYd3D8ycl1oKnAPvGVYX+LYMRSXHW34UojW5K6BEyAiBXVqjqAuYH0w5PnKoy4zEoErWoIfqNeOmD0kPXH/kaHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24579},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"ec88fcee3f6bbc5bf658f369c2659854e8343589","scripts":{"dev":"tsc --watch","test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"shern","email":"kshern@yeah.net"},"repository":{"url":"git+https://github.com/kshern/mcp-tavily.git","type":"git"},"_npmVersion":"10.2.4","description":"A Model Context Protocol (MCP) server implementation for Tavily API, providing advanced search and content extraction capabilities","directories":{},"_nodeVersion":"20.11.1","dependencies":{"zod":"^3.24.2","typescript":"^5.7.3","@types/node":"^22.13.4","@tavily/core":"latest","@modelcontextprotocol/sdk":"^1.5.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-tavily_0.3.1_1740373073993_0.33777018666936165","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@agtools/mcp-tavily","version":"0.3.2","type":"module","main":"dist/index.js","types":"dist/index.d.ts","bin":{"mcp-tavily":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["mcp","tavily","search","ai","model-context-protocol"],"author":{"name":"kshern"},"license":"MIT","description":"A Model Context Protocol (MCP) server implementation for Tavily API, providing advanced search and content extraction capabilities","repository":{"type":"git","url":"git+https://github.com/kshern/mcp-tavily.git"},"bugs":{"url":"https://github.com/kshern/mcp-tavily/issues"},"homepage":"https://github.com/kshern/mcp-tavily#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.5.0","@tavily/core":"^0.3.1","@types/node":"^22.13.4","typescript":"^5.7.3","zod":"^3.24.2"},"_id":"@agtools/mcp-tavily@0.3.2","gitHead":"30aff39f341f81669daca1bb04edb6910067e007","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-xjF0JtI+noPfnV/yGbhfv3/POAF4EA7Urmdcr6WPxD2ggVbn8tNDjcYCYWpsIzQCHV6V+Fp0lg20+B4ydNmcaw==","shasum":"2221595582833c5f1c01fae0ec5a24ee212c1b65","tarball":"https://registry.npmjs.org/@agtools/mcp-tavily/-/mcp-tavily-0.3.2.tgz","fileCount":6,"unpackedSize":19977,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDT+aqImYEWgY98zgWi7NRqBtz761woZfoBvozhlj+IZQIgXUPI2fCRByKfQpOtAheN4yVHjurKVsw7Sa83hYdPb4Y="}]},"_npmUser":{"name":"shern","email":"kshern@yeah.net"},"directories":{},"maintainers":[{"name":"shern","email":"kshern@yeah.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-tavily_0.3.2_1740397664407_0.5706983572859861"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-24T04:57:53.927Z","modified":"2025-02-24T11:47:44.827Z","0.3.1":"2025-02-24T04:57:54.161Z","0.3.2":"2025-02-24T11:47:44.598Z"},"bugs":{"url":"https://github.com/kshern/mcp-tavily/issues"},"author":{"name":"kshern"},"license":"MIT","homepage":"https://github.com/kshern/mcp-tavily#readme","keywords":["mcp","tavily","search","ai","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/kshern/mcp-tavily.git"},"description":"A Model Context Protocol (MCP) server implementation for Tavily API, providing advanced search and content extraction capabilities","maintainers":[{"name":"shern","email":"kshern@yeah.net"}],"readme":"# MCP Tavily\n\n基于Tavily API的模型上下文协议（MCP）服务器实现，提供高级搜索和内容提取功能。\n\n## 功能特点\n\n- **多样化搜索工具**:\n  - `search`: 基础搜索功能，支持自定义选项\n  - `searchContext`: 上下文感知搜索，提供更好的相关性\n  - `searchQNA`: 问答式搜索\n- **内容提取**: 支持从URL提取内容，可配置提取选项\n- **丰富的配置选项**: 支持搜索深度、过滤和内容包含等多种配置\n\n### MCP配置使用\n\n在你的MCP配置中添加Tavily服务器：\n\n```json\n{\n  \"mcpServers\": {\n    \"tavily\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mcptools/mcp-tavily\"],\n      \"env\": {\n        \"TAVILY_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\n> 注意：请确保将 `your-api-key` 替换为你的实际 Tavily API 密钥。你也可以在运行服务器之前将其设置为环境变量 `TAVILY_API_KEY`。\n\n## API参考\n\n### 搜索工具\n\n服务器提供三种可通过MCP调用的搜索工具：\n\n#### 1. 基础搜索\n```typescript\n// 工具名称: search\n{\n  query: \"人工智能\",\n  options: {\n    searchDepth: \"advanced\",\n    topic: \"news\",\n    maxResults: 10\n  }\n}\n```\n\n#### 2. 上下文搜索\n```typescript\n// 工具名称: searchContext\n{\n  query: \"AI最新发展\",\n  options: {\n    topic: \"news\",\n    timeRange: \"week\"\n  }\n}\n```\n\n#### 3. 问答搜索\n```typescript\n// 工具名称: searchQNA\n{\n  query: \"什么是量子计算？\",\n  options: {\n    includeAnswer: true,\n    maxResults: 5\n  }\n}\n```\n\n### 内容提取工具\n\n```typescript\n// 工具名称: extract\n{\n  urls: [\"https://example.com/article1\", \"https://example.com/article2\"],\n  options: {\n    extractDepth: \"advanced\",\n    includeImages: true\n  }\n}\n```\n\n### 搜索选项\n\n所有搜索工具共享以下选项：\n\n```typescript\ninterface SearchOptions {\n  searchDepth?: \"basic\" | \"advanced\";    // 搜索深度级别\n  topic?: \"general\" | \"news\" | \"finance\"; // 搜索主题类别\n  days?: number;                         // 搜索天数范围\n  maxResults?: number;                   // 最大结果数量\n  includeImages?: boolean;               // 是否包含图片\n  includeImageDescriptions?: boolean;    // 是否包含图片描述\n  includeAnswer?: boolean;               // 是否包含答案\n  includeRawContent?: boolean;           // 是否包含原始内容\n  includeDomains?: string[];            // 包含的域名列表\n  excludeDomains?: string[];            // 排除的域名列表\n  maxTokens?: number;                    // 最大token数量\n  timeRange?: \"year\" | \"month\" | \"week\" | \"day\" | \"y\" | \"m\" | \"w\" | \"d\"; // 时间范围\n}\n```\n\n### 提取选项\n\n```typescript\ninterface ExtractOptions {\n  extractDepth?: \"basic\" | \"advanced\";   // 提取深度级别\n  includeImages?: boolean;               // 是否包含图片\n}\n```\n\n## 响应格式\n\n所有工具返回的响应格式如下：\n\n```typescript\n{\n  content: Array<{\n    type: \"text\",\n    text: string\n  }>\n}\n```\n\n搜索结果包含：\n- 标题\n- 内容\n- URL\n\n提取内容包含：\n- URL\n- 原始内容\n- 失败URL列表（如果有）\n\n## 错误处理\n\n所有工具都包含适当的错误处理，并会在出现问题时抛出描述性的错误消息。\n\n## 许可证\n\n本项目基于MIT许可证开源。\n\n## 支持\n\n如有任何问题：\n- Tavily API：请参考 [Tavily 文档](https://docs.tavily.com/)\n- MCP 集成：请参考 [MCP 文档](https://modelcontextprotocol.io//)\n\n## 安装\n\n### 通过 Smithery 安装\n\n通过 [Smithery](https://smithery.ai/server/@kshern/mcp-tavily) 自动安装 Tavily API Server for Claude Desktop：\n\n```bash\nnpx -y @smithery/cli install @kshern/mcp-tavily --client claude\n```\n\n### 手动安装\n```bash\nnpm install @mcptools/mcp-tavily\n```\n\n或直接使用 npx：\n\n```bash\nnpx @mcptools/mcp-tavily\n```\n\n## 开发\n\n### 环境要求\n\n- Node.js 16 或更高版本\n- npm 或 yarn\n- Tavily API 密钥 (从 [Tavily](https://tavily.com) 获取)\n\n### 设置\n\n1. 克隆仓库\n2. 安装依赖：\n```bash\nnpm install\n```\n3. 设置 Tavily API 密钥：\n```bash\nexport TAVILY_API_KEY=your_api_key\n```\n\n\n### 构建\n\n```bash\nnpm run build\n```\n\n## 使用 MCP Inspector 调试\n\n我们推荐使用 [MCP Inspector](https://github.com/modelcontextprotocol/inspector) 作为开发调试工具，它是一个强大的 MCP 服务器开发工具。\n\nInspector 提供了以下功能的用户界面：\n- 测试工具调用\n- 查看服务器响应\n- 调试工具执行\n- 监控服务器状态\n\n## 贡献\n\n欢迎提交贡献！请随时提交 Pull Request。\n\n1. Fork 仓库\n2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交更改 (`git commit -m '添加某个特性'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 开启 Pull Request\n\n## License\n\nMIT License。\n\n## 支持\n\n如有任何问题，请参考:\n- Tavily API：请参考 [Tavily 文档](https://docs.tavily.com/)\n- MCP 集成：请参考 [MCP 中文文档](https://docs.mcpcn.org//)","readmeFilename":"readme.zh-CN.md"}