Skip to content
Private preview: new accounts are by invitation only. Ask for one

MCP and AI agents

Connect an AI agent to the MCP server, or point it at the OpenAPI spec and the Markdown guides.

The MCP server gives an agent the same five lookups as tools, with the same key, limits and data as the REST API.

  • URL: https://api.ipalmanac.com/mcp
  • Transport: Streamable HTTP, with JSON responses
  • Authentication: the Authorization: Bearer <your API key> header

Connect

With Claude Code, add it from the command line:

claude mcp add --transport http ip-almanac https://api.ipalmanac.com/mcp \
  --header "Authorization: Bearer $IPALMANAC_API_KEY"

Or put it in a project's .mcp.json:

{
  "mcpServers": {
    "ip-almanac": {
      "type": "http",
      "url": "https://api.ipalmanac.com/mcp",
      "headers": { "Authorization": "Bearer <your API key>" }
    }
  }
}

Other clients take the same two settings, the URL and the Authorization header, in their own config format. Run the client on your machine or server: the server refuses requests from web pages other than the console.

Tools

Each tool returns the same JSON as its endpoint, as structured content and as text. Listing the tools needs no key. Calling one checks the key and counts against the same rate and quota as the REST API (see Rate limits and quotas).

A refused call comes back as a tool error whose text carries the error code after the tool name:

Error executing tool lookup_ip: invalid_ip: Expected an IPv4 or IPv6 address. No request was counted.

Help an agent read the data

The data is easy to misread: null is unknown rather than false, and an empty list means not observed rather than absent. Give your agent the reading rules along with the tools:

On this page