一个轻量级的MCP服务器,基于当前IP地址准确地告诉你所在的位置,由ipapi.co提供支持。
location://{type} 获取特定数据(例如,IP、国家、城市)。get_location() 生成全面的位置报告。mcp 和 httpx。pipgit clone https://github.com/kukapay/whereami-mcp.git
cd whereami-mcp
pip install mcp httpx
mcp install whereami_mcp.py --name "WhereAmI"
python whereami_mcp.py
mcp dev whereami_mcp.py
location://{type}根据 {type} 返回特定位置详情。
ip,country,country_code,region,city,latitude,longitude,timezone,isp,asn@location://ip → "8.8.8.8"@location://city → "Mountain View"@location://country → "United States"get_location()生成详细的地理位置数据Markdown表格。
| 字段 | 值 |
|--------------|----------------|
| IP | 8.8.8.8 |
| 国家 | United States |
| 国家代码 | US |
| 地区 | California |
| 城市 | Mountain View |
| 纬度 | 37.4223 |
| 经度 | -122.0848 |
| 时区 | America/Los_Angeles |
| ISP | GOOGLE |
| ASN | AS15169 |
where_am_i_prompt预定义查询:“请告诉我基于我的当前IP地址我在哪儿。”触发 get_location()。
mcp install whereami_mcp.py --name "WhereAmI"
@location://ip”@location://city,@location://country”get_location()MIT许可证。详情见LICENSE。 </中文翻译>