Skip to content

MCP Connection Guide

IndepAI exposes a Model Context Protocol (MCP) server with five read-only tools for AI assistants and agents. Any MCP-compatible client can connect over Streamable HTTP.

You need an API key from your IndepAI dashboard. Go to Settings > API Keys and create a new key. Keys are prefixed iai_ and shown only once – copy it immediately.

API keys require a Starter plan or above.

Add to your claude_desktop_config.json:

{
"mcpServers": {
"indepai": {
"url": "https://mcp.indepai.app/mcp",
"headers": {
"Authorization": "Bearer iai_your_api_key"
}
}
}
}

Add to .cursor/mcp.json in your project root:

{
"mcpServers": {
"indepai": {
"url": "https://mcp.indepai.app/mcp",
"headers": {
"Authorization": "Bearer iai_your_api_key"
}
}
}
}

IndepAI uses standard Streamable HTTP transport. Any MCP-compatible client works – point it at the URL below and pass the API key as a Bearer token in the Authorization header.

Connect programmatically using the official MCP SDK:

import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://mcp.indepai.app/mcp"),
{
requestInit: {
headers: { Authorization: "Bearer iai_your_api_key" },
},
}
);
const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);
// List available tools
const { tools } = await client.listTools();
console.log(tools.map((t) => t.name));
// Call a tool
const result = await client.callTool({
name: "city_costs",
arguments: { city: "Lisbon" },
});
console.log(result);

Install the SDK with:

Terminal window
npm install @modelcontextprotocol/sdk
Tool Description Key Parameters
city_costs Cost of living data for a city city (string)
compare_cities Side-by-side city comparison cities (string[])
fire_calculator FIRE number calculation income, expenses, savings_rate
visa_check Visa requirements lookup nationality, destination
geo_arbitrage Find optimal cities for FIRE preferences (object)

All tools are read-only. They return structured JSON with a meta field containing data freshness timestamps and source attribution.

Every request must include a valid Bearer token. Requests without a token or with a revoked key receive a 401 response.

Rate limits use a per-minute sliding window plus a monthly counter. Limits depend on your subscription plan:

Plan Requests/Minute Requests/Month
Starter 30 5,000
Pro 120 50,000

When you hit a limit, the server returns 429 Too Many Requests. Check response headers for remaining quota:

X-RateLimit-Limit: 30
X-RateLimit-Remaining: 24
X-RateLimit-Reset: 1709510400
Property Value
URL https://mcp.indepai.app/mcp
Transport Streamable HTTP
Auth Bearer token (iai_ prefix)
Tools 5 read-only
SDK @modelcontextprotocol/sdk