Content
# MCP Server IP Location Query Server
This is a server based on the Model Context Protocol (MCP) that provides IP address location query functionality. It uses the [ip.sb](https://ip.sb/api/) API to obtain detailed geographical location information for IP addresses.
## Features
- Query location information for a specified IP address
- If no IP address is specified, it queries the current client's IP information
- Provides data transmission via HTTP SSE
- Complies with MCP protocol standards
## Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/mcp-server-ip.git
cd mcp-server-ip
# Install dependencies
npm install
# Build the project
npm run build
```
## Usage
### Start the Server
```bash
npm start
```
The server will start at http://localhost:3000 and provide MCP services via SSE.
### Development Mode
```bash
npm run dev
```
### Integration with Claude Desktop
1. Create `.cursor/mcp.json` in the project directory:
2. Add server configuration:
```json
{
"mcpServers": {
"sample-project-server": {
"url": "http://localhost:3000/sse"
}
}
}
```
## API Description
### query-ip
Query location information for a specified IP address.
**Parameters**:
- `ip` (optional): The IP address to query. If not provided, it queries the current client's IP.
**Returns**:
Returns a text containing the following information:
- IP address
- Country/Region
- Province/State
- City
- Latitude and Longitude
- Time Zone
- ASN
- Organization
## References
- [MCP Protocol](https://www.anthropic.com/news/model-context-protocol)
- [TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
- [Claude MCP](https://docs.cursor.com/context/model-context-protocol)
- [ip.sb](https://ip.sb/api/)
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
markitdown
Python tool for converting files and office documents to Markdown.
firecrawl
Firecrawl MCP Server enables web scraping, crawling, and content extraction.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.