纽约时报文章搜索 MCP 服务器
这是一个基于 TypeScript 的 MCP 服务器,允许根据关键字搜索过去 30 天的《纽约时报》文章。它通过以下方式演示了 MCP 的核心概念:
- 文章搜索工具
- 与纽约时报 API 集成
特征
工具
search_articles
- 根据关键字搜索过去 30 天的《纽约时报》文章- 将
keyword
作为必需参数 - 返回包含标题、摘要、URL、发布日期和作者的文章列表
- 将
发展
安装依赖项:
构建服务器:
对于使用自动重建的开发:
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
安装
通过 Smithery 安装
要通过Smithery自动安装 NYTimes Article Search for Claude Desktop:
手动安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
环境变量
在项目根目录中创建一个.env
文件并添加您的纽约时报 API 密钥:
运行服务器
构建项目后,您可以使用以下命令运行服务器:
服务器将启动并通过 stdio 监听 MCP 请求。
执照
该项目已获得 MIT 许可。
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
这是一个基于 TypeScript 的 MCP 服务器,允许根据关键字搜索过去 30 天的纽约时报文章。
Related MCP Servers
- -securityAlicense-qualityThis MCP server performs multi-topic searches in business, news, finance, and politics using the Tavily API, providing high-quality sources and intelligent summaries.Last updated -11PythonMIT License
- AsecurityAlicenseAqualityA TypeScript-based MCP server utilizing the UseScraper API to provide web scraping capabilities, allowing users to extract content from webpages in various formats.Last updated -11JavaScriptMIT License
- AsecurityAlicenseAqualityA TypeScript-based MCP server that interacts with Contentful's Delivery API, enabling users to create, query, and summarize text notes through natural language.Last updated -266TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that enables searching various content types (news, blogs, shopping, images, etc.) through Naver's search API.Last updated -193720TypeScriptMIT License