Agal One MCP
Connect your assistant to your site.
Agal One is a Model Context Protocol server. ChatGPT, Claude, Claude Code and any other MCP client can read your twin — areas, plots, devices, nodes and their programs — and propose changes you confirm in the app. No API keys: you sign in with your phone number, the same way you sign in here.
https://mcp.agal.oneSign in to see your connectionsAdd the connector
In your assistant, add a custom MCP connector and paste https://mcp.agal.one.
Sign in — that's it
The assistant opens agal.one. Sign in with your phone number and the one-time code, read what it will be able to do, and approve. Revoke it here any time.
Supported clients
ChatGPT
- 1Open Settings → Connectors (or Apps) and choose Add a custom connector.
- 2Name it Agal One and paste the server URL https://mcp.agal.one.
- 3ChatGPT opens agal.one — sign in with your phone number and the one-time code, then approve.
- 4Start a chat, enable the Agal One connector, and ask (for example) “What is running on my farm right now?”
Connection by sign-in — the assistant never sees a password or a key.
How it works
Every tool runs under your identity and your access roles, and every call is written to your activity log as a delegated action — you always see what an assistant did and when. The tools come in three tiers.
Read
Answers from your twin within your access. Never changes anything.
- get_site_context
- get_asset_status
- query_telemetry
- get_layout
- get_program
- get_events
- validate_program
Propose
Validates the input and stores a proposal you confirm in Agal One — the confirm card runs the change under your own account, then records the outcome; unconfirmed proposals expire after 24 hours. One exception you switch on per assistant: edits (layout, plots, collections, views) can apply at once and land in your inbox as applied, with Undo. Programs, schedules and port links always wait for you.
- create_collection
- create_plot
- place_on_layout
- link_card_to_port
- write_asset_program
- write_node_program
- create_or_change_schedule
- design_view
Act
Switching, opening or running a plot. Agal Assist inside the app acts at once for owners, editors and controllers; a connected assistant’s act is held as a proposal you confirm within 10 minutes.
- switch
- pause_automation
- resume_automation
- open_plot
- close_plot
- run_plot
- set_variable
An example
- You: “Water plot 1 every morning at 6 for 30 minutes.”
- The assistant calls
get_site_contextandget_program, restates the plan, then callscreate_or_change_schedule. - Agal One shows a confirm card — in the app, in Agal Assist, or below on this page. You approve; the schedule is written to the node’s program and the node acknowledges it.
- From then on the node runs the schedule by itself, even while your phone and the cloud are away.
Skills to run your site
A skill is a written procedure the assistant follows — which tools to call, what to ask, what never to invent. The server publishes them as MCP prompts, so the same skill runs in ChatGPT, Claude, Claude Code and in Agal Assist. Try one from its example.
Build the tank fill rule
Set up a building's overhead-tank automation in the node program — start the pump below a low level, stop above a high level, a maximum fill time, overflow and empty alerts — from the person's description of the tank and pump.
“The tank is 1000 litres, the pump fills it in about 15 minutes. Start filling when it is a quarter full and stop just before the top; tell me if it ever overflows.”
Takes nodeUid (optional).
Design my plots and valves
Turn a spoken or typed description of a field into plots on the layout, one valve per plot (or a manual plot with a flow switch), linked to the node's valve stations. Ends with the person confirming the drawing on the canvas.
“My east field has three rows of banana on the left and a coconut block on the right; the pump house is at the road side. Set up two plots with a valve each and a manual plot for the coconut.”
Takes fieldId (optional).
Give my pump a detail view
Design an asset's card and detail view as a dynamic-interface descriptor bound to its automation-block variables (a gauge for current, a toggle for power, a chart, the protection status), previewed and confirmed in the app. HTML only when the descriptor cannot express what the person wants.
“Make my pump's page show a big current gauge, the power switch, whether all three phases are present, and a chart of today's runs.”
Takes assetId, slot (optional).
Protect my pump
Review and tune the pump's protection rules in its Asset Automation Block — dry-run cutoff relative to the learned running current, phase loss on three-phase, maximum run time in the node program — and explain each rule in plain words. There are no hard rails; these are the rules the pump relies on.
“My pump is a 5 HP three-phase. It tripped twice last week when the well went low. Check that it is protected.”
Takes assetId (optional).
Set this week's irrigation
Create or change the per-plot schedules in the node's program from a spoken plan ("plot 1 every morning at six for half an hour, plot 2 on alternate days"), respecting one pump and the maximum run time. Runs on the node even when the phone and the cloud are away.
“Water plot 1 every morning at 6 for 30 minutes and plot 2 on Monday, Wednesday and Friday evenings for 45 minutes.”
Takes nodeUid (optional).
Why did plot N get no water?
Diagnose a missed or short irrigation from the twin's own records — events, program acknowledgement, node online history, valve and flow variables, current — and say in plain words what happened and what to change.
“Plot 3 should have been watered this morning but the soil is dry. What happened?”
Takes plotId, when (optional).
Confirmation and cost
What an assistant can and cannot do
- Read tools answer within your access. A viewer’s assistant reads what a viewer reads.
- Proposals are cards you confirm; unconfirmed proposals expire after 24 hours. Per assistant you can switch on apply edits directly: layout placements, plots, collections and views then apply at once and appear in your inbox as applied, with Undo. Programs, schedules and port links always wait for your confirmation.
- Acts (switch, open, close, run a plot) from a connected assistant are always held for your confirmation and expire after 10 minutes — no switch can change that. Agal Assist inside the app acts at once for owners, editors and controllers.
- Every proposal that waits for you is pushed to your phone; approve or refuse from the notification.
- Removing or disabling a protection rule is allowed — there are no hard rails — but the card names the risk and asks you to acknowledge it.
- Every call is logged as a delegated action beside your own, with the assistant’s name and the tool.
- Disconnecting an assistant refuses its next call.
Cost and limits
- Tool calls count against your Agal Assist usage — the same meter as the in-app assistant, shown under Billing.
- Rate limits: 300 calls per hour per connected assistant, 600 per hour per account.
- Telemetry queries cover at most 168 hours and 50 points per series per call.
- The assistant’s own subscription (ChatGPT, Claude) is separate and is not billed by Agal One.
Tool reference
| Tool | Tier | Needs | What it does |
|---|---|---|---|
| get_site_context | Read | viewer | Containers (fields with plots; collections), cards, nodes with capabilities and program status, water sources and node programs visible to the caller. Called first; its ids feed every other tool. |
| get_asset_status | Read | viewer | Live state of one asset: power, block variable values, port readings, program acknowledgement, node online. |
| query_telemetry | Read | viewer | Stored series for an asset over a window (up to 168 h): count, latest / min / max / average, trend, sampled points. |
| get_layout | Read | viewer | The layout: plots, lines, valve / motor / sensor nodes with their plot, water sources, background. |
| get_program | Read | viewer | The node's program (NAB, compiled version and acknowledgement) or an asset's block (AAB). |
| get_events | Read | viewer | What happened: runs, alerts, faults, interruptions, program changes, delegated actions, with who or what caused each. |
| validate_program | Read | viewer | Dry-run validation of a program (schema, semantics, expressions) without storing it. Returns errors with rule and variable ids. |
| create_collection | Propose | owner | Create a collection of assets with an optional site location (deprecated with ADR-022; areas replace it). |
| create_plot | Propose | editor | Create a plot in an area from a polygon, or from an approximate size you place on the layout later. |
| place_on_layout | Propose | editor | Draft placements on a layout: plots, valve / motor / sensor nodes, lines, water sources, background. You adjust and confirm on the canvas. |
| link_card_to_port | Propose | owner | Link an asset to node ports; the ports become the block's node variables. Verified against the node's reported ports. |
| write_asset_program | Propose | editor | Write (replace) an asset's block: variables, rules, settings. Validated before it is stored; removing a protection rule names the risk in the confirm card. |
| write_node_program | Propose | editor | Write (replace) a node's program: asset / local / alert variables, schedules, rules, settings, plots, the pump variable. |
| create_or_change_schedule | Propose | editor | Add, change or remove a schedule in the node's program (per plot: days, start or sun event, duration). |
| design_view | Propose | editor | Design an asset's card or detail view: a descriptor bound to the asset's variables (rendered natively) or a self-contained HTML view for a sandbox. Previewed and confirmed in the app. |
| switch | Act | controller | Switch an asset on or off (pump, valve, lighting circuit), optionally for a number of minutes. Pause first: while its node runs its automation and a layout rule or the instruction switches that output, it is refused — the assistant offers to pause. |
| pause_automation | Act | controller | Pause a node's automation so its assets can be switched by hand, and apply the switch that asked for it. Its rules and instructions wait until someone resumes it. Always confirmed by you, whoever asks. |
| resume_automation | Act | controller | Resume a node's automation: what was switched on by hand is switched off, pump first, unless a schedule has it on; then its rules and instructions run again. |
| open_plot | Act | controller | Open a plot's valves (and, under the default program, start the pump after the valve-energise delay). |
| close_plot | Act | controller | Close a plot's valves (the pump stops first under the default program). |
| run_plot | Act | controller | Run a plot for a number of minutes; ends on time. |
| set_variable | Act | controller | Write a settable variable of an asset's block (a rated current, a fill level). |
Questions
›Which assistants work?
Any client that speaks MCP over streamable HTTP with OAuth sign-in: ChatGPT, Claude (web and desktop), Claude Code, Cursor and others. Command-line tools can use a token instead.
›Can an assistant switch my pump on by itself?
Not from outside the app. A connected assistant's switch is a proposal you confirm within 10 minutes, and no setting changes that. Inside Agal One, Agal Assist can act at once if your role allows it, and the node's program still applies — a pump start with no open valve is refused with a message.
›Can I skip the confirm step?
For edits, yes: on Your connections, switch on apply edits directly for an assistant. Layout placements, plots, collections and views it proposes then apply at once and show in your inbox as applied, with Undo for the layout. Programs, schedules, port links and acts always wait for your tap — now delivered to your phone as a notification. Your assistant may have its own per-tool approval setting too; that one is yours to set on its side and does not replace this one.
›Does it work in Tamil?
Yes. The skills are written for the person's own language; the assistant reads and writes the program in the same document either way.
›What does the assistant see?
Exactly what your role sees in the app: your areas, plots, devices, nodes, programs, water sources and history. Nothing from other accounts, ever.
›How do I disconnect?
Sign in, open Your connections on this page, and disconnect the assistant. Its next call is refused. Revoking from the assistant's side works too.
›Is there a cost?
Tool calls count as Agal Assist usage on your bill, like the in-app assistant. Your assistant's own subscription is separate.