whereami-mcp

by kukapay
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Offers repository access via GitHub for installation, with the server hosted at github.com/kukapay/whereami-mcp.git.

  • Formats location data as Markdown tables when using the get_location() tool, presenting geolocation information in a structured, readable format.

WhereAmI MCP 服务器

轻量级 mcp 服务器,根据您当前的 IP 准确告诉您您所在的位置,由ipapi.co提供支持。

特征

  • 动态资源:通过location://{type}获取特定数据(例如,IP、国家、城市)。
  • 详细工具:使用get_location()生成全面的位置报告。
  • 自然语言提示:询问“我在哪里?”即可获得详细结果。
  • 强大的错误处理:优雅地管理 API 和网络问题。
  • 最小依赖:仅需要mcphttpx

安装

先决条件

  • Python 3.10+
  • pip

设置

  1. 克隆存储库:
    git clone https://github.com/kukapay/whereami-mcp.git cd whereami-mcp
  2. 安装依赖项:
    pip install mcp httpx
  3. (可选)安装为 MCP 服务:
    mcp install whereami_mcp.py --name "WhereAmI"

用法

运行服务器

  • 直接执行:
    python whereami_mcp.py
  • 开发模式:
    mcp dev whereami_mcp.py

成分

资源: location://{type}

根据{type}返回特定位置的详细信息。

  • 支持的类型ipcountrycountry_coderegioncitylatitudelongitudetimezoneispasn
  • 例子
    • @location://ip"8.8.8.8"
    • @location://city"Mountain View"
    • @location://country"United States"

工具: get_location()

生成地理位置数据的详细 Markdown 表。

  • 字段
    • 知识产权
    • 国家
    • 国家/地区代码
    • 地区
    • 城市
    • 纬度
    • 经度
    • 时区
    • 互联网服务提供商
    • ASN
  • 示例输出
    | Field | Value | |----------------|-------------------| | IP | 8.8.8.8 | | Country | United States | | Country Code | US | | Region | California | | City | Mountain View | | Latitude | 37.4223 | | Longitude | -122.0848 | | Timezone | America/Los_Angeles | | ISP | GOOGLE | | ASN | AS15169 |

提示: where_am_i_prompt

预定义查询:“请根据我当前的 IP 地址告诉我我在哪里。”触发get_location()

Claude Desktop中的示例

  1. 安装服务器:
    mcp install whereami_mcp.py --name "WhereAmI"
  2. 查询数据:
    • “我的 IP 是@location://ip
    • “我在@location://city@location://country
  3. 获取完整报告:
    • “我在哪儿?”
    • get_location()

执照

MIT 许可证。详情请参阅许可证

-
security - not tested
A
license - permissive license
-
quality - not tested

轻量级的 mcp 服务器可以准确地告诉您您所在的位置。

  1. Features
    1. Installation
      1. Prerequisites
      2. Setup
    2. Usage
      1. Running the Server
      2. Components
      3. Examples in Claude Desktop
    3. License
      ID: sd8glbbpnr