mcp-ip

mcp-ip

3.1

If you are the rightful owner of mcp-ip and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

mcp-ip is a tool for obtaining geographic location information from IP addresses using an offline IP database.

mcp-ip

Get geographic location information from IP addresses using offline IP database.

Supported IP Database

Currently using ip2region: https://github.com/lionsoul2014/ip2region.

Usage

Build

$ git clone https://github.com/qiangmzsx/mcp-ip.git
$ cd mcp-ip
$ go build -o mcp-ip

Startup Parameters

  1. -transport specifies transport method, default is streamable_http, options include stdio, see;
  2. -state_mode specifies state mode, default is stateful, option is stateless;
  3. -xdb_path specifies path to IP database, default is ./data/ip2region.xdb;
  4. -port specifies port number, default is 8080;

stdio Example

{
  "mcpServers": {
    "ipinfo": {
      "command": "mcp-ip",
      "args": [
        "-transport",
        "stdio",
        "-xdb_path",
        "/data/ip2region.xdb"
      ]
    }
  }
}

It is recommended to specify an absolute path for -xdb_path whenever possible.

streamable_http

$ ./mcp-ip -transport streamable_http -port 8080 -xdb_path /data/ip2region.xdb
$ http://127.0.0.1:8080/mcp