Skip to main content
Glama
OpenStreetMap MCP Server

OpenStreetMap MCP Server

OpenStreetMap(OSM) MCP 서버

위치 기반 서비스와 지리공간 데이터를 통해 LLM 기능을 강화하는 OpenStreetMap MCP 서버 구현입니다.

데모

미팅 포인트 최적화

미팅 포인트 사용 사례

이웃 분석

이웃 분석 사용 사례

주차 검색

주차 검색 사용 사례

Related MCP server: Mapbox MCP Server

특징

이 서버는 LLM에 OpenStreetMap 데이터와 상호 작용할 수 있는 도구를 제공하여 위치 기반 애플리케이션이 다음을 수행할 수 있도록 합니다.

  • 주소와 장소 이름을 좌표로 지오코딩

  • 주소에 대한 역 지오코딩 좌표

  • 근처 관심 지점 찾기

  • 위치 간 경로 안내 받기

  • 경계 상자 내에서 범주별로 장소 검색

  • 여러 사람이 모이는 최적의 만남 장소를 제안합니다.

  • 지역을 탐색하고 포괄적인 위치 정보를 얻으세요

  • 지역 근처의 학교 및 교육 기관 찾기

  • 집과 직장 사이의 통근 옵션을 분석하세요

  • 커넥터와 전원 필터링이 있는 EV 충전소 찾기

  • 부동산에 대한 동네 거주성 분석 수행

  • 주차 시설의 이용 가능 여부와 요금 정보를 확인하세요

구성 요소

자원

서버는 위치 기반 리소스를 구현합니다.

  • location://place/{query} : 이름이나 주소로 장소에 대한 정보를 가져옵니다.

  • location://map/{style}/{z}/{x}/{y} : 지정된 좌표에서 스타일이 적용된 지도 타일을 가져옵니다.

도구

서버는 여러 가지 지리공간 도구를 구현합니다.

  • geocode_address : 텍스트를 지리적 좌표로 변환

  • reverse_geocode : 좌표를 사람이 읽을 수 있는 주소로 변환합니다.

  • find_nearby_places : 위치 근처의 관심 지점을 찾아보세요

  • get_route_directions : 위치 간 단계별 길찾기 안내

  • search_category : 특정 지역의 특정 카테고리 장소 찾기

  • suggest_meeting_point : 여러 사람이 모이는 최적의 만남 장소를 찾아보세요

  • explore_area : 동네에 대한 포괄적인 데이터를 얻으세요

  • find_schools_nearby : 특정 위치 근처의 교육 기관 찾기

  • analyze_commute : 집과 직장 사이의 교통 옵션을 비교합니다.

  • find_ev_charging_stations : 필터링을 통해 EV 충전 인프라 찾기

  • analyze_neighborhood : 부동산의 동네 거주 적합성 평가

  • find_parking_facilities : 목적지 근처의 주차 옵션을 찾습니다.

사용 사례

부동산 의사결정

LLM은 사용자가 주택 구매를 위한 잠재적인 동네를 평가하는 데 도움이 될 수 있습니다.

로컬 테스트

서버 실행

서버를 로컬로 실행하려면:

  1. 개발 모드에서 패키지를 설치하세요:

지엑스피1

  1. 서버를 시작합니다:

osm-mcp-server
  1. 서버가 시작되어 표준 입출력에서 MCP 요청을 수신합니다.

예제 클라이언트로 테스트

저장소에는 examples/ 디렉토리에 두 개의 예제 클라이언트가 포함되어 있습니다.

기본 클라이언트 예제

client.py OSM MCP 서버의 기본적인 사용법을 보여줍니다.

python examples/client.py

이렇게 하면:

  • 로컬로 실행 중인 서버에 연결

  • 샌프란시스코에 대한 정보를 얻으세요

  • 해당 지역의 레스토랑 검색

  • 진행 상황 추적을 통해 포괄적인 지도 데이터 검색

LLM 통합 예제

llm_client.py LLM 통합을 위해 설계된 도우미 클래스를 제공합니다.

python examples/llm_client.py

이 예에서는 LLM이 위치 어시스턴트를 사용하여 다음을 수행하는 방법을 보여줍니다.

  • 텍스트 쿼리에서 위치 정보 가져오기

  • 근처 관심 지점 찾기

  • 위치 간 길찾기

  • 최적의 미팅 장소를 찾으세요

  • 동네를 탐험하세요

