Skip to main content
Glama

WhereAmI MCP 服务器

Python执照地位

轻量级 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

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    A lightweight MCP server that tells you exactly who you are.
    Last updated -
    1
    1
    MIT License
  • -
    security
    A
    license
    -
    quality
    An MCP server for nearby place searches with IP-based location detection.
    Last updated -
    21
    MIT License
  • -
    security
    A
    license
    -
    quality
    A lightweight gateway server that provides a unified connection entry point for accessing multiple MCP servers, supporting various protocols including Network and Local Transports.
    Last updated -
    Apache 2.0
  • -
    security
    -
    license
    -
    quality
    A MCP server that uses Amap API to provide location-based services, allowing users to get geographic information based on IP addresses and search for nearby points of interest.
    Last updated -
    18
    • Linux
    • Apple

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kukapay/whereami-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server