npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ipwho/mcp-server

v0.1.0

Published

MCP server for the IPWho IP geolocation API (ipwho.org): look up IPs from Claude, Cursor, VS Code and other AI agents.

Readme

IPWho MCP server

An MCP server for the IPWho IP geolocation API. It lets AI agents (Claude, Cursor, VS Code Copilot and other MCP clients) look up IP addresses directly.

Status: v0.1.0. The hosted server at mcp.ipwho.org is live. The npm package @ipwho/mcp-server is published from this repository; ipwho-mcp is an alias that runs the same server. Setup guide with per-client tabs: ipwho.org/docs/api/mcp-server.

You need an IPWho API key (sign up at ipwho.org). Every lookup counts against your plan's quota, the same as calling the API directly.

Tools

| Tool | What it does | Local | Hosted | |---|---|:-:|:-:| | lookup_ip | One IPv4 or IPv6 address. Optional get field filter, e.g. geoLocation,security. | ✅ | ✅ | | lookup_bulk | 1–100 addresses in one call. Results are in data.responseArray. | ✅ | ✅ | | lookup_me | The public IP of the machine running the server. | ✅ | — |

lookup_me isn't offered on the hosted server: there it would look up Cloudflare's IP, not yours.

What you get back: two parts. First, the API's JSON, unchanged: { "success": true, "data": { … } }, with the objects geoLocation, timezone, flag, currency, connection, security and userAgent. Field names keep their exact wire casing (postal_Code, flag_Icon, asn_number). See the API docs. Second, a one-line attribution: Data source: IPWho (https://www.ipwho.org). The tool descriptions also ask the agent to name IPWho as the source.

Honest limits (the tool descriptions tell the agent these too):

  • IP geolocation is approximate, especially at city level. Many fields can be null; region and city often are.
  • connection.connection_type is Cable/DSL, Cellular, Corporate, Satellite or null. Corporate also covers offices, VPNs and cloud networks, so it isn't datacenter detection.
  • security is a basic signal: isVpn and isTor (true/false) and isThreat (low/medium/high). It isn't a fraud or risk score.
  • Only JSON is returned. The API's XML and CSV formats aren't exposed.

Local setup (npm package, runs on your machine)

The server reads your key from the IPWHO_API_KEY environment variable. Node.js 18 or later is required.

Claude Code

claude mcp add ipwho --env IPWHO_API_KEY=YOUR_KEY -- npx -y @ipwho/mcp-server

Claude Desktop

Settings → Developer → Edit Config (claude_desktop_config.json):

{
  "mcpServers": {
    "ipwho": {
      "command": "npx",
      "args": ["-y", "@ipwho/mcp-server"],
      "env": { "IPWHO_API_KEY": "YOUR_KEY" }
    }
  }
}

Cursor

~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "ipwho": {
      "command": "npx",
      "args": ["-y", "@ipwho/mcp-server"],
      "env": { "IPWHO_API_KEY": "YOUR_KEY" }
    }
  }
}

VS Code

.vscode/mcp.json. VS Code asks for the key once and stores it securely:

{
  "inputs": [
    { "type": "promptString", "id": "ipwho-key", "description": "IPWho API key", "password": true }
  ],
  "servers": {
    "ipwho": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@ipwho/mcp-server"],
      "env": { "IPWHO_API_KEY": "${input:ipwho-key}" }
    }
  }
}

Hosted setup (https://mcp.ipwho.org/mcp)

The hosted server uses Streamable HTTP. Send your key in a header on every request, either X-API-Key: YOUR_KEY or Authorization: Bearer YOUR_KEY. Without a key it returns 401. A key in the URL is refused.

# Claude Code
claude mcp add --transport http ipwho https://mcp.ipwho.org/mcp --header "X-API-Key: YOUR_KEY"
// Cursor (~/.cursor/mcp.json)
{ "mcpServers": { "ipwho": { "url": "https://mcp.ipwho.org/mcp", "headers": { "X-API-Key": "YOUR_KEY" } } } }
// VS Code (.vscode/mcp.json), with the same "inputs" block as above
{ "servers": { "ipwho": { "type": "http", "url": "https://mcp.ipwho.org/mcp", "headers": { "X-API-Key": "${input:ipwho-key}" } } } }

Claude Desktop's and claude.ai's custom connectors expect OAuth sign-in rather than a pasted key, so use the local package there for now. OAuth is planned.

Your key

  • It's sent to api.ipwho.org only, in the X-API-Key header, and never in a URL.
  • It's never logged or echoed back in error messages.
  • The hosted server is stateless: it keeps no sessions and stores nothing. Each request carries its own key, which is used for that request only.
  • The hosted server logs one line per request for operations: the HTTP method, path, status, duration and the MCP method or tool name. It never logs headers, your key, the IP addresses you look up, or results. Cloudflare's automatic request logs are switched off.

Development

npm install
npm run typecheck      # Node (stdio) and Cloudflare Workers types
npm test               # 20 tests against a local mock API, local and hosted
npm run test:workerd   # the Worker in Cloudflare's local runtime (wrangler dev --local), against the mock
IPWHO_API_KEY=... npm run test:live   # live API through the local server (uses ~5 lookups)

Publishing to npm (maintainers): server.json (official MCP registry entry) and mcpName in package.json must keep the same name, io.github.lavrox/ipwho-mcp, and the versions must match. From a fresh clone of main: npm ci && npm test && npm publish --access public, then cd packages/ipwho-mcp && npm publish --access public (the alias depends on the exact version just published). Registry entry: mcp-publisher login github, then mcp-publisher publish.

Deploying the hosted server: merging to main runs .github/workflows/deploy.yml. It runs the tests, then wrangler deploy, then checks mcp.ipwho.org. It needs the repo secrets CF_API_TOKEN (a Cloudflare "Edit Cloudflare Workers" token that also has Zone → Workers Routes → Edit on ipwho.org) and CF_ACCOUNT_ID. The deploy attaches the custom domain mcp.ipwho.org itself (routes in wrangler.jsonc).

Layout: src/ipwho.ts (API client) · src/server.ts (tool definitions, shared) · src/stdio.ts (local entry) · src/worker.ts (hosted entry, Cloudflare Worker) · wrangler.jsonc (Worker config; no secrets; Workers Logs on for our own log lines only).

License

MIT