
IP地理定位
STREAMABLE HTTPIP地理位置查询MCP服务器
IP地理位置查询MCP服务器
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.
You can integrate the mcp-ip-geo
service in two ways:
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" ] } } }
git clone https://github.com/chenmingyong0423/mcp-ip-geo.git cd mcp-ip-geo
docker build -t mcp-ip-geo-server .
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://<server-address>:8000/mcp
, where <server-address>
can be:
localhost
or 127.0.0.1
192.168.x.x
)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.
Add the following to your MCP
configuration:
{ "mcpServers": { "mcp-ip-geo": { "url": "http://<server-address>:8000/mcp" } } }
Replace <server-address>
with the actual server IP address or domain name of your deployment environment.
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/