How to Use the Ambee Soil MCP in Mastra AI
Build resilient agricultural automations with Ambee Soil and Mastra AI. Your workflows run reliably, handling errors and retries for you.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Ambee Soil MCP to Mastra AI
Create your Vinkius account to connect Ambee Soil 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.
Automate Irrigation Triggers
Build a workflow that actually works. First, your Mastra agent calls `get_latest_soil` for a specific field. Then, you add a conditional step: if moisture is below your threshold, the agent calls your irrigation system's API. It's simple, declarative logic. Here's the key: if the call to the Ambee Soil MCP server fails for some reason, Mastra's engine automatically retries with exponential backoff. Your critical automations don't just fail silently; they recover.
Create Smart Fertilizer Plans with a Mastra AI Agent
This is for multi-step jobs. Your agent starts by calling `get_soil_properties` to check the pH and organic carbon for a location. Based on those values, your workflow branches to calculate the right fertilizer mix. No complex code, just a clear, logical flow. Next, the agent can use `get_grid_soil` to apply this logic across an entire field, generating a variable-rate application plan. Mastra ensures each step completes successfully before starting the next, giving you a reliable process for complex agricultural planning.
Set Up Scheduled Field Health Monitoring
Deploy a workflow once and let it run. Configure a Mastra agent to execute on a schedule—say, every morning at 6 AM. The agent's job is to call `get_historical_soil` for the past 24 hours across your key fields. If it detects a sudden drop in moisture or an unusual temperature spike, the next step in the workflow triggers an alert to your team's Slack or SMS. This MCP server provides the data, and Mastra provides the reliable, scheduled execution.
Set up Ambee Soil 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 Ambee Soil 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: "ambee-soil-mcp-client",
servers: {
"ambee-soil-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Ambee Soil Agent",
model: openai("gpt-4o"),
instructions: "You have access to Ambee Soil tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Ambee Soil 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 Ambee. 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 Ambee Soil MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Ambee Soil MCP today
We host it, we monitor it, we maintain it. You just paste one token.