자신의 클라이언트 작성

나만의 클라이언트를 만들려면:

  1. MCP 클라이언트 가져오기:

from mcp.client import Client
  1. 서버 URL로 클라이언트를 초기화합니다.

client = Client("http://localhost:8000")
  1. 도구 호출 또는 리소스 액세스:

# Example: Geocode an address
results = await client.invoke_tool("geocode_address", {"address": "New York City"})

구성

설치하다

클로드 데스크탑

MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json

"mcpServers": {
  "osm-mcp-server": {
    "command": "uv",
    "args": [
      "--directory",
      "/path/to/osm-mcp-server",
      "run",
      "osm-mcp-server"
    ]
  }
}
"mcpServers": {
  "osm-mcp-server": {
    "command": "uvx",
    "args": [
      "osm-mcp-server"
    ]
  }
}

개발

건축 및 출판

배포를 위해 패키지를 준비하려면:

  1. 종속성 동기화 및 잠금 파일 업데이트:

uv sync
  1. 패키지 배포 빌드:

uv build

이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.

  1. PyPI에 게시:

uv publish

참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.

디버깅

MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.

다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.

npx @modelcontextprotocol/inspector uv --directory /path/to/osm-mcp-server run osm-mcp-server

Inspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.

API 사용 예시

다음은 Python 코드에서 주요 API 엔드포인트를 사용하는 방법에 대한 간단한 예입니다.

import asyncio
from mcp.client import Client

async def main():
    client = Client("http://localhost:8000")
    
    # Geocode an address
    results = await client.invoke_tool("geocode_address", {"address": "Empire State Building"})
    print(f"Found location: {results[0]['display_name']}")
    
    # Get coordinates
    lat = float(results[0]['lat'])
    lon = float(results[0]['lon'])
    
    # Find nearby coffee shops
    nearby = await client.invoke_tool(
        "find_nearby_places",
        {
            "latitude": lat,
            "longitude": lon,
            "radius": 500,
            "categories": ["amenity"],
            "limit": 5
        }
    )
    
    # Print results
    print(f"Found {nearby['total_count']} nearby places")
    for category, subcategories in nearby["categories"].items():
        for subcategory, places in subcategories.items():
            print(f"  - {subcategory}: {len(places)} places")

if __name__ == "__main__":
    asyncio.run(main())

Available Tools

12 tools
analyze_commuteA

Perform a detailed commute analysis between home and work locations.

This advanced tool analyzes commute options between two locations (typically home and work), comparing multiple transportation modes and providing detailed metrics for each option. Includes estimated travel times, distances, turn-by-turn directions, and other commute-relevant data. Essential for real estate decisions, lifestyle planning, and workplace relocation analysis.

Args: home_latitude: Home location latitude (decimal degrees) home_longitude: Home location longitude (decimal degrees) work_latitude: Workplace location latitude (decimal degrees) work_longitude: Workplace location longitude (decimal degrees) modes: List of transportation modes to analyze (options: "car", "foot", "bike") depart_at: Optional departure time (format: "HH:MM") for time-sensitive routing

Returns: Comprehensive commute analysis with: - Summary comparing all transportation modes - Detailed route information for each mode - Total distance and duration for each option - Turn-by-turn directions

Inputs: home_latitude (required), home_longitude (required), work_latitude (required), work_longitude (required), +2 more.

analyze_neighborhoodA

Generate a comprehensive neighborhood analysis focused on livability factors.

This advanced analysis tool evaluates a neighborhood based on multiple livability factors, including amenities, transportation options, green spaces, and services. Results include counts and proximity scores for various categories, helping to assess the overall quality and convenience of a residential area. Invaluable for real estate decisions, relocation planning, and neighborhood comparisons.

Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Analysis radius in meters (defaults to 1000m/1km)

Returns: Comprehensive neighborhood profile including: - Overall neighborhood score - Walkability assessment - Public transportation access - Nearby amenities (shops, restaurants, services) - Green spaces and recreation - Education and healthcare facilities - Detailed counts and distance metrics for each category

Inputs: latitude (required), longitude (required), radius.

