Skip to main content
Glama
ip2location

IP2Location IP Geolocation MCP Server

Official

IP2Location.io MCP-Server

Dies ist eine einfache Implementierung eines Model Context Protocol (MCP)-Servers für die IP2Location.io-API. Er liefert detaillierte Geolokalisierungsinformationen für jede angegebene IPv4- oder IPv6-Adresse.

Funktionen

  • Umfassende Geolokalisierungsdaten: Ruft eine Vielzahl von Informationen ab, darunter Land, Region, Stadt, Breitengrad, Längengrad, Postleitzahl, Zeitzone und mehr.

  • Netzwerkdetails: Bietet netzwerkbezogene Daten wie ASN, ISP, Domain und Netzwerkgeschwindigkeit.

  • Sicherheitserkenntnisse: Erkennt Proxy-Informationen, einschließlich Proxy-Typ und Anbieter.

  • Einfache Integration: Als FastMCP-Tool erstellt, was eine einfache Integration in kompatible Systeme ermöglicht.

  • Asynchron: Nutzt httpx für nicht blockierende, asynchrone API-Anfragen.

Anforderungen

Dieser MCP-Server unterstützt Abfragen ohne API-Schlüssel mit einer Begrenzung von 1.000 Abfragen pro Tag. Sie können sich auch für einen kostenlosen API-Schlüssel registrieren und bis zu 50.000 Abfragen pro Monat nutzen.

Das Setup verwendet außerdem uv, das gemäß dieser Anleitung installiert werden kann.

Einrichtung

Befolgen Sie die Schritte, um diesen MCP-Server mit Claude Desktop zu verwenden:

  1. Laden Sie das Repository lokal herunter.

  2. Richten Sie den uv-Paketmanager ein; Sie können hierfür erneut die Anleitung verwenden.

  3. Stellen Sie sicher, dass Sie Claude Desktop installiert haben. Falls nicht, laden Sie es bitte hier für Windows und MacOS herunter oder folgen Sie dieser Anleitung für Linux-Benutzer.

  4. Öffnen Sie die claude_desktop_config.json in einem Editor Ihrer Wahl. Falls Sie noch keine haben, folgen Sie dieser Anleitung, um eine zu erstellen.

  5. Fügen Sie Folgendes zu Ihrer claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "ip2locationio": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/ip2locationio/src",
        "run",
        "server.py"
      ],
      "env": {
        "IP2LOCATION_API_KEY": "<YOUR API key HERE>"
      }
    }
  }
}
  1. Denken Sie daran, den Pfad /path/to/ip2locationio durch Ihren tatsächlichen lokalen Pfad zum IP2Location.io MCP-Server zu ersetzen.

  2. Um Ihren API-Schlüssel zu erhalten, melden Sie sich einfach in Ihrem Dashboard an und rufen Sie ihn dort ab. Ersetzen Sie <YOUR API key HERE> oben durch Ihren tatsächlichen API-Schlüssel.

  3. Starten Sie Claude Desktop nach dem Speichern der Änderungen neu; er sollte dann im Menü Connectors erscheinen.

Verwendung

Geben Sie einfach Ihre Anfrage zur IP in einem Chat in Claude Desktop ein. Einige Beispielanfragen wären:

  • Wo befindet sich der Standort von (IP)?

  • Wo ist (IP) lokalisiert?

  • Was sind die Koordinaten von (IP)?

Hier ist zum Beispiel das Ergebnis für die IP 8.8.8.8:

Die Ausgabe der IP 8.8.8.8

In Claude Desktop generiert das Modell automatisch die Ausgabe basierend auf dem vom IP2Location.io MCP-Server zurückgegebenen Ergebnis.

Sie können auch die IP2Location.io Bulk IP Geolocation API verwenden, um mehrere IP-Adressen abzufragen. Geben Sie einfach alle IP-Adressen mit einem Leerzeichen zwischen den einzelnen IP-Adressen ein. Zum Beispiel 8.8.8.8 8.8.6.6.

[!NOTE] Die IP2Location.io Bulk IP Geolocation API erfordert einen kostenpflichtigen Plan.

Umgebungsvariable

IP2LOCATION_API_KEY

Der IP2Location.io API-Schlüssel, mit dem Sie bis zu 50.000 Abfragen pro Monat durchführen und detailliertere Informationen zur IP-Adresse erhalten können. Sie können sich für einen kostenlosen API-Schlüssel registrieren oder einen Plan abonnieren, um weitere Vorteile zu nutzen.

Tool

get_geolocation

Beschreibung Ruft die Geolokalisierung für die angegebene IP-Adresse oder eine Gruppe von IP-Adressen ab. Es hilft Benutzern, detaillierte Informationen wie Land, Region, Stadt, Breitengrad, Längengrad, Postleitzahl, Zeitzone, ASN und Proxy-Informationen für jede IPv4- oder IPv6-Adresse abzurufen. Es leitet Anfragen bei Erkennung mehrerer IPs automatisch zur effizienten Verarbeitung an die IP2Location.io Bulk API weiter.

Argumente

  • ip (str): Die zu analysierende IP-Adresse (IPv4 oder IPv6). Sie können mehrere IPs gleichzeitig abfragen, indem Sie sie als einzelne Zeichenfolge übergeben, die durch Kommas, Leerzeichen oder Zeilenumbrüche getrennt ist (z. B. "1.1.1.1, 2.2.2.2").

