Metadata-Version: 2.4
Name: rwasis-mcp
Version: 0.1.7
Summary: MCP server for Rwanda's national soil information system (RwaSIS), operated by Rwanda Agriculture Board (RAB)
Project-URL: Homepage, https://github.com/sbakire/rwasis-mcp
Project-URL: Documentation, https://inzira-api.netlify.app
License: MIT
License-File: LICENSE
Keywords: agriculture,mcp,rab,rwanda,rwasis,soil
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.10
Requires-Dist: httpx>=0.24.0
Requires-Dist: mcp[cli]>=1.0.0
Description-Content-Type: text/markdown

# rwasis-mcp

MCP server for [RwaSIS](https://rwasis.rab.gov.rw) — Rwanda's national soil information system, operated by the Rwanda Agriculture Board (RAB).

Part of the [Inzira project](https://inzira-api.netlify.app) — Layer 2.

## Installation

```bash
pip install rwasis-mcp
```

## Usage

### With Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "rwasis": {
      "command": "rwasis-mcp"
    }
  }
}
```

### With `mcp` CLI

```bash
mcp run rwasis-mcp
```

## Tools

### `get_crops`

Returns all crops registered in the RwaSIS system.

**Returns:** List of crops — Bean, Cassava, Rice, Potato, Maize, Wheat.

> Note: only Potato and Rice currently have fertilizer recommendations.

---

### `get_soil_by_location`

Returns soil data and fertilizer recommendations for a Rwanda location.

**Parameters:**

| Name | Type | Description |
|------|------|-------------|
| `name` | string | Village, cell, sector, or district name (e.g. `Gasabo`, `Kigali`) |

**Returns:** `carbon`, `calcium`, `potassium`, `phValues`, `erosionRisk`, `erosionRecommendation`, `potatoFertilizerRecommendation`, `riceFertilizerRecommendation`, `boundary`.

> Note: the `/boundaries?name=` endpoint currently returns empty arrays for all locations — the soil data tables appear not yet populated on the RAB side. This is a known issue raised with RAB.

---

### `get_soil_by_upi`

Returns parcel location and soil data for a Rwanda UPI (parcel identifier).

**Parameters:**

| Name | Type | Description |
|------|------|-------------|
| `upi` | string | Rwanda parcel UPI, e.g. `1/03/08/04/2148` |

**UPI format:** `Province / District / Sector / Cell / Parcel`

| Part | Format |
|------|--------|
| Province | single digit (1–5) |
| District | two digits |
| Sector | two digits |
| Cell | two digits |
| Parcel | four digits |

**Returns:** resolved location (province, district, sector, cell, village), parcel boundary polygon, and fertilizer recommendations for Potato and Rice where available.

**Example response for `1/03/08/04/2148`:**
- Location: Kigali City → Kicukiro → Masaka → Gitaraga → Kabeza
- Rice fertilizer: NPK 17-17-17 at 200 kg/ha, Urea at 100 kg/ha

## License

MIT
