使用说明
主控程序
安装依赖项:
bun i
在本地运行检查器:
bunx -y @modelcontextprotocol/inspector bunx -y tsx index.ts
您还可以在VSCode聊天中使用GitHub Copilot。要设置它,请将以下配置添加到您的 .vscode/settings.json 文件:
{
"mcp": {
"servers": {
"weather": {
"command": "bunx",
"args": [
"-y",
"tsx",
"<PATH_TO_YOUR_INDEX.TS_FILE>"
]
}
}
}
}
在聊天面板中,将模式设置为 Agent 并选择 weather 从工具下拉菜单中选择服务器。
一旦完成,您就可以使用 fetch-weather 该工具可向GitHub Copilot查询任何城市的天气。