explore_areaA

Generate a comprehensive profile of an area including all amenities and features.

This powerful analysis tool creates a detailed overview of a neighborhood or area by identifying and categorizing all geographic features, amenities, and points of interest. Results are organized by category for easy analysis. Excellent for neighborhood research, area comparisons, and location-based decision making.

Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 500m)

Returns: In-depth area profile including: - Address and location context - Total feature count - Features organized by category and subcategory - Each feature includes name, coordinates, and detailed metadata

Inputs: latitude (required), longitude (required), radius.

find_ev_charging_stationsA

Locate electric vehicle charging stations near a specific location.

This specialized search tool identifies EV charging infrastructure within a specified distance from a location. Results can be filtered by connector type (Tesla, CCS, CHAdeMO, etc.) and minimum power delivery. Essential for EV owners planning trips or evaluating potential charging stops.

Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 5000m/5km) connector_types: Optional list of specific connector types to filter by (e.g., ["type2", "ccs", "tesla"]) min_power: Minimum charging power in kW

Returns: List of charging stations with: - Location name and operator - Available connector types - Charging speeds - Number of charging points - Access restrictions - Other relevant metadata

Inputs: latitude (required), longitude (required), radius, connector_types, +1 more.

find_nearby_placesA

Discover points of interest and amenities near a specific location.

This tool performs a comprehensive search around a geographic point to identify nearby establishments, amenities, and points of interest. Results are organized by category and subcategory, making it easy to find specific types of places. Essential for location-based recommendations, neighborhood analysis, and proximity-based decision making.

Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 1000m/1km) categories: List of OSM categories to search for (e.g., ["amenity", "shop", "tourism"]). If omitted, searches common categories. limit: Maximum number of total results to return

Returns: Structured dictionary containing: - Original query parameters - Total count of places found - Results grouped by category and subcategory - Each place includes name, coordinates, and associated tags

Inputs: latitude (required), longitude (required), radius, categories, +1 more.

find_parking_facilitiesA

Locate parking facilities near a specific location.

This tool finds parking options (lots, garages, street parking) near a specified location. Results can be filtered by parking type and include capacity information where available. Useful for trip planning, city navigation, and evaluating parking availability in urban areas.

Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 1000m/1km) parking_type: Optional filter for specific types of parking facilities ("surface", "underground", "multi-storey", etc.)

Returns: List of parking facilities with: - Name and type - Capacity information if available - Fee structure if available - Access restrictions - Distance from search point

Inputs: latitude (required), longitude (required), radius, parking_type.

find_schools_nearbyA

Locate educational institutions near a specific location, filtered by education level.

This specialized search tool identifies schools, colleges, and other educational institutions within a specified distance from a location. Results can be filtered by education level (elementary, middle, high school, university, etc.). Essential for families evaluating neighborhoods or real estate purchases with education considerations.

Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 2000m/2km) education_levels: Optional list of specific education levels to filter by (e.g., ["elementary", "secondary", "university"])

Returns: List of educational institutions with: - Name and type - Distance from search point - Education levels offered - Contact information if available - Other relevant metadata

Inputs: latitude (required), longitude (required), radius, education_levels.

geocode_addressA

Convert an address or place name to geographic coordinates with detailed location information.

This tool takes a text description of a location (such as an address, landmark name, or place of interest) and returns its precise geographic coordinates along with rich metadata. The results can be used for mapping, navigation, location-based analysis, and as input to other geospatial tools.

Args: address: The address, place name, landmark, or description to geocode (e.g., "Empire State Building", "123 Main St, Springfield", "Golden Gate Park, San Francisco")

Returns: List of matching locations with: - Geographic coordinates (latitude/longitude) - Formatted address - Administrative boundaries (city, state, country) - OSM type and ID - Bounding box (if applicable) - Importance ranking

Inputs: address (required).

get_route_directionsA

Calculate detailed route directions between two geographic points.

This tool provides comprehensive routing information between two locations using OpenStreetMap/OSRM. The output can be minimized using the steps, overview, and annotations parameters to reduce the response size.

