GeoServer MCP Server
GeoServer MCP サーバー
バージョン0.4.0(アルファ版)は現在開発中で、まもなくリリースされます。皆様からの貢献を歓迎しており、このプロジェクトの構築にご参加いただける開発者を歓迎いたします。
🎥 デモ
Related MCP server: QGISMCP
📋 目次
🚀 機能
🔍 GeoServer のワークスペース、レイヤー、スタイルをクエリして操作する
🗺️ ベクターデータに対して空間クエリを実行する
🎨 マップの視覚化を生成する
🌐 OGC準拠のWebサービス(WMS、WFS)にアクセスする
🛠️ MCP 対応クライアントとの簡単な統合
📋 前提条件
Python 3.10以上
REST API を有効にして GeoServer インスタンスを実行する
MCP 互換クライアント (Claude Desktop や Cursor など)
パッケージインストールのためのインターネット接続
🛠️ インストール
ニーズに最適なインストール方法を選択してください。
🛠️ インストール (Docker)
Dockerインストールは、GeoServer MCPサーバーを実行するための最も迅速で隔離された方法です。以下の用途に最適です。
迅速なテストと評価
本番環境への導入
Pythonへの依存を避けたい環境
異なるシステム間での一貫した展開
geoserver-mcp を実行します:
docker pull mahdin75/geoserver-mcp
docker run -d mahdin75/geoserver-mcpクライアントを構成します。
Claude Desktopを使用している場合は、 claude_desktop_config.jsonを編集します。Cursorを使用している場合は、 .cursor/mcp.jsonを作成します。
{
"mcpServers": {
"geoserver-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GEOSERVER_URL=http://localhost:8080/geoserver",
"-e",
"GEOSERVER_USER=admin",
"-e",
"GEOSERVER_PASSWORD=geoserver",
"-p",
"8080:8080",
"mahdin75/geoserver-mcp"
]
}
}
}🛠️ インストール (pip)
pipによるインストールは、システム上で直接サーバーを実行したいほとんどのユーザーに推奨されます。この方法は以下の場合に最適です。
ローカルでサーバーを実行したい一般ユーザー
Python 3.10以降がインストールされているシステム
サーバー構成をカスタマイズしたいユーザー
開発およびテスト目的
uv パッケージ マネージャーをインストールします。
pip install uv仮想環境を作成する (Python 3.10+):
Linux/Mac:
uv venv --python=3.10Windows PowerShell:
uv venv --python=3.10pip を使用してパッケージをインストールします。
uv pip install geoserver-mcpGeoServer 接続を構成します。
Linux/Mac:
export GEOSERVER_URL="http://localhost:8080/geoserver"
export GEOSERVER_USER="admin"
export GEOSERVER_PASSWORD="geoserver"Windows PowerShell:
$env:GEOSERVER_URL="http://localhost:8080/geoserver"
$env:GEOSERVER_USER="admin"
$env:GEOSERVER_PASSWORD="geoserver"サーバーを起動します。
Claudeデスクトップを使用する場合は、この手順は不要です。カーソルまたは独自のカスタムクライアントを使用する場合は、次のコードを実行してください。
リナックス:
source .venv/bin/activate
geoserver-mcpまたは
source .venv/bin/activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugWindows PowerShell:
.\.venv\Scripts\activate
geoserver-mcpまたは
.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugクライアントを構成する:
Claude Desktopを使用している場合は、 claude_desktop_config.jsonを編集します。Cursorを使用している場合は、 .cursor/mcp.jsonを作成します。
ウィンドウズ:
{
"mcpServers": {
"geoserver-mcp": {
"command": "C:\\path\\to\\geoserver-mcp\\.venv\\Scripts\\geoserver-mcp",
"args": [
"--url",
"http://localhost:8080/geoserver",
"--user",
"admin",
"--password",
"geoserver"
]
}
}
}リナックス:
{
"mcpServers": {
"geoserver-mcp": {
"command": "/path/to/geoserver-mcp/.venv/bin/geoserver-mcp",
"args": [
"--url",
"http://localhost:8080/geoserver",
"--user",
"admin",
"--password",
"geoserver"
]
}
}
}🛠️ 開発インストール
開発インストールは、コードベースを変更したい貢献者や開発者向けに設計されています。この方法は以下の場合に適しています。
プロジェクトに貢献する開発者
ソースコードを変更する必要があるユーザー
新機能のテスト
デバッグと開発目的
uv パッケージ マネージャーをインストールします。
pip install uv仮想環境を作成する (Python 3.10+):
uv venv --python=3.10pip を使用してパッケージをインストールします。
uv pip install -e .GeoServer 接続を構成します。
Linux/Mac:
export GEOSERVER_URL="http://localhost:8080/geoserver"
export GEOSERVER_USER="admin"
export GEOSERVER_PASSWORD="geoserver"Windows PowerShell:
$env:GEOSERVER_URL="http://localhost:8080/geoserver"
$env:GEOSERVER_USER="admin"
$env:GEOSERVER_PASSWORD="geoserver"サーバーを起動します。
Claudeデスクトップを使用する場合は、この手順は不要です。カーソルまたは独自のカスタムクライアントを使用する場合は、次のコードを実行してください。
リナックス:
source .venv/bin/activate
geoserver-mcpまたは
source .venv/bin/activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugWindows PowerShell:
.\.venv\Scripts\activate
geoserver-mcpまたは
.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugクライアントを構成する:
Claude Desktopを使用している場合は、 claude_desktop_config.jsonを編集します。Cursorを使用している場合は、 .cursor/mcp.jsonを作成します。
ウィンドウズ:
{
"mcpServers": {
"geoserver-mcp": {
"command": "C:\\path\\to\\geoserver-mcp\\.venv\\Scripts\\geoserver-mcp",
"args": [
"--url",
"http://localhost:8080/geoserver",
"--user",
"admin",
"--password",
"geoserver"
]
}
}
}リナックス:
{
"mcpServers": {
"geoserver-mcp": {
"command": "/path/to/geoserver-mcp/.venv/bin/geoserver-mcp",
"args": [
"--url",
"http://localhost:8080/geoserver",
"--user",
"admin",
"--password",
"geoserver"
]
}
}
}🛠️ 利用可能なツール
🛠️ ワークスペースとレイヤーの管理
道具 | 説明 |
| 利用可能なワークスペースを取得する |
| 新しいワークスペースを作成する |
| 詳細なレイヤーメタデータを取得する |
| ワークスペース内のレイヤーを一覧表示する |
| 新しいレイヤーを作成する |
| リソースを削除する |
🛠️ データ操作
道具 | 説明 |
| ベクターデータに対してCQLクエリを実行する |
| フィーチャ属性を変更する |
| 基準に基づいて機能を削除する |
🛠️ 視覚化
道具 | 説明 |
| スタイル設定された地図画像を作成する |
| 新しいSLDスタイルを定義する |
| 既存のスタイルをレイヤーに適用する |
🛠️ クライアント開発
GeoServer MCPサーバーと連携する独自のクライアントを開発する予定の場合は、 examples/client.pyにあるクライアント実装例を参考にしてください。この例では、以下の点が示されています。
MCPサーバーとの接続を確立する方法
リクエストの送信方法とレスポンスの処理方法
基本的なエラー処理と接続管理
さまざまなツールと操作の使用例
サンプル クライアントは、プロトコルを理解し、独自のクライアント アプリケーションを実装するための良い出発点となります。
また、使用例は次のとおりです。
ワークスペースの一覧
Tool: list_workspaces
Parameters: {}
Response: ["default", "demo", "topp", "tiger", "sf"]
レイヤー情報を取得する
Tool: get_layer_info
Parameters: {
"workspace": "topp",
"layer": "states"
}
クエリ機能
Tool: query_features
Parameters: {
"workspace": "topp",
"layer": "states",
"filter": "PERSONS > 10000000",
"properties": ["STATE_NAME", "PERSONS"]
}
マップを生成
Tool: generate_map
Parameters: {
"layers": ["topp:states"],
"styles": ["population"],
"bbox": [-124.73, 24.96, -66.97, 49.37],
"width": 800,
"height": 600,
"format": "png"
}
🔮 計画されている機能
[ ] カバレッジとラスターデータの管理
[ ] セキュリティとアクセス制御
[ ] 高度なスタイリング機能
[ ] WPS処理操作
[ ] GeoWebCache統合
🤝 貢献する
皆様のご寄付をお待ちしております!ご協力いただける方法は以下の通りです。
リポジトリをフォークする
機能ブランチを作成する (
git checkout -b feature/AmazingFeature)変更をコミットします(
git commit -m 'Add some AmazingFeature')ブランチにプッシュする (
git push origin feature/AmazingFeature)プルリクエストを開く
PRの説明には、問題と解決策を明確に記載してください。該当する場合は、関連する問題番号も含めてください。
📄 ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
🔗 関連プロジェクト
モデルコンテキストプロトコル- MCPのコア実装
GeoServer REST API - 公式GeoServer RESTドキュメント
GeoServer REST Python クライアント- GeoServer REST API 用の Python クライアント
📞 サポート
サポートが必要な場合は、問題を報告してください
🏆 バッジ
Available Tools
9 toolscreate_layerC
Create a new layer in GeoServer.
Args:
workspace: The workspace for the new layer
layer: The name of the layer to create
data_store: The data store to use
source: The source data (file, table name, etc.)
Returns:
Dict with status and layer information
Inputs: data_store (required), layer (required), source (required), workspace (required).
create_styleB
Create a new SLD style in GeoServer.
Args:
name: Name for the style
sld: SLD XML content
workspace: Optional workspace for the style
Returns:
Dict with status and style information
Inputs: name (required), sld (required), workspace.
create_workspaceC
Create a new workspace in GeoServer.
Args:
workspace: Name of the workspace to create
Returns:
Dict with status and result information
Inputs: workspace (required).
delete_resourceC
Delete a resource from GeoServer.
Args:
resource_type: Type of resource to delete (workspace, layer, style, etc.)
workspace: The workspace containing the resource
name: The name of the resource
Returns:
Dict with status and result information
Inputs: name (required), resource_type (required), workspace (required).
generate_mapB
Generate a map image using WMS GetMap.
Args:
layers: List of layers to include (format: workspace:layer)
styles: Optional styles to apply (one per layer)
bbox: Bounding box [minx, miny, maxx, maxy]
width: Image width in pixels
height: Image height in pixels
format: Image format (png, jpeg, etc.)
Returns:
Dict with map information and URL
Inputs: layers (required), bbox, format, height, +2 more.
get_layer_infoC
Get detailed information about a layer.
Args:
workspace: The workspace containing the layer
layer: The name of the layer
Returns:
Dict with layer metadata
Inputs: layer (required), workspace (required).
list_layersB
List layers in GeoServer, optionally filtered by workspace.
Args:
workspace: Optional workspace to filter layers
Returns:
List of layer information dictionaries
Inputs: workspace.
list_workspacesB
List available workspaces in GeoServer.
Inputs: no named parameters.
query_featuresB
Query features from a vector layer using CQL filter.
Args:
workspace: The workspace containing the layer
layer: The layer to query
filter: Optional CQL filter expression
properties: Optional list of properties to return
max_features: Maximum number of features to return
Returns:
GeoJSON FeatureCollection with query results
Inputs: layer (required), workspace (required), filter, max_features, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose with no ambiguity. The tools cover different operations like creation (create_layer, create_style, create_workspace), deletion (delete_resource), retrieval (get_layer_info, list_layers, list_workspaces), querying (query_features), and visualization (generate_map). There is no overlap in functionality.
Tool names follow a consistent verb_noun pattern throughout, using snake_case. All tools start with a clear action verb (create, delete, generate, get, list, query) followed by a specific noun, making them predictable and readable.
With 9 tools, this server is well-scoped for managing a GeoServer instance. It covers essential operations for workspaces, layers, styles, and maps without being overly complex or too sparse, making it efficient for agents to handle geospatial data tasks.
The tool set provides comprehensive coverage for core GeoServer operations, including CRUD for layers, styles, and workspaces, along with querying and map generation. A minor gap exists in updating resources (e.g., update_layer or update_style), but agents can work around this by deleting and recreating.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Geospatial AI MCP server — satellite imagery, embeddings, weather, GNS governance
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.12,706 npm302MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that connects Claude AI to QGIS, enabling direct interaction with the GIS software for project creation, layer manipulation, code execution, and processing algorithms through natural language prompts.1510Creative Commons Zero v1.0 Universal
- AlicenseCqualityDmaintenanceA Model Context Protocol server that connects LLMs to GIS operations, enabling AI assistants to perform accurate geospatial analysis including geometric operations, coordinate transformations, and spatial measurements.87208MIT
- AlicenseBqualityDmaintenanceA server application that provides PostGIS database connection using Model Context Protocol (MCP), enabling spatial database functionality through natural language interactions.2221ISC