glee-mcp-agentic-ai
- 终端>紫外线初始化
- 创建虚拟环境:终端>uv venv
- activate:用source.venv/bin/activate激活
- 添加库:uv add“mcp\[cli\]”-我们将使用名为“FastApi”的特定库
- 请参考此github了解更多mcp设置-https://github.com/modelcontextprotocol/python-sdk
- 文档字符串更重要,因为LLM会根据文档字符串值来理解
- 如何运行MCP:
- ```
MCP Inspector
1. ```
uv run mcp dev server/weather.py- ```
ERROR npx not found. Please ensure Node.js and npm are properly installed and added cli.py:296 to your system PATH. You may need to restart your terminal after installation.
1. 安装Node.js和npm
brew安装节点
1. 安装Homebrew,如果macbook中没有安装/没有brew:
1. ```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Password : macbook password- 将Homebrew添加到PATH中(对M1/M2/M3 Mac至关重要)
(echo;echo'eval“$(/opt/homebrew/bin/brew shellnv)”')>>/Users/mahathi/.zshrc eval“$(/opt/homebrew/bin/brew shellnv)”
- 安装Node.js和npm
brew安装节点
- 验证安装
节点-v npm-v 参见:v25.2.1
- 重新启动终端
- 如何运行MCP:
MCP检查员 uv运行mcp开发服务器/weather.py
- 需要安装以下软件包:
@模型上下文协议/inspector@0.18.0 可以继续吗?(y)y
______________________________________________________________________
- MCP检查器:uv运行MCP-dev-server/weather.py
- Claude App:uv运行mcp安装服务器/weather.py
- 我们可以直接与命令行集成吗
对于这种方法,我们使用客户端
- 需要client.py与mcp服务器集成并进行LLM集成
- 我们只需要一个库:MCP-USE-https://github.com/mcp-use/mcp-use
MCP USE:将任何LLM连接到任何MCP服务器并构建具有工具访问权限的自定义代理的开源方式,而无需使用闭源或应用程序客户端
- 终端:>紫外线添加mcp使用
- 终端:>uv添加lanchain_groq(因为我们使用的是groq LLM)
- termanal:>紫外线添加nest_asyncio
