IP Geolocation MCP avatar

IP Geolocation MCP

Pricing

from $0.01 / 1,000 results

Go to Apify Store
IP Geolocation MCP

IP Geolocation MCP

Look up IP geolocation data and DNS records. AI agents can find location, ISP, organization, ASN, timezone, and DNS records for networking, cybersecurity, and developer workflows.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Jordan C

Jordan C

Maintained by Community

Actor stats

0

Bookmarked

0

Total users

0

Monthly active users

5 days ago

Last modified

Categories

Share

IP Geolocation & DNS Lookup MCP

Add public IP context and DNS answers to MCP-compatible agents without provisioning a separate API key. This Apify standby Actor combines IP discovery, approximate geolocation, network ownership metadata, and five common DNS record lookups in a small JSON response.

What you can do

  • Enrich a public IP with city, region, country, coordinates, timezone, organization, ASN, and postal code.
  • Inspect A, AAAA, MX, NS, and TXT answers for a domain in one tool call.
  • Support network troubleshooting, infrastructure inventory, domain configuration checks, and contextual security research.
  • Determine the public egress IP seen by upstream services when no explicit IP is supplied.

Results are informational. They are not proof of a person's location, identity, domain ownership, security posture, or service availability.

Connect from an MCP client

Use the deployed Streamable HTTP endpoint:

https://reverberant-equality--mcp-ip-geo.apify.actor/mcp

Authenticate through Apify with:

Authorization: Bearer $APIFY_TOKEN

Clients should accept application/json and text/event-stream. Send MCP operations with POST /mcp; direct GET and DELETE requests to /mcp return HTTP 405.

Registered tools

ip-lookup

ArgumentRequiredBehavior
ipNoIP address string to look up. If omitted, the server first asks ipify for its public IP.

Returns JSON containing ip, city, region, country, countryCode, latitude, longitude, timezone, isp, org, asn, and postal. isp and org are both populated from ipapi.co's organization field. Depending on the address and upstream database, individual values can be null or empty.

Because this is a cloud Actor, omitting ip discovers the Actor runtime's outbound public IP, not reliably the end user's device IP. Supply an explicit public IP when that distinction matters.

dns-lookup

ArgumentRequiredBehavior
domainYesDomain string passed verbatim to Google Public DNS.

Performs five sequential DNS-over-HTTPS requests and returns { domain, a, aaaa, mx, ns, txt }. Each record key is an array of answer-data strings. The result does not include TTLs, DNS status codes, question metadata, DNSSEC flags, CNAME expansion details, or other record types.

JSON example

Arguments for dns-lookup:

{
"domain": "example.com"
}

The MCP response has one text item containing JSON in this shape; live answers can differ:

{
"domain": "example.com",
"a": ["93.184.216.34"],
"aaaa": [],
"mx": ["0 ."],
"ns": ["a.iana-servers.net.", "b.iana-servers.net."],
"txt": ["v=spf1 -all"]
}

Pricing

Each tool invocation charges one tool-call event at $0.005 USD. The charge is attempted before external lookups, so an upstream error after execution begins can still consume the event. Invalid MCP arguments rejected before handler execution are not completed calls. Apify platform usage may be billed separately under your plan.

Upstream services and rate limits

  • ipify supplies the runtime's public IP only when ip is omitted; the request timeout is 10 seconds.
  • ipapi.co supplies geolocation and network metadata with a 15-second timeout. Its no-key trial documentation advertises up to 1,000 lookups per day (about 30,000 per month) for testing and development; upstream policy or quota changes apply immediately.
  • Google Public DNS JSON API resolves A, AAAA, MX, NS, and TXT records, with a 10-second timeout per type. Google publishes HTTP 429 behavior but no fixed general-purpose request quota for this endpoint.

IP geolocation is approximate and may identify an ISP, VPN, proxy, mobile gateway, or corporate network rather than a user. Private, reserved, malformed, or unsupported IPs may be rejected by ipapi.co. The tool performs no local IP normalization or strict address validation.

For DNS, a failure of one record-type request is logged and converted to an empty array while the remaining types continue. Consequently, [] can mean either “no answer” or “that individual lookup failed.” Only a failure outside those per-type requests produces a tool-level isError: true. IP provider errors and network failures return isError: true with readable text. Invalid MCP argument types are schema errors; unexpected transport failures return JSON-RPC internal-server errors.

Privacy

Submitted IPs and domains are sent to the named upstream providers and may appear in Actor logs. Results are returned directly; this implementation does not write a dataset or key-value record. Apify and each provider can process request metadata under their own policies. Do not submit confidential internal hostnames or personal data unless you have a lawful reason.

Run locally

Node.js 20 or newer is required.

npm install
npm run start:dev # http://localhost:3000/mcp
npm test
npm run build
npm run start:prod
apify validate-schema

Set APIFY_CONTAINER_PORT to override the default port 3000.