pesticide-mcp

pesticide-mcp

A Model Context Protocol server for querying Japanese pesticide registration information from FAMIC CSV data. Provides tools to search pesticides, retrieve applications, and check registered uses with detailed safety notices.

Category
Visit Server

README

pesticide-mcp

FAMIC が公開する農薬登録情報 CSV を取り込み、ローカル DB に正規化し、Claude Code から MCP 経由で検索・照会できるようにする MVP プロジェクトです。

注意: 本ツールが返すのは農薬登録情報の検索結果であり、使用可否を保証するものではありません。実際に使用する前に、製品ラベルと最新の農薬登録情報を必ず確認してください。

ドキュメント

  • CLAUDE.md: プロジェクト方針と運用ルールの要点
  • docs/MVP_DESIGN.md: 設計(アーキテクチャ、データモデル、検索仕様、MCP tool 仕様)
  • docs/BACKLOG.md: マイルストーンとバックログ
  • docs/DEVELOPMENT.md: 開発ガイド(技術スタック、環境変数、実行コマンド)

必要要件

  • Python 3.12+
  • uv

セットアップ

# 依存関係のインストール
uv sync

# Lint / format
uv run ruff check .
uv run ruff format .

# テスト
uv run pytest

データの取り込み

FAMIC の農薬登録情報 CSV/ZIP を data/raw/ に配置してから取り込みます。

uv run python -m pesticide_mcp.import_famic --source-dir ./data/raw --db ./data/pesticides.duckdb

FAMIC の登録基本部(例: R0807010.zip)と登録適用部一・二(例: R0807011/012.zip)を data/raw/ に置いて実行します。ZIP のまま取り込めます。主なオプション:

  • --source-month YYYY-MM: 更新年月を明示(省略時はファイル名から推定)
  • --dry-run: DB へ書き込まず解析・検証のみ

再実行しても pesticides / applications の内容は同じになります(取り込み履歴は source_imports に追記)。

Claude Code への MCP 接続

ローカル stdio MCP として接続します。

claude mcp add --transport stdio pesticide-registry \
  -- uv run python -m pesticide_mcp.server

プロジェクト共有用に .mcp.json.example を用意しています。コピーして利用してください。

cp .mcp.json.example .mcp.json

環境変数は以下を利用できます(詳細は docs/DEVELOPMENT.md)。

変数名 用途 既定値
PESTICIDE_DB_PATH DuckDB ファイルパス ./data/pesticides.duckdb
PESTICIDE_SOURCE_DIR FAMIC ZIP/CSV 保存先 ./data/raw

接続後、Claude Code から dataset_status を呼ぶと取り込み状態を確認できます。

公開している MCP tools

いずれも「登録情報の検索結果」を返すもので、使用可否の判定は行いません。

tool 用途 主な入力
dataset_status 取り込み状態(件数・出典・取り込み日時)を返す (なし)
search_pesticides 農薬基本情報を検索 name / register_no / active_ingredient / pesticide_type
get_pesticide_by_register_no 登録番号で基本情報+適用サマリを取得 register_no(12345/0012345 両対応)
get_applications 適用情報を検索 crop / pest / pesticide_name / register_no / usage_method
check_registered_use 条件に該当する登録行候補を返す(可否判定ではない) pesticide_name_or_register_no + crop (+ pest / usage_method)

各レスポンスには出典(source)と注意文(safety_notice)が含まれ、check_registered_use は allowed のような可否を断定するフィールドを返しません。

使い方(Claude Code での自然文例)

- 「登録番号 12345 の農薬を見て」                → get_pesticide_by_register_no
- 「除虫菊で農薬を検索して」                      → search_pesticides
- 「りんごの黒星病に登録のある適用を出して」      → get_applications
- 「ダコニールはりんごの黒星病に登録がある?登録行を出して」 → check_registered_use

check_registered_use は「使えます」と断定せず、該当する登録行の候補と根拠フィールド (作物名・適用病害虫雑草名・使用時期・使用方法・使用回数・総使用回数など)を返します。 Claude が結果を説明するときの返答テンプレートは docs/DEVELOPMENT.md を参照してください。

データソースと利用条件

  • 一次データ: FAMIC 農薬登録情報ダウンロード CSV
  • 補助(任意): WAGRI 農薬情報取得 API
  • 外部公開・二次配信を行う場合は、FAMIC/WAGRI の利用条件・表示条件を必ず再確認してください。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured