Skip to main content
Glama
kukapay

whereami-mcp

by kukapay

WhereAmI MCP 服务器

Python执照地位

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

特征

  • 动态资源:通过location://{type}获取特定数据(例如,IP、国家、城市)。

  • 详细工具:使用get_location()生成全面的位置报告。

  • 自然语言提示:询问“我在哪里?”即可获得详细结果。

  • 强大的错误处理:优雅地管理 API 和网络问题。

  • 最小依赖:仅需要mcphttpx

Related MCP server: whoami-mcp

安装

先决条件

  • 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 许可证。详情请参阅许可证

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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