Skip to main content
Glama

AgroAgent

チリ農業分野に特化したAIエージェント。Model Context Protocol(MCP) を介したエージェントアーキテクチャで構築。モノリシックなバックエンドの代わりに、4つの独立したMCPサーバーが専門ツールを公開し、オーケストレーターがAnthropic SDKによるエージェントループを通じて調整する。

アーキテクチャ

apps/
  web/            Next.js 16 + TypeScript + Tailwind v4 + Recharts
  orchestrator/   FastAPI -- MCP host + agent loop (Anthropic SDK) + rutas REST de dashboard
mcp-servers/
  mcp-weather/    tool: get_weather_forecast (Open-Meteo)
  mcp-prices/     tool: get_commodity_price (datos abiertos ODEPA)
  mcp-db/         tools: get_farmer_history, register_planting (PostgreSQL/SQLAlchemy async)
  mcp-rag/        tool: search_sag_documents (RAG sobre normativa SAG -- Pinecone + Voyage AI)
packages/
  shared-types/   Modelos Pydantic compartidos entre orchestrator y mcp-servers

オーケストレーターはMCPクライアントとして4つのサーバーに接続し、それらのツールカタログを1つに集約して、以下を公開する:

  • POST /chat -- 会話エンドポイント(Claudeがコンテキストに応じて使用するツールを決定)

  • GET /weatherGET /farmers/{id}/historyGET /prices/trend -- ダッシュボード用の決定論的RESTルート。LLMを介さずにツールを直接呼び出す

このプロジェクトの価値は各ソースを個別に公開することではなく、エージェントがそれらをクロス参照することにある。例えば、農家の作付け履歴を地域の予報や製品の現在価格と関連付け、該当する場合は正確なSAG決議を引用しながら具体的な意思決定を提案する。

Related MCP server: leafengines-mcp-server

スタック

  • バックエンド: Python 3.12+、FastAPI、mcp SDK(v2)、SQLAlchemy async + asyncpg、Pinecone、Voyage AI、Anthropic SDK、uv(モノレポワークスペース)

  • フロントエンド: Next.js(App Router)、TypeScript、Tailwind CSS v4、Recharts、pnpm

  • データ: PostgreSQL(Docker)、Open-Meteo API、ODEPA(CKAN datastore API)、SAG規制文書

要件

  • Python 3.12+ および uv

  • Node 20+ および pnpm

  • Docker(PostgreSQL用)

  • APIキー: Anthropic、Pinecone、Voyage AI

セットアップ

# Backend (Python workspace completo)
uv sync --all-packages

# Frontend
cd apps/web && pnpm install && cd ../..

# Base de datos
docker compose up -d postgres

apps/web/.env.local を作成:

NEXT_PUBLIC_ORCHESTRATOR_URL=http://localhost:3001

プロジェクトの起動(6プロセス)

# Terminal 1
uv run --package mcp-weather uvicorn mcp_weather.app:app --reload --port 4001

# Terminal 2
uv run --package mcp-prices uvicorn mcp_prices.app:app --reload --port 4002

# Terminal 3 (ajusta el puerto de Postgres si no usas el 5432 por defecto)
DATABASE_URL="postgresql+asyncpg://agroagent:agroagent@localhost:5432/agroagent" \
  uv run --package mcp-db uvicorn mcp_db.app:app --reload --port 4004

# Terminal 4
PINECONE_API_KEY="..." VOYAGE_API_KEY="..." \
  uv run --package mcp-rag uvicorn mcp_rag.app:app --reload --port 4005

# Terminal 5
ANTHROPIC_API_KEY="..." \
  uv run --package orchestrator uvicorn orchestrator.app:app --reload --port 3001

# Terminal 6
cd apps/web && pnpm dev

フロントエンド: http://localhost:3000

アーキテクチャ上の決定事項

  • MCPトランスポート: stdioではなくstreamable-HTTP -- 各MCPサーバーは独自のポート/コンテナを持つ独立したサービスであり、実際のマイクロサービスデプロイメントにより忠実。

  • NestJS/TypeScriptではなくPython/FastAPIバックエンド: 市場の需要とポリグロットな汎用性を示すための意図的な決定(フロントエンドはTS/Reactのまま)。

  • RAG: チャンク分割は固定文字数ではなく、チリの法的決議の番号構造(2.13.1.1 など)を尊重。各チャンクのメタデータには決議番号が含まれ、エージェントがソースを引用できるようにしている。

  • エージェントから分離されたRESTルート: ダッシュボードは決定論的データ(天候、履歴、価格)にLLMを介さない -- 不要なコストとレイテンシーを回避。両レイヤーは基盤となる同じMCPツールを再利用する。

既知の制限事項 / 未対応事項

  • 認証なし: farmer_id は明示的に渡され、ユーザーセッションはない。

  • 新しい農家を作成するルート(POST /farmers)は存在しない -- テストレコードは手動で挿入された。

  • mcp-rag はテキストレイヤーのないスキャンPDFをサポートしていない(OCRが必要)。

  • サービスごとの個別のDockerfileはない -- docker-compose.yml はPostgreSQLのみをカバーしている。

  • mcp-db の作物名は、mcp-prices のODEPA製品名に対して正規化されていない。

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that provides real-time access to Brazilian agricultural data, including commodity prices, crop estimates, climate information, and deforestation rates. It integrates data from 19 public sources like CEPEA, CONAB, and IBGE to enable LLMs to analyze the Brazilian agribusiness sector.
    10
    26
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    EU Crop Intelligence MCP Server — Yield forecasts, weather analysis, and phenology models for 15 countries. AI agent-native, multi-source intelligence (NASA POWER, Eurostat, Open-Meteo).
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP Server for accessing 36 Brazilian public data sources and 1 agent, enabling AI agents to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP server connecting AI agents to non-custodial staking data across 130+ networks.

  • Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/craguila14/agroagent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server