Rückgabewerte Eine JSON-Zeichenfolge, die die Geolokalisierungsdaten enthält. Wenn mehrere IPs abgefragt werden, wird ein JSON-Objekt zurückgegeben, bei dem jeder Schlüssel eine IP-Adresse ist, die ihren jeweiligen Daten zugeordnet ist. Das Ergebnis kann je nach API-Plan die folgenden Felder enthalten:

  • Standort & Geografie: Land, Region, Bezirk, Stadt, Postleitzahl, Breitengrad & Längengrad, Zeitzone.

  • Netzwerk & Konnektivität: ASN (Autonomous System Number), ISP (Internet Service Provider), Domain, Netzwerkgeschwindigkeit, IDD-Vorwahl, Ortsvorwahl, Adresstyp, Nutzungstyp.

  • Mobilfunkinformationen: MNC (Mobile Network Code), MCC (Mobile Country Code), Mobilfunkmarke.

  • Währung & Sprache: Währungscode, Währungsname, Währungssymbol, Sprachcode, Sprachname.

  • Proxy & Sicherheit: Proxy-Typ, zuletzt gesehen, Bedrohungsgrad/-typ, Proxy-Anbieter, Betrugs-Score.

  • Sonstiges: IAB-Kategorie, Wetter, Höhe, Bevölkerung und mehr.

Wenn eine einzelne IP-Anfrage fehlschlägt oder die IP ungültig ist, gibt das Tool eine Fehlermeldung als Zeichenfolge zurück. Bei Bulk-Anfragen gibt jede einzelne fehlgeschlagene IP ein Fehlerobjekt zurück, das dieser spezifischen IP-Adresse zugeordnet ist, ohne dass die gesamte Gruppe fehlschlägt.

Lizenz

Siehe die LICENSE-Datei.

Available Tools

1 tool
get_geolocationA

Fetch geolocation for the given IP address(es).

CRITICAL INSTRUCTION FOR AI AGENT: If the user provides multiple IP addresses in their prompt, DO NOT call this tool multiple times sequentially. You MUST batch all IP addresses together into a single comma-separated string and make exactly ONE tool call.

It helps users to retrieve detailed information such as country, region, city, latitude, longitude, ZIP code, time zone, ASN, and proxy information for any IPv4 or IPv6 address.

Args: ip: The IP address to analyze (IPv4 or IPv6). For multiple IPs, you MUST combine them into a single string separated by commas (e.g., "1.1.1.1, 2.2.2.2").

Returns: A JSON string result includes:

Location & Geography:
Country, region, district, city, ZIP code, latitude & longitude, time zone.

Network & Connectivity
ASN (Autonomous System Number), ISP (Internet Service Provider), domain, net speed, IDD code, area code, address type, usage type.

Mobile Information
MNC (Mobile Network Code), MCC (Mobile Country Code), Mobile Brand.

Currency & Language
currency code, currency name, currency symbol, language code, language name.

Proxy & Security
proxy type, last seen, threat level/type, proxy provider, fraud score.

Others
IAB category, weather, elevation, population and more.

Note that some information may only available in paid plan. Learn more on this in https://www.ip2location.io/pricing.
ParametersJSON Schema
NameRequiredDescriptionDefault
ipYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes the return structure in detail and notes that some information may be limited to paid plans. No annotations exist, so the description carries the burden; it discloses the tool is a read operation but lacks info on error handling or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with headings, critical instruction upfront, and detailed return breakdown. Slightly verbose but each section adds clear value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one required parameter, no annotations, and presence of an output schema, the description provides extensive return field details and notes on plan limitations, making it complete for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides no description for the 'ip' parameter (0% coverage), but the description compensates fully by explaining it accepts IPv4/IPv6 and can be comma-separated for multiple IPs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool fetches geolocation for IP addresses, specifying the range of detailed data returned. No sibling tools exist, but it distinguishes itself as a geolocation lookup tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit critical instruction to batch multiple IPs into a single comma-separated string to avoid multiple calls. Does not mention when not to use or alternatives, but this is adequate given the single-purpose tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.1
    • Changedget_geolocation1 field changed
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "result": {
        +      "anyOf": [
        +        {
        +          "additionalProperties": true,
        +          "type": "object"
        +        },
        +        {
        +          "type": "string"
        +        }
        +      ],
        +      "title": "Result"
        +    }
        +  },
        +  "required": [
        +    "result"
        +  ],
        +  "title": "get_geolocationOutput",
        +  "type": "object"
        +}
  2. 1 tool update
    • First observedget_geolocation

TDQS

A4.6/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap. The tool's purpose is clearly defined and distinct.

Naming Consistency5/5

The single tool 'get_geolocation' follows a clear verb_noun pattern, which is consistent and predictable.

Tool Count4/5

While the server has only one tool, it is sufficient for its focused purpose of IP geolocation. The count is slightly below the typical 3-15 range but still reasonable.

Completeness5/5

The tool provides comprehensive geolocation data covering location, network, security, and more. No obvious gaps exist for a read-only service of this nature.

Maintenance

ActivitySlowing
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that provides IP geolocation services using MaxMind's GeoIP2 databases, allowing users to retrieve geographical information for single or multiple IP addresses including country, city, coordinates, and ASN details.
    GPL 3.0
  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that provides access to the Netdetective API for querying information about IP addresses. It enables users to retrieve metadata for a specified IP address or the connecting client's default IP address.
    1
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    MCP server for IP geolocation lookups using ipinfo.io, with single, own, and batch queries.
    1
    MIT