Cursor supports remote MCP servers over Streamable HTTP natively. No bridge package is required — Cursor connects directly to https://mcp.apilayer.com/mcp.
4.1 Prerequisites
- Cursor with MCP support (Settings → MCP must be visible).
- A MCP Bearer token on a subscription with mcp_access_enabled
4.2 Locate mcp.json
If the file does not exist, create it.
| Scope | Path |
|---|---|
| Global | ~/.cursor/mcp.json |
| Project | <repo>/.cursor/mcp.json (overrides global within that workspace) |
4.3 Configure the server
Step 1: Open Cursor Settings
Launch Cursor, then go to: File > Preferences > Cursor Settings (or press Cmd+Shift+J on macOS / Ctrl+Shift+J on Windows).
Step 2: Navigate to the MCP section
In the left sidebar of the Settings panel, scroll to the MCP section and click on it. You will see a list of configured MCP servers (empty if none are set up yet).
Step 3: Configure the Server
MCP Bearer token
{ "mcpServers": { "apilayer": { "url": "https://mcp.apilayer.com/mcp", "headers": { "Authorization": "Bearer ${env:APILAYER_MCP_TOKEN}" } } } } |
Export the token in the shell that launches Cursor:
| export APILAYER_MCP_TOKEN="your-token" |
If ${env:…} substitution isn't supported by your Cursor version, paste the token literally — but keep ~/.cursor/mcp.json out of source control if you do.
Then supply apiKey whenever Cursor asks to run a tool:
| { "ip": "8.8.8.8", "apiKey": "your-apilayer-access-key" } |
Step 4: Restart Cursor
Fully close and reopen Cursor for the MCP server to be registered.
Step 5: Enable in Composer
Open Settings → MCP. The apilayer entry should show a green dot and list the three ipstack_* tools.
4.4 Using IPstack Tools in Cursor
Once configured. Examples:
- "What country and city is the IP address 8.8.8.8 located in?" (uses ipstack_lookup)
- “Get location details for {IP_ADDRESS}.” (uses ipstack_lookup)
- “What region does IP {IP_ADDRESS} belong to?”
💡 Tip In Cursor Agent mode, the AI can chain multiple tool calls automatically. For example, asking 'Get the location of this IP and then fetch the current timezone there' will call ipstack_lookup without any manual intervention. |
4.5 Troubleshooting
Server is red / "failed to connect".
- Cursor logs are at: macOS ~/Library/Logs/Cursor/, Windows %APPDATA%\Cursor\logs\, Linux ~/.config/Cursor/logs/. Look for entries tagged mcp.
- Verify the URL is exactly https://mcp.apilayer.com/mcp. The bare host returns 404.
- Confirm reachability:
curl -i -H "Authorization: Bearer $APILAYER_MCP_TOKEN" \ -H "Accept: application/json, text/event-stream" \ https://mcp.apilayer.com/mcp |
The tools list is empty even though the server is green. The subscription gate (features.mcp_access_enabled) may be denying the tools/list enumeration silently. Check that the subscription is Professional or higher.
Rate limit exceeded. Inspect the JSON _meta returned with the error for X-Rate-Limit-Limit and retryAfter. Per-second + monthly quotas are enforced server-side.
4.6 Tool catalog
| Tool | Description |
|---|---|
| ipstack_lookup | Geolocation + security for a single IP. |
| ipstack_check | Geolocation + security for the caller's own IP. |
| ipstack_bulk_lookup | Geolocation + security for a comma-separated list of IPs. |