Endpoints
MCP server
Connect an AI assistant directly to NARC's data. Add one URL and the assistant can look up soil, fertilizer doses, cropland, crop practices and pest guidance itself, with no API glue to write.
/mcp
What this is
The Model Context Protocol is an open standard for giving an AI assistant tools it can call. This is a remote MCP server: it runs here, on this site, and a client connects to it by URL. There is nothing to install and nothing to keep updated.
It answers the same questions as the REST API above, but the assistant
decides which call to make. Ask “what fertilizer should I use
for rice near Dharan?” and it resolves the coordinates, calls
soil_point_query, reads the soil rating and gives you the
dose, in one step.
The MCP server and the REST API compute through the same code, so they can never give different answers for the same input. Which one you want depends on the caller: REST for your own software, MCP for an AI assistant.
Connect
The server URL is:
Add it to any client that supports remote MCP servers over HTTP. The panel on the right has the exact commands; in short:
-
Claude Code: run the
claude mcp addcommand in the cURL tab. - Claude Desktop and most desktop clients: add the JSON block to your MCP settings file.
- Anything else: point it at the URL above and choose the streamable HTTP transport. There is no SSE endpoint and no session id to manage.
To check the server by hand before wiring up a client, the Python tab
shows a plain tools/list call.
Authentication
The same API keys as the REST API. Send one as a bearer token:
X-API-Key and Authorization: Api-Key work too.
A key is required: without one the server answers 401 and says where
to create one. Keys are free.
Calls are counted against your key in the same usage totals as your REST calls, so your dashboard shows both together.
Rate limits
1000 tool calls per hour.
No limit. Ask us if you need one.
Hourly rather than the REST API's daily allowance: an assistant answering one question can make a dozen lookups, and a per-day budget would be gone in a single conversation. Only tool calls count; connecting and listing the tools is free.
Tools
Seven tools. Your assistant picks between them; you never name one directly.
Soil properties and fertilizer recommendations for one location in Nepal. Returns pH, organic matter, total nitrogen, P2O5, potassium, boron, zinc and texture (sand/silt/clay), each with a Low/Medium/High rating, plus elevation, the province, district and palika it falls in, the parent soil type, and doses in kg per kattha of MOP, DAP and three urea splits for maize, rice and wheat (OPV and hybrid where both exist). Answers only over mapped cropland.
Zonal soil statistics for a drawn polygon: min, max, mean and median of every soil property across the area, nutrient-deficiency pixel counts, the parent soil types present with their areas, a count of houses, and fertilizer recommendations computed from the area's mean values. Use this for a field, a farm or a village; use soil_point_query for a single spot.
Land-use and access summary for a drawn polygon: cropland and wheatland area in hectares, the mix of crop types, road access, a count of houses, and the five nearest airports and cities with distances in kilometres. Complements soil_area_summary, which covers the soil itself.
NARC's best-management-practice guide for one crop: the steps, descriptions and illustration URLs for land preparation, nursery, transplanting, top dressing, harvesting and post-harvest. Pass a section to get just that stage.
Pests and diseases recorded for one crop, each with a description, a photograph URL for identification, and NARC's recommended management. Covers cauliflower, onion and tomato.
The NARC data catalogue: every published soil and crop dataset with its identifier, one-line summary, category, unit and resolution. Call describe_dataset for the full record and the download links.
The full catalogue record for one dataset: description, keywords, spatial extent and CRS, publisher, licence, and every distribution with an absolute download or API URL.
Coverage and limits
- Coordinates are WGS 84 decimal degrees and must fall inside Nepal (latitude 26.3 to 30.5, longitude 80.0 to 88.2).
- The point and area tools answer over mapped cropland only. Ask about a city centre and the tool says so rather than guessing.
- An area polygon must be under 1 square degree, roughly 110 × 110 km. Give it as WKT or GeoJSON.
- Crop practice guides cover Cauliflower, Rice, Tomato, Onion, Maize, Wheat. Pest and disease guides cover Cauliflower, Onion, Tomato.
- Fertilizer doses are kg per kattha (manure t/ha, zinc and boron kg/ha) and are advisory: they come from regional trial tables adjusted for the mapped soil, not from a test of your own field.
When a call fails
The protocol separates two kinds of failure, and your assistant treats them differently.
- A tool that could not answer: bad coordinates, no cropland there, an unknown crop, rate limited. The assistant gets a readable message naming the remedy and can correct itself or explain the problem to you.
- A protocol error: a malformed call, or a fault on our side. Server faults are logged here and never leak internal detail into the response.
Data returned through MCP is published under the same NARC licence as the REST API: attribution required, non-commercial, non-derivative.