Skip to main content
This walkthrough makes three real API calls. No SDK, no install — just curl, jq, and a Mireye API token. We’ll ask about a Manhattan rooftop, fetch the same location’s flood-risk preset, and then wire up the hosted MCP server for Claude Code.

1. Pick a coordinate

Use any US lat/lng. We’ll use the corner of Beekman and Park Row in lower Manhattan, near City Hall:
The primary accepted coordinate envelope is lat ∈ [18, 72], lng ∈ [-180, -65] (lower 48, Alaska, Hawaii, US territories). The Western Aleutians additionally accept lat ∈ [51, 54], lng ∈ [172, 180). Anything outside those two regions returns 400 coord_out_of_bounds.

Starting from an address?

If your user typed an address, you do not need to resolve it first — /v1/fetch and /v1/ask both accept an address in place of lat/lng, and hand back the same quality information in a geocode block. Use POST /v1/geocode when you want the coordinate on its own — to inspect before using the coordinate, or to reuse across calls:
Check accuracy_type before you use the coordinate: rooftop is on the parcel, range_interpolation is an estimate along the street and can be kilometres off in rural areas. Details on the geocode page.

2. Get an API key

Sign in at www.mireye.com, accept the current Earth terms, and create a compact API key in the dashboard. Store it privately:
See Authentication for the other credential paths (compact API keys for HTTP and OAuth for hosted MCP).

3. Ask a question

A completed answer costs $0.10 on every plan. Set MIREYE_OPERATION_KEY once for this answer, and reuse that key and body to recover a lost response. Choose a new key only for a new operation. Free Fetch below does not spend wallet funds.
Response:
What just happened:
  1. The planner (Claude Sonnet 4.6) read the question, looked at the field catalog, and decided only elevation was needed.
  2. The terrain layer fetched 3DEP elevation for the coordinate.
  3. The synthesizer (also Claude Sonnet 4.6) wrote the prose answer, grounded in the fetched value, and the citation engine attached the source.
Read the fields top-to-bottom: answer is the prose, confidence summarizes the whole response, citations is the audit trail, and fields_used lists exactly which catalog fields the answer depends on.

4. Fetch raw fields

When you know what you want, skip the planner and hit /v1/fetch:
Response:
Each field is a self-contained record with provenance inline. The partial_failures array is empty here; on a call where the LCMS source times out, that field gets moved to partial_failures with retryable: true and the rest of the call still returns 200. Skip the field list entirely and use a preset for common workflows:
All presets and their field expansions are listed at /api-reference/fetch.

5. Use it from Claude Code

For guided setup (Claude Code, Codex, or Cursor), open Mireye setup, sign in, accept the current terms, and copy the setup prompt into your agent. The mireye-mcp 0.7.2 helper configures hosted MCP and installs the use-mireye skill. It saves your scoped API key privately and proves a free HTTP Fetch. The page completes when the server observes that successful call; the client still completes its own OAuth authorization for hosted MCP. Repeated copies reuse an eligible setup key. For manual hosted setup: If you previously configured a local stdio server named mireye-earth, remove it first:
Add the hosted MCP endpoint:
Restart Claude Code, run /mcp, and complete the browser sign-in flow. Eight tools are then available: mireye_ask, mireye_proximity, mireye_fetch, mireye_geocode, mireye_enrich, mireye_request_field, mireye_field_request_status, and mireye_search. Ask Claude:
“What’s the elevation at 40.7128, -74.0060?”
Claude will call mireye_ask, get the cited answer back, and surface the citation in chat. See /mcp/installation for Cursor and custom-agent setup.

6. Self-discover the catalog

Long-lived clients (agents, services) should fetch the catalog once at startup and cache it for an hour. This endpoint is public — no token needed:
The response sets ETag and Cache-Control: public, max-age=3600. Subsequent requests with If-None-Match: "<etag>" return 304. See /api-reference/meta-fields for the full flow. This endpoint describes Fetch fields and presets; use the Search field reference and Enrich field reference for those operations.

What’s next

POST /v1/ask

The natural-language endpoint. Two-model planner + synthesizer.

POST /v1/fetch

Fields, presets, and partial_failures semantics.

POST /v1/search

Find a parcel shortlist using typed filters.

POST /v1/enrich

Resolve one parcel and investigate selected attributes.

MCP tools

Choose between questions, field fetches, parcel search, and enrichment.

POST /v1/ask/stream

Same answer, first tokens in about five seconds.

Pricing in dollars

What each call costs, and how to quote a job first.

POST /v1/runs

Screen thousands of locations in one job.