AA

alumnx-ai-labs/agrigpt-backend-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

0 stars 6 forks 品質 61 トレンド 0MIT

This is the repository containing the MCP code for the AgriGPT project

概要

A Model Context Protocol (MCP) server for agricultural intelligence, providing tools for pest/disease lookup, government scheme discovery, and SME knowledge retrieval via semantic search. - — RAG-powered lookup for crop pest and disease information - — RAG-powered search for agriculture-related government schemes by type and state - — Semantic search over a Pinecone knowledge base (SME-Divesh namespace) - — Dual interface: MCP protocol (via FastMCP) and plain REST (/callTool) - Python 3.9+ - Dependencies (install via pip install -r requirements.txt): Create a .env file in the project root with the following variables: Query the RAG system for information about pests and diseases affecting crops. Query the RAG system for government schemes related to agriculture. Semantic search over the SME-Divesh Pinecone namespace using all-MiniLM-L6-v2 embeddings. All tools are also callable via the /callTool POST endpoint:

README

以下は原文 README の抜粋です。原文を見る。

Alumnx MCP Server

A Model Context Protocol (MCP) server for agricultural intelligence, providing tools for pest/disease lookup, government scheme discovery, and SME knowledge retrieval via semantic search.


Features

  • Pests & Diseases — RAG-powered lookup for crop pest and disease information
  • Government Schemes — RAG-powered search for agriculture-related government schemes by type and state
  • SME Divesh — Semantic search over a Pinecone knowledge base (SME-Divesh namespace)
  • MCP + REST — Dual interface: MCP protocol (via FastMCP) and plain REST (/callTool)

Requirements

  • Python 3.9+
  • Dependencies (install via pip install -r requirements.txt):
fastmcp
pinecone
sentence-transformers
python-dotenv
uvicorn
httpx
fastapi

Environment Variables

Create a .env file in the project root with the following variables:

Variable Required Description
PESTS_DISEASES_RAG_URL ✅ Base URL of the Pests & Diseases RAG service
GOVT_SCHEMES_RAG_URL ✅ Base URL of the Government Schemes RAG service
PINECONE_API_KEY ✅ API key for Pinecone
PINECONE_INDEX ✅ Name of the Pinecone index to query
RAG_TIMEOUT ❌ HTTP timeout in seconds for RAG calls (default: 30)

Example .env:

PESTS_DISEASES_RAG_URL= ___URL__
GOVT_SCHEMES_RAG_URL= __URL__
PINECONE_API_KEY=your-pinecone-api-key
PINECONE_INDEX=your-index-name
RAG_TIMEOUT=30

Running the Server

python alumnx_mcp_server.py

The server starts on port 9000 by default.

Endpoint Description
/mcp MCP protocol endpoint (FastMCP)
/callTool REST tool call endpoint
/list-tools Lists all available tools
/health Health check

MCP Tools

pests_and_diseases

Query the RAG system for information about pests and diseases affecting crops.

Parameter Type Required Default Description
pest_name string ✅ — Name of the pest or disease
crop string ❌ "General" Crop affected by the pest or disease

Example response:

{
  "status": "success",
  "information": "...",
  "sources": ["..."]
}

govt_schemes

Query the RAG system for government schemes related to agriculture.

| Parameter | Type | Required | Default | Description |

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →