天气查询工具

一个基于Model Context Protocol (MCP)的实时天气查询工具,通过Latinum Wallet MCP服务器提供付费访问,除都柏林外其他城市需通过Solana Devnet支付。

  • by Latinum-Formal-Methods
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 dennj/weather_mcp

使用说明

🌤️ 天气MCP工具(Latinum Paywalled代理工具)

一个最小的模型上下文协议(MCP)工具,为任何城市提供实时天气信息。通过Latinum Wallet MCP服务器访问预测是付费的,需要Solana Devnet支付——都柏林除外,都柏林是免费的。

🔧 开发人员测试

要将本地构建安装为CLI,以便使用Claude进行测试,请执行以下操作:

git clone https://github.com/Latinum-Agentic-Commerce/latinum-wallet-mcp.git
cd weather_mcp
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install --upgrade --upgrade-strategy eager -r requirements.txt
pip install --editable .

编辑您的Claude Desktop配置:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
      "weather_mcp": {
          "command": "/Users/{YOUR_USER}/workspace/weather_mcp/.venv/bin/python",
          "args": [
              "/Users/{YOUR_USER}/workspace/weather_mcp/weather_mcp/server_stdio.py"
          ]
      }
  }
}

然后重启克劳德。

📑 PyPI出版

python3 -m venv .venv && source .venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
rm -rf dist/ build/ *.egg-info
python3 -m build
python3 -m twine upload dist/*
pipx upgrade weather-mcp

在以下路径中查看输出:https://pypi.org/project/weather-mcp/

💳 运作原理

  • ❓ 问: What's the weather in Paris? → 克劳德立刻回应。
  • ❌ 问: What's the weather in London? → 克劳德得到一个 402 并触发钱包。
  • ✅ Claude使用Latinum钱包付款并重试。