Inspiration

Across rural India, NGO field workers visit smallholder farmers every week — but they do it blind. No morning briefing, no live crop prices, no structured way to log what they saw or who they helped. Supervisors have zero visibility until someone calls or sends a WhatsApp message.

We wanted to fix the coordination gap, not build another dashboard nobody opens. The insight was simple: field teams already use Slack. So instead of asking them to adopt a new tool, we brought the intelligence directly into their existing workflow.


What it does

FarmerLine is a Slack-native coordination and intelligence agent for NGO agricultural field teams across India.

From inside Slack, field workers and supervisors can:

  • /briefing — Get an automated morning briefing: weather, active farmers, and today's visit priorities
  • /weather — Pull live hyperlocal weather for the field area (OpenWeatherMap)
  • /prices — Check real-time mandi (crop market) prices for key crops like rice, wheat, and vegetables — served through a dedicated MCP server, not a direct API call
  • /log — Log a completed farm visit with farmer name, crop status, and notes — persisted to a database
  • Automated 7AM IST briefing — Posted daily to #supervisor-dashboard so the whole team starts informed

Every feature lives inside Slack. No new app. No training. No friction.


How we built it

Layer Technology
Bot framework Slack Bolt SDK (Python)
Slash commands FastAPI + uvicorn
Mandi price lookup MCP (Model Context Protocol) — a dedicated server exposes a get_mandi_prices tool; the bot acts as an MCP client, calling it over stdio instead of hitting the data.gov.in API directly
Scheduling APScheduler (7AM IST daily briefing)
Visit logging SQLite via SQLAlchemy
Weather data OpenWeatherMap API
Crop prices data.gov.in Mandi API + JSON cache fallback, wrapped as an MCP tool
Deployment Railway (Procfile worker)

We built deliberately minimal — confirming each API worked before writing any dependent code. The mandi API returned a 502 during development, so we implemented a mandi_cache.json fallback immediately, ensuring the bot stays functional even when external data sources fail. That same fallback logic now lives inside the MCP server, so /prices stays resilient whether the request goes out live or falls back to cache.


Challenges we ran into

  • Mandi API reliability — data.gov.in returned 502 errors intermittently. We built a cache fallback so /prices never breaks for users even when the upstream source fails.
  • Background workers on free hosting — Render required a paid plan for persistent background workers. We switched to Railway with a Procfile to keep APScheduler running reliably for the daily briefing.
  • Moving from a direct API call to a real MCP integration — /prices originally called the mandi API directly from the bot. We restructured it so the bot is an MCP client and the price lookup runs as an independent MCP server process, communicating over stdio. The hardest part was bridging Slack Bolt's synchronous command handlers with MCP's async client session — solved with a small sync wrapper so the rest of the bot's code didn't need to change.
  • Framing the right user — Our initial idea targeted farmers directly, but farmers don't use Slack. Reframing to NGO field workers and supervisors made the product far more realistic and the social impact story far stronger.

Accomplishments that we're proud of

  • A fully functional Slack agent with 5 working features deployed to production
  • A genuine MCP server integration — not a bolted-on wrapper, but a real client-server tool call that decouples the price-lookup logic from the bot itself, so the same server could be reused by other clients later
  • Zero-friction adoption — built entirely inside Slack, the tool field teams already use
  • A cache-resilient architecture that handles upstream API failures gracefully, now carried through the MCP layer
  • Scoped and shipped the entire project within the hackathon window without scope creep

What we learned

  • Coordination is the real problem — NGOs don't lack data; they lack a structured way to act on it together. FarmerLine's value is in the workflow layer, not the data layer.
  • "Why Slack?" has a real answer — It's not about convenience. It's about meeting field workers inside the tool they already use for team communication, so adoption is zero-effort.
  • MCP is a real architectural choice, not just a checkbox — separating the price-lookup tool from the Slack bot forced us to think about FarmerLine's data sources as reusable services rather than code buried inside one handler.
  • Minimal builds ship — Deferring non-essential modules until core API functionality was confirmed kept the project on track and the codebase clean.

What's next for FarmerLine

  • Hindi language support — making the bot accessible to field workers across Hindi-speaking states where NGO reach is widest
  • Multi-region rollout across India's major agricultural zones
  • Supervisor dashboard with aggregated visit analytics
  • Farmer profile database linked to visit history
  • Integration with government crop advisory APIs via additional MCP tools
  • Voice input for field workers in low-literacy contexts

Built With

Share this project:

Updates

Submission history