Skip to main content
Glama
Khaif004

SIA MCP Server

README.md
# sia-mcp-server

MCP server for the **SAP Intelligent Agriculture (SIA)** farming platform

## Tools

### Area Management
| Tool | Description |
|------|-------------|
| `sia_get_areas` | List geographic areas (field/crop zone boundaries) |
| `sia_create_area` | Create a new area with GeoJSON boundary |
| `sia_delete_area` | Delete an area by ID |

### Farm & Field
| Tool | Description |
|------|-------------|
| `sia_get_farms` | List farms |
| `sia_get_fields` | List fields |
| `sia_create_field` | Create a field linked to a farm and area |
| `sia_get_field_characteristics` | List field characteristic values |
| `sia_create_field_characteristic` | Attach a characteristic value to a field |

### Crop Zones
| Tool | Description |
|------|-------------|
| `sia_get_crop_zones` | List crop zones |
| `sia_create_crop_zone` | Create a crop zone |
| `sia_delete_crop_zone` | Delete a crop zone |
| `sia_get_crop_zone_kpis` | Get KPIs for a crop zone |
| `sia_create_crop_zone_kpi` | Add a KPI to a crop zone |
| `sia_get_crop_zone_characteristics` | List crop zone characteristic values |
| `sia_create_crop_zone_characteristic` | Attach a characteristic value to a crop zone |

### Reference Data
| Tool | Description |
|------|-------------|
| `sia_get_perennials` | List perennial plants |
| `sia_create_perennial` | Create a perennial plant record |
| `sia_get_seasons` | List agricultural seasons |
| `sia_get_varieties` | List crop varieties |
| `sia_get_kpi_definitions` | List available KPI definitions |
| `sia_get_locations` | List locations (e.g. assembly points) |
| `sia_get_location_types` | List location types |
| `sia_create_location` | Create a location |
| `sia_delete_location` | Delete a location |
| `sia_get_characteristic_configurations` | List characteristic configurations |

## Setup

```bash
npm install
cp .env.example .env
# Fill in your credentials in .env
npm run build
```

## Running

**stdio (default, for Claude Desktop / MCP clients):**
```bash
node dist/index.js
```

**HTTP server:**
```bash
TRANSPORT=http node dist/index.js
# Server listens on http://localhost:3000/mcp
```

## Claude Desktop config

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "SIA Connector": {
      "command": "node",
      "args": ["/absolute/path/to/sia-mcp-server/dist/index.js"],
      "env": {
        "SIA_BASE_URL": "https://jupiter-farming.cfapps.eu10.hana.ondemand.com",
        "SIA_TOKEN_URL": "https://farmers-app-rcbhth9g.authentication.eu10.hana.ondemand.com/oauth/token",
        "SIA_CLIENT_ID": "your_client_id",
        "SIA_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}
```

## Demo Sequence

The Bruno collection includes a 10-step demo that creates a complete field record:

1. Create area for field boundary
2. Create area for crop zone boundary  
3. Create field
4. Set field characteristic (external plot ID)
5. Create perennial plant
6. Create crop zone
7. Add total production KPI
8. Add per-tree production KPI
9. Set tree count characteristic
10. Set productive tree count characteristic

This full workflow can be orchestrated by an LLM using this MCP server.

TDQS

A3.7/5.0

Scored across 25 tools

Disambiguation5/5

Each tool targets a unique combination of entity and action (create, get, delete). There is no overlap; even the lookup tools (e.g., sia_get_seasons, sia_get_varieties) are for distinct reference data.

Naming Consistency5/5

All tools follow the consistent pattern 'sia_<verb>_<entity>' with snake_case. Verbs are consistently 'create', 'get', or 'delete', and the entity names are in lowercase. The pattern is uniform across all 25 tools.

Tool Count4/5

25 tools cover a broad agricultural domain including areas, fields, crop zones, perennials, locations, characteristics, KPIs, and reference data. While slightly above typical range, each tool serves a clear purpose and the count is justified for the scope.

Completeness2/5

Most entities lack update operations (e.g., fields, perennials, characteristics, KPIs) and some lack delete operations (e.g., fields, perennials). This creates dead ends for agents needing to modify or remove data, limiting workflow completion.

Maintenance

ActivityMaintained
ResponsivenessSyncing