ljj-mcp-demo
一个基于 Model Context Protocol(MCP)和 OpenWeather API 开发的天气查询服务器。
功能
- 查询指定城市的当前天气
- 返回温度、湿度、风速和天气描述
- 支持 STDIO 传输模式
安装
pip install ljj-mcp-demo
配置
从 OpenWeather 获取 API Key,并通过环境变量提供:
$env:OPENWEATHER_API_KEY = "你的 API Key"
不要把 API Key 写入源码或提交到版本控制。
运行
ljj-mcp-demo
服务器默认使用 STDIO 传输,可由支持 MCP 的客户端作为子进程启动。
Metadata
Release files for ljj-mcp-demo 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ljj_mcp_demo-0.1.2.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ljj_mcp_demo-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / ljj_mcp_demo-0.1.2.tar.gz
| Download URL | ljj_mcp_demo-0.1.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5633c58d4c12d75606548ae654c0f1ef20aab77161cf76e9d49cd07d78ae9d05
|
|
BLAKE2b-256 checksum How to use checksums |
07c0235140a902bf5fc384c61e58482f0faaffefaed0c5bc8aa5296648c4b5dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ljj_mcp_demo-0.1.2-py3-none-any.whl
| Download URL | ljj_mcp_demo-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72d891ba7da8556439dac661f581333e2fded50b3f2cc21dcb60d9437a6f68fb
|
|
BLAKE2b-256 checksum How to use checksums |
a6e14ce07b3f3bf33b6b0b8558a753b4e7533760e3d53733912d06ab2b98089f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|