CM

chenmingyong0423/mcp-ip-geo

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

13 stars 8 forks 质量 58 趋势 20MIT

一个通过ip-api.com提供IP地理定位查询(国家,地区,城市等)的MCP服务器.

概览

mcp-ip-geo是一款使用ip-api.com服务的MCP(模式上下文协议)服务器,提供IP地理定位查询服务(country,region, City等). 您可以以两种方式整合mcp-ip-geo服务: 在您的 MCP 配置中添加以下内容直接从 GitHub 运行最新版本 : 一旦成功运行,服务将在容器内收听0.0:0:8000(在所有网络界面上收听),可以通过http://:8000/mcp访问,在哪里可以: - 本地开发环境:使用localhost or 127.0.0.1 - 局域网环境:使用服务器的内部IP地址(如192.168.x.x) - 公共网络环境:使用服务器的公共IP地址或域名. 说明: 服务配置是为了在容器内收听0.0.0.0地址,这是集装箱化应用的标准做法,确保服务可以从容器外接通.

概述(AI 翻译)

{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}我很高兴见到你

页:1

– – . . .

mcp-ip-geo是使用ip-api.com服务提供IP地理定位查询服务的[T1] ([T2])服务器.

# MCP 整合

您可以以两种方式整合mcp-ip-geo服务:

□ 方法1: 使用运行命令( Stdio)

在您的 MCP 配置中添加以下内容直接从 GitHub 运行最新版本:

□方法2:使用多克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克

Docker 部署

QQ 第 1 步 : 清除存储器

XQ 第 二 步 : 构建 Docker 图像

  • 第3步:运行容器

一旦成功运行,服务将在容器内收听0.0.0.0:8000(在所有网络界面上收听),并且可以通过http:// :8000/mcp访问,其中[T7]可以是:

  • 地方发展环境:使用[[T8]或[T9]]
  • 局域网环境:使用服务器的内部IP地址(例如192.168.x.x)
  • 公共网络环境:使用服务器的公共IP地址或域名

注:服务配置以收听"0.0".

本页由 AI 翻译,技术细节请以原文为准。

README

📝 mcp-ip-geo


mcp-ip-geo is an MCP (Model Context Protocol) server that provides IP geolocation lookup services (country, region, city, etc.) using the ip-api.com service.

🔌 MCP Integration

You can integrate the mcp-ip-geo service in two ways:

Method 1: Using the go run command (Stdio)

Add the following to your MCP configuration to run the latest version directly from GitHub:

{
  "mcpServers": {
    "mcp-ip-geo": {
      "command": "go",
      "args": [
        "run",
        "github.com/chenmingyong0423/mcp-ip-geo/cmd/mcp-ip-geo@latest"
      ]
    }
  }
}

Method 2: Using Docker (Streamable HTTP)

🐳 Docker Deployment

Step 1: Clone the repository

git clone https://github.com/chenmingyong0423/mcp-ip-geo.git
cd mcp-ip-geo

Step 2: Build the Docker image

docker build -t mcp-ip-geo-server .

Step 3: Run the container

docker run -d --name mcp-ip-geo-server -p 8000:8000 mcp-ip-geo-server

Once running successfully, the service will listen on 0.0.0.0:8000 within the container (listening on all network interfaces), and can be accessed via http://:8000/mcp, where `` can be:

  • Local development environment: Use localhost or 127.0.0.1
  • LAN environment: Use the server’s internal IP address (e.g., 192.168.x.x)
  • Public network environment: Use the server’s public IP address or domain name

Note: The service is configured to listen on the 0.0.0.0 address inside the container, which is standard practice for containerized applications, ensuring the service can be accessed from outside the container.

Step 4: Configure MCP

Add the following to your MCP configuration:

{
  "mcpServers": {
    "mcp-ip-geo": {
      "url": "http://:8000/mcp"
    }
  }
}

Replace `` with the actual server IP address or domain name of your deployment environment.

⚠️ License Notice

Note: This project uses the free version of ip-api.com, which is for non-commercial use only. If you intend to use this project for commercial purposes, please comply with their terms of service or purchase the paid version: https://ip-api.com/

在 GitHub 查看完整 README

安装

docker run -d --name mcp-ip-geo-server -p 8000:8000 mcp-ip-geo-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp-ip-geo": { "command": "go", "args": [ "run", "github.com/chenmingyong0423/mcp-ip-geo/cmd/mcp-ip-geo@latest" ] } } }