bharatlas-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
bharatlas MCP server. India's open geo data: curated layers (state to village boundaries, city wards, forests, hospitals, highways, rivers, canals, groundwater, agro-climatic zones, floods, seismic zones) plus community submissions. It also drives collect.bharatlas.com for authoring your own maps (see "Collect" below).
Workflow patterns:
Discovery: start with list_layers or list_categories to find relevant layers. Use the q parameter for text search.
Schema first: always call get_layer_schema BEFORE query_layer. Column names vary per layer (e.g. "state" vs "State_LGD" vs "stname"). The schema shows exact names and sample values.
Filtering: query_layer where is an exact, case-insensitive match (no partial or substring match). Pass column=value pairs; check the schema for the right column name and value format. Columns the schema marks as type "nested" (structs, lists, maps, e.g. Overture names/addresses) can be selected but not used in where or group_by (the API returns 400 listing the flat columns).
Counting: use group_by to count features by any column. Example: group_by "category" on the gs_wildlife layer returns national parks vs sanctuaries.
Totals: add sum (numeric columns) to group_by to total values per group, e.g. group_by "district" + sum ["area_ha"] rolls block-level areas up to districts. Percentages are not additive: sum the underlying amounts and recompute shares.
Location queries: locate returns all admin boundaries + zones at a lat/lng, and (for the ~30 covered cities) auto-includes the municipal ward layer that contains the point — so "what ward is this?" just works with lat/lng alone. Use it to answer "what state/district/ward is this point in?"
Spatial joins (multi-step): to answer "which X are in Y?" when layers don't share a common column:
Use locate to find the admin context (state, district) of the target area
Use query_layer with a where filter to narrow the other layer by that admin context
For precise spatial containment, test individual points via locate against the target layer
Community layers: list_submissions returns user-contributed datasets. These work with query_layer and get_layer_schema exactly like curated layers.
Downloads: get_layer_detail returns direct URLs for the formats a layer has (parquet and pmtiles always; geojson, kml and shapefile for most).
Large layers: overture_places_india has 4.4M places. Always narrow it: where on basic_category (e.g. "hospital", "restaurant") or name, group_by, or nearby for places around a point. Whole-table filters and group_by take several seconds; nearby is the fast path for "near me".
Honor the terms: every layer and community submission carries its own source and open licence. When you use, quote, or publish results from a layer, credit its source and respect that licence; get_layer_detail returns the attribution and licence, and each /view page's Dataset JSON-LD carries a creditText to reproduce.
Source preference (multiple layers often cover the same level):
Admin boundaries (state, district, subdistrict, block, village): prefer LGD (lgd_*) as the authoritative source. SOI, Bhuvan, and geoBoundaries are cross-reference alternates with slightly different counts/boundaries. Mention alternates if the user asks about discrepancies.
City wards: each city has its own layer (wards_chennai, wards_pune, etc.). Some cities have multiple vintages (e.g. Bengaluru has GBA 2025 + BBMP 2022 historical).
Environment/infrastructure/health: usually one source per layer. Check the source field.
Community submissions: ALWAYS check list_submissions alongside list_layers when searching. Community layers may cover areas or topics that curated layers don't. They work with query_layer and get_layer_schema identically.
When multiple sources exist, tell the user which one you're using and why. If results seem wrong, try the alternate source.
Cross-layer queries (combining data from different layers):
Questions often span multiple layers and categories. "Which wards are near an international airport?" needs the airports layer (transport) + a city ward layer (city-wards).
Step 1: identify all relevant layers using list_layers with different q/category filters.
Step 2: query one layer to get a geographic anchor (e.g. airport location → state/district).
Step 3: use that anchor to find the right layer in the other category (e.g. wards_bengaluru_gba for Karnataka airports).
Step 4: use locate or column filters to find overlapping features.
Never assume one layer is enough. Think about what layers need to be combined to answer the question fully.
Use locate as the bridge: find what's at a point across ALL relevant layers in one call by passing multiple layer IDs.
Map user concepts to multiple layers. Users say "water bodies" not "wris_rivers." Translate:
"water bodies/water" → wris_rivers, wris_reservoirs, bp_wetlands, bp_ramsar, wris_basin, wris_subbasin, wris_canals
"groundwater/aquifer/water table" → cgwb_aquifers, cgwb_gw_extraction, mi6_wells_districts
"wells/borewells/tubewells/irrigation pumps" → mi6_wells_districts (census counts per district, 2017-18)
"forests/green cover/ecology" → soi_forests, gs_wildlife, bm_eco_zones, biogeographic_zones
"agriculture/farming/cropping zones" → agro_ecological_zones, agro_climatic_zones, corestack_lulc_blocks (land use and cropping intensity by block, modelled)
"places/POIs/shops/restaurants/ATMs/schools/hospitals by name" → overture_places_india (filter on name or basic_category; 4.4M rows, always add a where or group_by, or use nearby)
"hazards/risks" → seismic_zones, india_flood_inventory
"health/medical" → nic_health
"boundaries/admin" → lgd_states, lgd_districts, lgd_subdistricts, lgd_blocks, lgd_villages
"roads/transport" → gs_highways, airports When unsure, use list_layers with a broad q search and list_categories to discover what's available. Combine ALL relevant layers, not just the first match.
Sky and air over a place: once you have a coordinate (from locate, nearby or a layer row), the mugilu MCP (mugilu.live/mcp, tool conditions_at) gives the live air quality, heat, fog and warnings there. bharatlas answers where; mugilu answers what the sky is doing.
Column naming conventions (vary by source):
State: State_LGD (number), STNAME, stname, state, state_name
District: Dist_LGD (number), DTNAME, dtname, district, dtcode11
Block: Block_LGD, BNAME, block_name, blkcode11
Names are often UPPERCASE in LGD layers, mixed case in other sources
Collect (author your own map): this server also drives collect.bharatlas.com, the crowd map-capture tool in the bharatlas suite.
Create maps ONLINE at collect.bharatlas.com — the browser handles the anti-abuse check, so no account and no API key are needed. Point the user there to make one. They get three share links, each with a token in the URL #fragment: admin (full control), collect (add points), view (read published points).
register_map: paste any collect share link to manage that map here. The link's scope decides what you can do:
view link -> get_map, get_records: read / query / export that map's published points (analyse or back up what has been collected).
collect link -> the above; field capture itself is done in the browser on a phone via the collect link.
admin link -> everything: edit_map (settings), moderate_record (approve/reject), import_points (bulk data you already hold, with a source + rights), and publish.
publish submits a collect map's approved points to the bharatlas catalog FOR REVIEW — nothing is auto-approved. A bharatlas maintainer approves the submission before it goes live; the response's status is "pending" until then. Once approved it is queryable through the read tools above (list_submissions, query_layer, locate).
No accounts: the link is the credential. A tool that needs more than your link allows will say which link you need. create_map is optional and needs COLLECT_API_KEY (request-only); prefer creating online.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_layersA | List available geo layers. Use to discover what data bharatlas has. Returns layer IDs, names, row counts, categories, and download formats. Filter by category (boundaries, city-wards, environment, water, agriculture, transport, etc.), admin level (state, district, block, village, etc.), source, or text search. |
| get_layer_schemaA | Get column names, types, and sample values for a layer. Use BEFORE querying to discover what columns exist and what values they contain. Essential for knowing the right column names for filters. |
| query_layerA | Query a layer's data with filters and grouping. Reads the parquet file at runtime. Supports: select specific columns, filter by column values, group by a column to get counts, and sum numeric columns per group (e.g. roll block areas up to district totals). Use get_layer_schema first to discover column names. Examples: 'airports in Karnataka' -> where: {state: 'KA'}, 'forest types' -> group_by: 'type', 'health facilities in Bihar' -> where: {state: 'BIHAR'}, select: ['name', 'type']. |
| locateA | Given a latitude/longitude, find which administrative boundaries, zones, and regions contain that point. Returns state, district, subdistrict, block, parliament/assembly constituency, pincode, seismic zone, high court jurisdiction, the municipal ward (for the ~30 cities with ward data), and more. The 'where am I?' tool. Also accepts specific layer IDs to check. |
| nearbyA | Find features from a layer that are near a given point, nearest first, within radius_km. Reads the layer's parquet bounding boxes and ranks features by distance to their centres; works for points, polygons and lines. Returns the true count within the radius plus the nearest |
| list_categoriesA | List all data categories with layer counts. |
| get_layer_detailA | Get full metadata for a single layer: download URLs (parquet, pmtiles, geojson, kml, shapefile), attribution, license, feature count, and level metadata. |
| list_submissionsB | List community-submitted geo layers. These are user-contributed datasets under open licenses. Filter by category or search by name. |
| register_mapA | Register a collect map so this server can act on it. Paste the whole share link (e.g. https://collect.bharatlas.com/c//admin#). The token in the #fragment sets your scope: admin = full control, collect = add points, view = read published. New maps are created online at collect.bharatlas.com first (no account or key needed); this registers one you already made. |
| list_my_mapsA | List the collect maps you have registered here (local store), each with its scope. |
| get_mapB | A collect map's metadata + record counts, plus a link to open it in collect. Any registered scope. |
| get_recordsA | A collect map's records as a GeoJSON FeatureCollection — for reading, analysis, or backup/export. view and collect scope return published points; admin can also read pending/rejected via status. Each record's properties._photos lists its photo links (public once the point is approved); _ai holds notes a model wrote from the photo (others see only notes the owner accepted). |
| moderate_recordB | Approve or reject one pending point (needs the admin link). Pass the map id it belongs to. |
| import_pointsA | Bulk-import points you already hold into a collect map (needs the admin link). NOT for synthetic data. Requires a named source + rights confirmation; each row lands with that source as its provenance. |
| edit_mapB | Edit a collect map's settings: name/description/purpose/category/data_year/basemap (needs the admin link). Licence can only change while the map has no records. |
| publishA | Submit a collect map's approved points to the bharatlas catalog for review (needs the admin link). Nothing goes live automatically — a maintainer approves the submission first; the response status is 'pending' until then. Once approved it is queryable via list_submissions / query_layer / locate above. |
| create_mapA | Optional: create a collect map programmatically. Most maps are made online at collect.bharatlas.com (no key needed) — prefer that and register_map the link. This path needs COLLECT_API_KEY (the request-only anti-abuse gate) and auto-registers the new admin link. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
The set cleanly splits into catalog/query tools (list_layers, query_layer, locate, nearby) and collect-map management tools (register_map, get_map, moderate_record, publish), and most boundaries are clear from the descriptions. Minor overlap remains between list_layers and get_layer_detail (both report row counts and formats) and between list_layers and list_submissions, which an agent could pick incorrectly when looking for a specific layer.
Nearly all tools follow a snake_case verb_noun pattern: list_layers, get_layer_schema, query_layer, register_map, edit_map, import_points, moderate_record. A few deviate with bare verbs or adjectives (locate, nearby, publish), which are readable and contextual but break the otherwise predictable pattern.
17 tools is slightly above the ideal range, but the server legitimately spans two surfaces (data catalog querying plus user map administration), and each tool maps to a distinct operation with no filler. The only near-duplicates are list_layers vs get_layer_detail vs list_categories, which could plausibly be folded together.
The map lifecycle is well covered end to end: create/register, list, inspect, read records, moderate, import, edit, publish. The catalog side covers discovery, schema, filtered queries, point-in-polygon lookup and proximity search, but lacks any bounding-box or polygon-area query for layers, and there is no delete operation for registered maps or individual records — gaps an agent would hit in real workflows.