MCP实践
github
1. 获取github token
参考:https://blog.51cto.com/u_15069485/3590346
2. 配置cursor
"github": {"command": "npx","args": ["-y","@modelcontextprotocol/server-github"],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN": # 上一步获取token}}
3. 启动github MCP Server
npx -y @modelcontextprotocol/server-github
这里的疑问:执行 MCP Server 我们一定要通过 npx 或 uvx 运行一个包吗?
参考答案:https://zhuanlan.zhihu.com/p/1895815215712547750
4. 实验功能
systemfile
功能特性
Read/write files 读/写文件
Create/list/delete directories 创建/列表/删除目录
Move files/directories 移动文件/目录
Search files 搜索文件
Get file metadata 获取文件元数据
配置
"filesystem": {"command": "npx","args": ["-y","@modelcontextprotocol/server-filesystem","xxx", #填写本地路径"xxx/mcp-image-generator" #填写本地允许访问的路径]},
启动MCP Server
启动命令参考cursor中Command
实验功能
快速建站
MCP Server
"edgeone-pages-mcp-server": {"url": "https://mcp-on-edge.edgeone.site/mcp-server"
}
验证
https://cloud.tencent.com/developer/article/2512191