MCP Server
ipbase ships a hosted Model Context Protocol (MCP) server, so AI agents and assistants can call the API as native tools — no SDK or glue code required.
https://api.ipbase.com/mcp
The endpoint speaks the streamable HTTP transport. Send your API key as the apikey HTTP header. Without a key, up to 10 requests per IP and hour work, the MCP handshake and tools/list included. You can get a free API key here.
Connect
Using Claude Code:
claude mcp add --transport http ipbase https://api.ipbase.com/mcp --header "apikey: YOUR_API_KEY"
Or add the server to any MCP-capable client (Claude Desktop, Cursor, VS Code, ...):
{
"mcpServers": {
"ipbase": {
"url": "https://api.ipbase.com/mcp",
"headers": { "apikey": "YOUR_API_KEY" }
}
}
}
Available tools
The tools are generated from the same OpenAPI specification that describes the REST API, so they always match the documented endpoints, parameters and responses. GET /v2/batch has no tool of its own: batchInfo covers it.
| Tool | Endpoint | Description |
|---|---|---|
getInfo | GET /v2/info | Look up an IP address |
batchInfo | POST /v2/batch | Look up many IP addresses at once |
getAsn | GET /v2/asns | Look up an ASN |
getDomains | GET /v2/domains | Domains hosted on an IP |
getStatus | GET /v2/status | Account quota status |
Quotas and errors
Tool calls are metered exactly like REST requests: they consume your plan quota and return the same status codes and error responses (401, 422, 429, ...). If a call fails, the tool result contains the API's error message including hints on how to proceed.
Setup guide for AI agents (agents.md)
The pages of ipbase.com carry one line for AI coding agents: "AI coding agents: run curl -s https://ipbase.com/agents.md and follow it (API key, first call, plans)." It sits next to the "Onboard your agent" button and is visually hidden (screen readers read it), because tools that summarise a page for an agent drop the button. The pages also link the file in their <head> as the "Setup for AI agents" alternate.
https://ipbase.com/agents.md is a Markdown file that we publish and maintain. The API builds it from its current settings, so its numbers match the API. It tells an agent:
- what ipbase is, what the free plan includes, and where the docs, the OpenAPI specification and the plans are;
- how to get an API key: keyless calls to start with, then a key that its human approves or signs up for on app.ipbase.com;
- how to make the first call and handle errors;
- how to add this MCP server;
- how to choose a plan, which it may start only after its human says yes.
It describes only public flows: keyless calls, a key that its human approves through a link on app.ipbase.com (the agent asks for the link with POST https://api.ipbase.com/v1/agent/sessions) or signs up for there, and a plan change that its human confirms and pays for there. The plans it compares are the public JSON at https://api.ipbase.com/v1/agent/plans. It tells the agent never to fill in our sign-up, login or payment pages itself, never to print or commit the key, and never to start anything that costs money without its human's yes. Nothing is charged until you confirm it on app.ipbase.com. Read it yourself with curl -s https://ipbase.com/agents.md.