← Docs

MCP for AI assistants

Nextfarm's Model Context Protocol server lets Claude, ChatGPT or your own assistant read farm data using a regular API key. What the assistant can do is decided by the key's scopes.

Address
Productionhttps://api-prod.nextfarm.vn/api/v1/mcp
Sandboxhttps://api-dev.nextfarm.vn/api/v1/mcp

1. Create a key

In Manage › API keys, create a dedicated key for the assistant with only the read scopes it needs.

2. Connect the assistant

Claude Desktop — claude_desktop_config.json
{
  "mcpServers": {
    "nextfarm": {
      "url": "https://api-prod.nextfarm.vn/api/v1/mcp",
      "headers": { "Authorization": "Bearer nfk_..." }
    }
  }
}
Claude Code
claude mcp add --transport http nextfarm https://api-prod.nextfarm.vn/api/v1/mcp \
  --header "Authorization: Bearer nfk_..."

Tools

ToolWhat it doesScope
farm_searchQuick search across parcels, seasons, farmers, devices, lots, QR labels, certificatesper-section scopes
farm_list_parcels · farm_get_parcelParcelsgis.parcels.view
farm_list_seasonsSeasons by yeargis.parcels.view
iot_list_devicesDevices and connection statusiot.devices.view
iot_latest_readings · iot_readings_historySensor readingsiot.telemetry.view
iot_list_alertsAlertsiot.alerts.view
harvest_list_recordsHarvest recordsfarm-harvest.harvest.view
trace_list_lots · trace_get_lotTraceabilityfarm-harvest.trace.view
cert_list_expiringExpiring certificatesfarm-harvest.certification.view
book_list_tables · book_query_recordsRead farm booksoffice.base.record.view
book_add_recordWRITE: add a book rowoffice.base.record.manage
There are no device-control tools. If a key lacks the scope for a tool, the tool answers plainly "key is missing a scope (needs …)" so the assistant can tell you instead of guessing.

The server is stateless and never stores keys: each request uses exactly the key you send, and every scope rule applies as if you called the API directly.

Full security rules for partners: Security →