How to Use the Farmonaut MCP in Mastra AI
Build automated, resilient crop monitoring workflows by connecting Farmonaut to Mastra AI.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Farmonaut MCP to Mastra AI
Create your Vinkius account to connect Farmonaut to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Automated Water Stress Workflows
The `get_ndwi` tool measures vegetation water content and soil moisture anomalies to detect early crop stress. In Mastra AI, you wire this tool into a workflow that triggers automatically when water indices drop below a specific threshold. If the initial check fails, Mastra AI uses its built-in retry engine to call `get_soil_moisture` at different root depths. The workflow then branches: if deep soil is dry, it executes `get_crop_advisory` to draft an irrigation plan; if not, it logs a minor alert.
All-Weather Field Analysis with MCP
The `get_sar_analysis` tool bypasses cloud cover using synthetic aperture radar to check crop structure and soil wetness. This MCP Server integration allows your Mastra AI agent to monitor fields during heavy rain seasons without failing due to optical satellite limits. The agent evaluates the backscatter values and automatically decides whether to schedule a follow-up optical scan. If the radar data indicates flood risks, Mastra AI initiates an immediate escalation workflow to alert field managers.
Guarding Compliance with Deforestation Alerts
The `get_deforestation_alerts` tool tracks tree cover loss and land clearing using historical satellite imagery. Your Mastra AI agent runs this tool on a cron schedule to audit field boundaries for conservation compliance. When land changes are detected, Mastra AI triggers a conditional branch to cross-reference the area with registered field boundaries from `get_fields`. It flags unauthorized clearing and drafts a compliance report without human intervention.
Set up Farmonaut MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All Farmonaut tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "farmonaut-mcp-client",
servers: {
"farmonaut-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Farmonaut Agent",
model: openai("gpt-4o"),
instructions: "You have access to Farmonaut tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Farmonaut transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Farmonaut. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Farmonaut MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Farmonaut MCP today
We host it, we monitor it, we maintain it. You just paste one token.