MCP-EXP
Integrates with OpenAI API for sentiment analysis of news articles.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-EXPAnalyze recent news about Xiaomi SU7 and email the sentiment report"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-EXP 项目
项目简介
MCP-EXP 是一个基于 MCP (Model Context Protocol) 框架的实验项目,集成了 OpenAI API 和 Serper API,用于实现热点新闻搜索、情感分析以及邮件发送等功能。
Related MCP server: newsapi-mcp
功能特点
热点新闻搜索:通过 Serper API 搜索指定关键词的最新新闻
情感分析:利用 OpenAI API 对新闻内容进行情感分析
邮件发送:自动将分析结果发送到指定邮箱
客户端-服务器架构:基于 MCP 框架实现异步通信
快速开始
环境要求
Python 3.10 或更高版本
uv 包管理器(推荐)或 pip
安装步骤
克隆仓库
git clone https://github.com/HugoWw/MCP-EXP.git cd mcp-exp安装依赖
使用 uv(推荐):
uv sync或使用 pip:
pip install -e .配置环境变量
创建 .env 文件并添加以下配置:
# OpenAI API 配置 OPENAI_API_KEY=your_openai_api_key BASE_URL=your_api_base_url MODEL=your_model_name # Serper API 配置(用于谷歌新闻搜索) SERPER_API_KEY=your_serper_api_key # 邮件配置(用于发送结果) EMAIL_HOST=smtp.example.com EMAIL_PORT=465 EMAIL_USER=your_email@example.com EMAIL_PASSWORD=your_email_password
运行项目
python client.py
启动脚本后根据提示输入内容,比如:
分析下小米yu7的热点新闻,并发送邮件给xxx@example.com使用示例
新闻搜索与分析流程
客户端连接到服务器
调用新闻搜索工具获取热点新闻
对新闻进行情感分析
生成分析报告并保存
发送分析报告到指定邮箱
主要工具接口
项目提供了以下主要工具接口(可在 MCP 交互中使用):
search_google_news:搜索指定关键词的新闻analyze_sentiment:分析新闻的情感倾向send_email:发送邮件
生成的结果
生成的报告会存放到sentiment_reports目录下,如:该工程生成的示例报告
注意事项
根据实际项目情况修改和调整内容,(如 OpenAI API 密钥、Base URL、 SERPER_API_KEY等)为实际值。 SERPER_API_KEY可到Serper官网注册账户获取,邮箱的话可以去163去获取,模型可以去阿里的百练平台获取。
许可证
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Google search results via SERP API
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis MCP server performs multi-topic searches in business, news, finance, and politics using the Tavily API, providing high-quality sources and intelligent summaries.1MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol (MCP) server that provides real-time news intelligence using NewsAPI.ai. This server enables LLMs to search articles, track events, and analyze news through natural conversation.13 npm2MIT
- FlicenseNot gradedqualityDmaintenanceAn AI-powered news aggregator MCP server that fetches live news from multiple sources, provides AI summaries via Claude, and performs sentiment analysis and trending topic detection.-
- AlicenseNot gradedqualityCmaintenanceA persistent news intelligence MCP server that enables AI agents to fetch, store, deduplicate, embed, and semantically query news from Google News across 141 countries and 41 languages.8MIT