Args: from_latitude: Starting point latitude (decimal degrees) from_longitude: Starting point longitude (decimal degrees) to_latitude: Destination latitude (decimal degrees) to_longitude: Destination longitude (decimal degrees) ctx: Context (provided internally by MCP) mode: Transportation mode ("car", "bike", "foot") steps: Turn-by-turn instructions (True/False, Default: False) overview: Geometry output ("full", "simplified", "false"; Default: "simplified") annotations: Additional segment info (True/False, Default: False)

Returns: Dictionary with routing information (summary, directions, geometry, waypoints)

Example: { "from_latitude": 51.3334193, "from_longitude": 9.4540423, "to_latitude": 51.3295516, "to_longitude": 9.4576721, "mode": "car", "steps": false, "overview": "simplified", "annotations": false }

Inputs: from_latitude (required), from_longitude (required), to_latitude (required), to_longitude (required), +4 more.

reverse_geocodeA

Convert geographic coordinates to a detailed address and location description.

This tool takes a specific point on Earth (latitude and longitude) and returns comprehensive information about that location, including its address, nearby landmarks, administrative boundaries, and other contextual information. Useful for translating GPS coordinates into human-readable locations.

Args: latitude: The latitude coordinate (decimal degrees, WGS84) longitude: The longitude coordinate (decimal degrees, WGS84)

Returns: Detailed address and location information including: - Formatted address - Building, street, city, state, country - Administrative hierarchy - OSM metadata - Postal code and other relevant identifiers

Inputs: latitude (required), longitude (required).

search_categoryA

Search for specific types of places within a defined geographic area.

This tool allows targeted searches for places matching specific categories within a rectangular geographic region. It's particularly useful for filtering places by type (restaurants, schools, parks, etc.) within a neighborhood or city district. Results include complete location details and metadata about each matching place.

Args: category: Main OSM category to search for (e.g., "amenity", "shop", "tourism", "building") min_latitude: Southern boundary of search area (decimal degrees) min_longitude: Western boundary of search area (decimal degrees) max_latitude: Northern boundary of search area (decimal degrees) max_longitude: Eastern boundary of search area (decimal degrees) subcategories: Optional list of specific subcategories to filter by (e.g., ["restaurant", "cafe"])

Returns: Structured results including: - Query parameters - Count of matching places - List of matching places with coordinates, names, and metadata

Inputs: category (required), min_latitude (required), min_longitude (required), max_latitude (required), +2 more.

suggest_meeting_pointA

Find the optimal meeting place for multiple people coming from different locations.

This tool calculates a central meeting point based on the locations of multiple individuals, then recommends suitable venues near that central point. Ideal for planning social gatherings, business meetings, or any situation where multiple people need to converge from different starting points.

Args: locations: List of dictionaries, each containing the latitude and longitude of a person's location Example: [{"latitude": 37.7749, "longitude": -122.4194}, {"latitude": 37.3352, "longitude": -121.8811}] venue_type: Type of venue to suggest as a meeting point. Options include: "cafe", "restaurant", "bar", "library", "park", etc.

Returns: Meeting point recommendations including: - Calculated center point coordinates - List of suggested venues with names and details - Total number of matching venues in the area

Inputs: locations (required), venue_type.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as geocode_address for address-to-coordinates and reverse_geocode for coordinates-to-address. However, some overlap exists: explore_area and analyze_neighborhood both provide area profiles, and find_nearby_places and search_category both search for places by category, which could cause confusion without careful reading of descriptions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as analyze_commute, find_ev_charging_stations, and suggest_meeting_point. This predictability makes it easy for agents to understand and use the toolset without naming confusion.

    Tool Count5/5

    With 12 tools, the server is well-scoped for an OpenStreetMap-based geospatial analysis platform. Each tool serves a specific purpose, from routing and geocoding to specialized searches (e.g., schools, parking, EV charging), covering a comprehensive range of location-based queries without being overwhelming.

    Completeness4/5

    The toolset provides strong coverage for geospatial analysis, including geocoding, routing, area exploration, and targeted searches. Minor gaps exist, such as no direct tool for editing or contributing to OpenStreetMap data, but the available tools support most common location-based workflows effectively.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables AI agents to become geospatially intelligent assistants with tools for location search, smart routing, round trip planning, reverse geocoding, isochrone analysis, route visualization, geofence management, and interactive map display.
      8
      20 npm
      8
      Apache 2.0