Fetch MCP 安装笔记-roo cline实操版本
cursor中将MCP加入知识库:@Doc->add new doc https://modelcontextprotocol.io/introduction
@MCP 参考@https://github.com/langgptai/LangGPT 帮我生成一个langgpt的提示词,写到langgpt提示词.md
@MCP 学习这个文档,帮我生成一个MCP应用专家,来帮我构建MCP应用,要求生成langGPT格式的提示词mcp_expert.md
@/mcp_expert.md 参照这里的提示词,帮我安装https://github.com/zcaceres/fetch-mcp 这个fetch MCP
以下步骤用于安装 fetch MCP 服务器:
-
克隆仓库:
git clone https://github.com/zcaceres/fetch-mcp
-
进入仓库目录:
cd fetch-mcp
或vscode、cursor中对需要的文件夹右键->在集成终端中打开
-
安装依赖:
npm install
安装npm可能会比较麻烦
-
构建服务器:
npm run build
-
配置 MCP 服务器:
将以下配置添加到 MCP 配置文件,即,使用绝对路径 (
c:\Users\15131\AppData\Roaming\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
) 的mcpServers
对象中:{ "mcpServers": { "fetch": { "command": "node", "args": [ "c:/Users/15131/AppData/Roaming/Code/User/globalStorage/txc-mcp-servers/fetch-mcp/dist/index.js" ], "disabled": false, "alwaysAllow": [] } } }
安装完成后,您可以使用 fetch_html
、fetch_json
、fetch_txt
和 fetch_markdown
工具来获取网页内容。
比如:
使用fetch_html工具帮我获取https://github.com/modelcontextprotocol 的内容