Skip to main content
Glama
GeoServer MCP Server

GeoServer MCP Server

by mahdin75

지오서버 MCP 서버

알파

버전 0.4.0(알파)은 현재 개발 중이며 곧 출시될 예정입니다. 여러분의 기여를 환영하며, 이 프로젝트 구축에 함께해 주실 개발자분들을 환영합니다.

🎥 데모

Related MCP server: QGISMCP

📋 목차

🚀 특징

  • 🔍 GeoServer 작업 공간, 레이어 및 스타일 쿼리 및 조작

  • 🗺️ 벡터 데이터에 대한 공간 쿼리 실행

  • 🎨 지도 시각화 생성

  • 🌐 OGC 호환 웹 서비스(WMS, WFS)에 접속하세요

  • 🛠️ MCP 호환 클라이언트와의 간편한 통합

📋 필수 조건

  • Python 3.10 이상

  • REST API가 활성화된 GeoServer 인스턴스 실행

  • MCP 호환 클라이언트(Claude Desktop 또는 Cursor 등)

  • 패키지 설치를 위한 인터넷 연결

🛠️ 설치

귀하의 요구 사항에 가장 적합한 설치 방법을 선택하세요.

🛠️ 설치(Docker)

Docker 설치는 GeoServer MCP 서버를 실행하는 가장 빠르고 독립적인 방법입니다. 다음과 같은 경우에 적합합니다.

  • 빠른 테스트 및 평가

  • 프로덕션 배포

  • Python 종속성을 피하고 싶은 환경

  • 다양한 시스템에 걸친 일관된 배포

  1. geoserver-mcp를 실행합니다.

지엑스피1

  1. 클라이언트 구성:

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 이상이 설치된 시스템

  • 서버 구성을 사용자 정의하려는 사용자

  • 개발 및 테스트 목적

  1. uv 패키지 관리자를 설치합니다.

pip install uv
  1. 가상 환경 만들기(Python 3.10+):

리눅스/맥:

uv venv --python=3.10

윈도우 PowerShell:

uv venv --python=3.10
  1. pip를 사용하여 패키지를 설치하세요:

uv pip install geoserver-mcp
  1. GeoServer 연결 구성:

리눅스/맥:

export GEOSERVER_URL="http://localhost:8080/geoserver"
export GEOSERVER_USER="admin"
export GEOSERVER_PASSWORD="geoserver"

윈도우 PowerShell:

$env:GEOSERVER_URL="http://localhost:8080/geoserver"
$env:GEOSERVER_USER="admin"
$env:GEOSERVER_PASSWORD="geoserver"
  1. 서버를 시작합니다:

Claude 데스크톱을 사용하려는 경우 이 단계는 필요하지 않습니다. 커서나 사용자 지정 클라이언트를 사용하는 경우 다음 코드를 실행하세요.

리눅스:

source .venv/bin/activate

geoserver-mcp

또는

source .venv/bin/activate

geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug

윈도우 PowerShell:

.\.venv\Scripts\activate
geoserver-mcp

또는

.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug
  1. 클라이언트 구성:

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"
      ]
    }
  }
}

🛠️ 개발 설치

개발 설치는 코드베이스를 수정하려는 기여자와 개발자를 위해 설계되었습니다. 이 방법은 다음과 같은 경우에 적합합니다.

  • 프로젝트에 기여하는 개발자

  • 소스 코드를 수정해야 하는 사용자

  • 새로운 기능 테스트

  • 디버깅 및 개발 목적

  1. uv 패키지 관리자를 설치합니다.

pip install uv
  1. 가상 환경 만들기(Python 3.10+):

uv venv --python=3.10
  1. pip를 사용하여 패키지를 설치하세요:

uv pip install -e .
  1. GeoServer 연결 구성:

리눅스/맥:

export GEOSERVER_URL="http://localhost:8080/geoserver"
export GEOSERVER_USER="admin"
export GEOSERVER_PASSWORD="geoserver"

윈도우 PowerShell:

$env:GEOSERVER_URL="http://localhost:8080/geoserver"
$env:GEOSERVER_USER="admin"
$env:GEOSERVER_PASSWORD="geoserver"
  1. 서버를 시작합니다:

Claude 데스크톱을 사용하려는 경우 이 단계는 필요하지 않습니다. 커서나 사용자 지정 클라이언트를 사용하는 경우 다음 코드를 실행하세요.

리눅스:

source .venv/bin/activate

geoserver-mcp

또는

source .venv/bin/activate

geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug

윈도우 PowerShell:

.\.venv\Scripts\activate
geoserver-mcp

또는

.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug
  1. 클라이언트 구성:

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"
      ]
    }
  }
}

🛠️ 사용 가능한 도구

🛠️ 작업 공간 및 레이어 관리

도구

설명

list_workspaces

사용 가능한 작업 공간 가져오기

create_workspace

새 작업 공간 만들기

get_layer_info

자세한 레이어 메타데이터 가져오기

list_layers

작업 공간에 레이어 나열

create_layer

새 레이어를 만듭니다

delete_resource

리소스 제거

🛠️ 데이터 운영

도구

설명

query_features

벡터 데이터에 CQL 쿼리 실행

update_features

기능 속성 수정

delete_features

기준에 따라 기능 제거

🛠️ 시각화

도구

설명

generate_map

스타일이 적용된 지도 이미지 만들기

create_style

새로운 SLD 스타일 정의

apply_style

레이어에 기존 스타일 적용

🛠️ 클라이언트 개발

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 통합

🤝 기여하기

여러분의 참여를 환영합니다! 다음과 같은 방법으로 도움을 주세요.

  1. 저장소를 포크하세요

  2. 기능 브랜치를 생성합니다( git checkout -b feature/AmazingFeature )

  3. 변경 사항을 커밋합니다( git commit -m 'Add some AmazingFeature' )

  4. 브랜치에 푸시( git push origin feature/AmazingFeature )

  5. 풀 리퀘스트 열기

PR 설명에 문제와 해결책을 명확하게 설명해 주세요. 해당되는 경우 관련 이슈 번호를 포함하세요.

📄 라이센스

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

🔗 관련 프로젝트

📞 지원

지원을 받으려면 문제를 열어주세요.

🏆 배지

Available Tools

9 tools
create_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

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      A server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.
      12,706 npm
      302
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A 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.
      15
      10
      Creative Commons Zero v1.0 Universal
    • A
      license
      C
      quality
      D
      maintenance
      A 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.
      87
      208
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A server application that provides PostGIS database connection using Model Context Protocol (MCP), enabling spatial database functionality through natural language interactions.
      22
      21
      ISC