使用说明
美国气象mcp服务器
我根据Kotlin教程创建了一个MCP服务器。
https://modelcontextprotocol.io/quickstart/server
用法
1.下载JAR文件
从下载JAR文件 发布页面.
2.编辑 claude_desktop_config.json
如果您在MacOS或Linux上使用Claude Desktop应用程序,可以在以下位置找到配置文件:
~/Library/Application\ Support/Claude/claude_desktop_config.json
您可以使用以下配置来运行MCP服务器 claude_desktop_config.json(需要Java 21.0.2或
更高)
{
"mcpServers": {
"weather": {
"command": "/path/to/java/21.0.2/bin/java",
"args": [
"-jar",
"/path/to/us-weather-mcp-1.0-SNAPSHOT-all.jar"
]
}
}
}
然后,您可以在Claude Desktop应用程序上运行MCP服务器。
3.问天气
你可以用以下格式询问天气:
How's the weather in New York?