About mcp-ip
mcp-ip is an MCP server that looks up geographic information for IP addresses using the offline ip2region database. It is suited to applications that need IP location results without querying an online database.
Key features
- 01Look up IP geographic information
- 02Use the offline ip2region database
- 03Configure database file path
- 04Run with stdio or streamable HTTP
Use cases
- 01Retrieve location details for an IP address
- 02Use IP lookup without an online database
- 03Choose a transport for an MCP deployment
MCP support
It exposes offline IP geolocation lookup to MCP clients and supports stdio and streamable HTTP transports.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmcp-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
- -transport specifies transport method, default is streamable_http, options include stdio, see;
- -state_mode specifies state mode, default is stateful, option is stateless;
- -xdb_path specifies path to IP database, default is ./data/ip2region.xdb;
- -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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.