free-transmission-wildlife
MCPを用いたAI支援による送電線と野生生物の解析
ユースケース
ある野生生物保護団体は、カリフォルニア州サンホアキン・バレーにおいて、送電インフラが野生生物や保護地域に与える潜在的な影響を監視したいと考えています。
この団体は資金が限られているため、従来のGISソフトウェアを使って手動のGIS解析を継続的に行ったり、大規模な空間データセットを検査したりすることができません。彼らは、送電線や野生生物地域に関する空間的な質問をし、手動でSQLを書いたりGIS操作を行ったりせずに解析結果を得るための簡単な方法を必要としています。
このプロジェクトは、Model Context Protocol (MCP) を使用して、GISファイルに格納されDuckDBを通じてクエリされる空間データにClaudeを接続します。
ユーザーは、手動でGISソフトウェアを開いて空間解析を行う代わりに、自然言語でClaudeに質問することができます。
例:
Which wildlife areas intersect transmission lines?
Which transmission lines pass through public access lands?
How many transmission line segments intersect wildlife areas?
What wildlife areas are within 1 kilometer of a transmission line?
Show me the transmission lines that have potential impacts on wildlife areas.Claudeはリクエストを解釈し、MCPサーバーを使用して空間データにアクセスし、必要なDuckDB空間クエリを実行して、結果を読み取り可能な形式で返します。
Related MCP server: PostGIS Yukon MCP
目的
主な目的は、AI、MCP、DuckDB、空間データを組み合わせて、軽量なGIS解析アシスタントを作成できることを示すことです。
このプロジェクトは次の点に焦点を当てています:
空間データセットへの自然言語アクセス
ユーザーがSQLを書く必要のない空間クエリ
送電線および野生生物地域の解析
低コストなGISデータ処理
DuckDBによる再現可能な空間解析
Claudeを通じて解析結果を直接返す
データ
このプロジェクトは現在、2つの空間データセットを扱います:
送電線
送電線インフラをShapefileとして表現したもの。
data/
└── transmission_lines/
└── TransmissionLine_CEC.shp野生生物 / 一般公開地
カリフォルニア州魚類野生生物局の一般公開地データをShapefileとして表現したもの。
data/
└── public_lands/
└── CDFW_Public_Access_Lands_[ds3077].shpこれらのデータセットは、DuckDB Spatial拡張機能を使用してDuckDBに読み込まれます。
アーキテクチャ
基本的なアーキテクチャは次のとおりです:
User
|
| Natural-language question
v
Claude
|
| MCP
v
MCP Server
|
| DuckDB Spatial SQL
v
Spatial Datasets
|
+-- Transmission Lines
|
+-- Wildlife / Public Access Lands
|
v
Analysis Result
|
v
Claude ResponseMCPサーバーは、Claudeと空間データベース層の間の橋渡し役を果たします。
DuckDBは実際のデータ処理と空間操作を実行します。
技術スタック
Python 3.14
DuckDB
DuckDB Spatial
MCP Python
PyArrow
Pandas
Claude
プロジェクト構成
free-transmission-wildlife/
│
├── app/
│ ├── db/
│ │ ├── load_data.py
│ │ └── queries.py
│ │
│ └── server/
│ └── server.py
│
├── data/
│ ├── transmission_lines/
│ │ └── TransmissionLine_CEC.shp
│ │
│ └── public_lands/
│ └── CDFW_Public_Access_Lands_[ds3077].shp
│
├── pyproject.toml
├── uv.lock
├── Makefile
└── README.mdはじめに
このプロジェクトは、Python環境と依存関係の管理に uv を使用します。
プロジェクトの依存関係をインストールします:
uv sync開発
開発モードでMCPサーバーを起動します:
make devこれは次を実行します:
uv run mcp dev app/server/server.py開発サーバーは、MCPツールをテストし、その動作を検査するために使用できます。
Claudeのインストール
Claude用にMCPサーバーをインストールします:
make installこれは次と同等のものを実行します:
uv run mcp install app/server/server.pyインストールが完了すると、MCPサーバーはClaudeで利用可能になります。
アプリケーションの実行
MCPサーバーをインストールした後、Claudeを開いて空間データセットについて質問を始めます。
例:
Show me the schema of the transmission lines dataset.Show me the schema of the wildlife lands dataset.Find transmission lines that intersect wildlife lands.How many wildlife areas intersect transmission lines?Which transmission lines have the greatest number of wildlife intersections?MCPサーバーはこれらのリクエストをDuckDBに対する操作に変換します。
空間解析
このプロジェクトは、次のような空間操作をサポートすることを目的としています:
交差
内部
距離解析
バッファ解析
ジオメトリ検査
空間フィルタリング
集計
交差するフィーチャのカウント
面積計算
長さ計算
たとえば、交差解析は概念的には次のように表すことができます:
SELECT
t.*,
w.*
FROM transmission_lines t
JOIN wildlife_lands w
ON ST_Intersects(t.geom, w.geom);これにより、Claudeが自然言語インターフェースを提供する一方で、DuckDBが空間解析を実行できます。
出力
結果はMarkdown形式でClaudeを通じて返されます。
例:
Transmission lines intersecting wildlife lands
| Transmission Line | Wildlife Area | Intersection |
|-------------------|---------------|--------------|
| Line A | Area 001 | Yes |
| Line B | Area 014 | Yes |
| Line C | Area 021 | Yes |
Total intersecting transmission lines: 3目標は、ユーザーがSQLやDuckDBを理解する必要なく、解析結果を理解できるようにすることです。
DuckDBを使う理由
DuckDBは、従来のデータベースサーバーを必要とせずにデータを直接クエリできる軽量な分析データベースを提供します。
Spatial拡張機能と組み合わせることで、比較的シンプルなアーキテクチャを維持しながらGIS操作を実行できます。
したがって、このプロジェクトはこのプロトタイプのためにPostgreSQL/PostGISを必要としません。
アーキテクチャは次のとおりです:
Shapefile / GeoParquet
|
v
DuckDB
|
v
DuckDB Spatial
|
v
MCP Server
|
v
Claudeこれにより、このプロジェクトはAI支援によるGIS解析の実験に適したものになっています。
今後の開発
将来の改善の可能性としては、次のものが含まれます:
ShapefilesからGeoParquetへの移行
カリフォルニアの野生生物データセットの追加
区画データセットの追加
保護地域の追加
環境制約データセットの追加
距離・バッファ解析の追加
自動空間レポートの追加
地図可視化の追加
Webマップ向けのGeoJSON結果の返却
空間データのクラウドオブジェクトストレージへのデプロイ
より大規模な空間データセットの追加
AI支援GIS解析ワークフローの構築
プロジェクトの目標
長期的な目標は、従来のGISデータ処理と自然言語AIインターフェースを組み合わせることで、空間解析をより利用しやすくできることを示すことです。
すべてのユーザーにGISソフトウェア、SQL、空間データベース操作の知識を要求する代わりに、ユーザーは自然言語で質問を記述し、ClaudeがMCPとDuckDBを通じて解析を調整できるようにします。
Available Tools
7 toolscalculate_transmission_lines_intersection_with_wildlifeB
Return total transmission-line overlap in kilometers.
Inputs: no named parameters.
get_arcgis_map_instructionsA
Return instructions and live data for an ArcGIS Maps SDK for JavaScript 4.29 map.
This tool is ONLY for ArcGIS. It must not generate MapLibre code.
Inputs: no named parameters.
get_list_of_hit_wildlife_from_transmission_linesC
Return wildlife lands intersected by transmission lines.
Inputs: no named parameters.
get_maplibre_map_instructionsA
Return instructions and live data for a MapLibre GL JS 5.14.0 map.
This tool is ONLY for MapLibre. It must not generate ArcGIS code.
Inputs: no named parameters.
get_summary_chart_instructionsB
Return instructions and live data for a summary chart.
Inputs: no named parameters.
get_summary_transmission_linesC
Return a summary of transmission lines.
Inputs: no named parameters.
get_summary_wildlife_landsA
Return a summary of wildlife lands.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
The data tools are largely distinct, but the two intersection tools (get_list_of_hit_wildlife_from_transmission_lines and calculate_transmission_lines_intersection_with_wildlife) overlap in subject and could be misselected without careful reading. The two map instruction tools are clearly disambiguated by their explicit platform constraints.
Most tools follow a get_<description> snake_case convention, and the map tools use a clear platform suffix. The calculate_ prefix in calculate_transmission_lines_intersection_with_wildlife is a minor deviation, and get_list_of_hit_wildlife_from_transmission_lines is verbose, but overall the naming pattern is predictable.
Seven tools is a well-scoped, focused set for a specialized transmission/wildlife analysis dashboard. Each tool serves a distinct output need: summaries, intersection results, overlap metrics, chart guidance, and map guidance.
The set covers the core query needs (summaries, intersection list, overlap metric) and presentation needs (chart and map instructions). Minor gaps exist, such as no detailed feature-level retrieval for individual transmission lines or wildlife lands, but the surface is likely sufficient for a dashboard use case.
Maintenance
Related MCP Connectors
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Generate and run high performance queries on open and private spatial data at-scale in the cloud
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Ask in plain English, get a rendered, shareable map from live public data. 24 geospatial tools.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAn Iceberg-native geospatial MCP server powered by DuckDB that provides tools for spatial SQL queries, catalog discovery, and data management. It enables LLM agents to interact with Apache Iceberg lakehouses to perform complex spatial analysis, joins, and aggregations.1-
- AlicenseNot gradedqualityDmaintenanceEnables natural language and geospatial queries on PostGIS databases, with 32 tools for spatial analysis, geometry operations, and database management.5MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that connects AI agents to cloud-native geospatial data via STAC metadata and DuckDB with H3 spatial indexing, enabling zero-configuration SQL queries on terabyte-scale datasets over S3.23BSD 3-Clause
- AlicenseAqualityBmaintenanceMCP server for chatting with physical-world data from robotics, drones, automotive, and IoT sources using natural language. It generates auditable SQL queries over Apache Arrow/DuckDB to let you analyze, summarize, and build data pipelines.2583 PyPI408Apache 2.0