这是一款借助TypeScript和Node.js开发的MCP协议服务器插件,能为Claude Desktop赋予谷歌新闻搜索能力。此插件支持多语言、多国家的新闻内容查询,还可依据主题、出版物、故事和部分进行筛选。
npm install
修改你的 claude_desktop_config.json 文件,添加以下内容(根据实际路径调整):
"google-news": {
"command": "D:\\Program\\nvm\\node.exe",
"args": [
"D:\\github_repository\\path_to\\dist\\index.js"
],
"env": {
"SERP_API_KEY": "your-api-key"
}
}
npm run build
npm start
# 使用 npm
npm i @chanmeng666/google-news-server
# 或者
npm install @chanmeng666/google-news-server
# 使用 yarn
yarn add @chanmeng666/google-news-server
# 使用 pnpm
pnpm add @chanmeng666/google-news-server
npx -y @smithery/cli install @chanmeng666/google-news-server --client claude
该插件实现MCP协议,暴露了一个谷歌新闻搜索工具,支持以下参数:
q:搜索查询字符串gl:国家代码(例如 'us', 'uk')hl:语言代码(例如 'en', 'es')topic_token:特定新闻主题令牌publication_token:特定发布商令牌story_token:故事全面覆盖令牌section_token:特定部分令牌# 在开发模式下运行,带有热重载
npm run dev
# 运行代码检查
npm run lint
# 运行测试
npm test
claude_desktop_config.json 中的API密钥配置是否正确。该插件使用TypeScript和Node.js开发,实现了MCP协议,为Claude Desktop提供谷歌新闻搜索功能。它依赖于SERP API进行新闻搜索,通过配置文件 claude_desktop_config.json 来设置API密钥等环境变量。
本项目采用MIT许可证。
由Chan Meng创建和维护。