MCP-EXP
Integrates with OpenAI API for sentiment analysis of news articles.
Click on "Install 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,用于实现热点新闻搜索、情感分析以及邮件发送等功能。
功能特点
热点新闻搜索:通过 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 installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HugoWw/MCP-EXP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server