dash mcp
一个具有天气检查功能的简单MCP(模型上下文协议)服务器。
安装
bun install运行MCP服务器
bun run mcp-server.ts与Claude Desktop一起使用
将此添加到您的Claude Desktop配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"dash-weather": {
"command": "bun",
"args": ["run", "D:\\Repos\\dash-mcp\\mcp-server.ts"]
}
}
}*(更新路径以匹配您的实际项目位置)*
添加配置后,重新启动Claude Desktop。
可用工具
get_weather
获取一个城市的当前天气信息。
参数:
city(string,必填):城市名称
支持城市: 纽约、伦敦、东京、巴黎、悉尼
Claude中的示例用法:
What's the weather in Tokyo?发展
原始的Bun web服务器示例仍然可以在 index.ts:
bun run index.ts然后访问http://localhost:3000
______________________________________________________________________
此项目是使用创建的 bun init 在bun v1.3.8中。 包子 是一个快速的一体化JavaScript运行时。
