make-a-simple-mcp-server logo

make-a-simple-mcp-server

by JLQusername

This project aims to build a local intelligent public opinion analysis system. It automatically understands user query intentions, retrieves news, performs sentiment analysis, structures output, and sends email notifications through natural language processing and multi-tool writing.

View on GitHub

Last updated: N/A

make-a-simple-mcp-server

本项目旨在构建一个本地智能舆情分析系统,通过自然语言处理与多工具写作,实现用户查询意图的自动理解、新闻检索、情绪分析、结构化输出与邮件推送。

环境搭建

python 3.12

然后安装对应的依赖,缺少什么安装什么即可

然后要在本地增加一个.env文件,需要去阿里百炼平台申请一个key


BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
MODEL=qwq-plus
DASHSCOPE_API_KEY="你的key"

SERPER_API_KEY="618b99091160938bb51b5968aad7312428bbba76"
SMTP_SERVER=发送邮件服务器
SMTP_PORT=465
EMAIL_USER=你的邮箱
EMAIL_PASS=你的授权码

运行项目

运行项目,在项目根目录下执行python client.py

运行结果

运行client.py

c4337ae2bcbe3bbe31874c071125cde

c4337ae2bcbe3bbe31874c071125cde

5e499aad66c0f241f6cb7cd204aabe9

5e499aad66c0f241f6cb7cd204aabe9

c26006e04c550bc58806b413f7a2644

c26006e04c550bc58806b413f7a2644

df953e5433dd6b3c088da845576ced4

df953e5433dd6b3c088da845576ced4

可以看到,对应的文件也被保存了

ef9bf0a1f695c620fa849a2a5e64911

ef9bf0a1f695c620fa849a2a5e64911

1032ecffeeea0ba0bc7cc7f43fec414

1032ecffeeea0ba0bc7cc7f43fec414

cb54508c73bb535659e4b8127424c46

cb54508c73bb535659e4b8127424c46

6be28f621ee010e21532ab30e94615d

6be28f621ee010e21532ab30e94615d

输入quit就可以结束对话

66a1453198ccba8a93565cb45e02e71

66a1453198ccba8a93565cb45e02e71