@devyhan/naver-maps-mcp
v1.2.2
Published
MCP 서버 for 네이버 지도 API
Readme
Naver Maps MCP Server
A Model Context Protocol (MCP) server that integrates with Naver Maps API, allowing AI applications like Claude to utilize geographical services such as geocoding, reverse geocoding, and route searching without direct API access.
Core Concepts
Geographical Data
Geographical data is represented primarily as coordinates (latitude and longitude) or addresses:
Coordinates: Precise geographical points with latitude and longitude values
{ "latitude": 37.5058, "longitude": 127.0556 }Addresses: Human-readable location references that can be converted to coordinates
"서울특별시 강남구 테헤란로 129"
Routes
Routes define paths between geographical points:
- Simple Routes: Direct paths between start and goal points
- Waypoint Routes: Paths that pass through specific intermediate points
- Natural Language Routes: Routes defined using human-readable addresses instead of coordinates
API Features
This MCP server provides the following Naver Maps API features:
- Geocoding: Convert addresses to coordinates (latitude, longitude)
- Reverse Geocoding: Convert coordinates to addresses
- Place Search: Search places based on keywords
- Route Search: Provide optimal routes between two points
- Route Search with Waypoints: Provide optimal routes including waypoints
- Natural Language Route Search: Convert natural language addresses to coordinates and provide optimal routes
- Natural Language Route Search with Waypoints: Convert natural language addresses (including waypoints) to coordinates and provide optimal routes
- Coordinate System Conversion: Convert between various coordinate systems
API
Tools
geocode
- Description: Convert addresses to coordinates (latitude, longitude)
- Input:
address(string): The address to geocodefilter(string, optional): Region filter
- Output: Geocoding results including coordinates
- Example:
{ "address": "서울특별시 강남구 테헤란로 129" }
reverseGeocode
- Description: Convert coordinates to addresses
- Input:
latitude(number): Latitude coordinatelongitude(number): Longitude coordinatecoords_type(string, optional): Coordinate system type
- Output: Address information for the given coordinates
- Example:
{ "latitude": 37.5058, "longitude": 127.0556 }
searchPlaces
- Description: Search places based on keywords
- Input:
query(string): Search keywordcoordinate(object, optional): Center coordinate for searchradius(number, optional): Search radius in meters
- Output: List of matching places with their information
getDirections
- Description: Provide optimal routes between two points
- Input:
start(object): Starting coordinates with latitude and longitudegoal(object): Goal coordinates with latitude and longitudeoption(string, optional): Route option (trafast, tracomfort, etc.)lang(string, optional): Guide language
- Output: Route information including path, summary, and guide
- Example:
{ "start": { "latitude": 37.5058, "longitude": 127.0556 }, "goal": { "latitude": 37.5662, "longitude": 126.9784 }, "option": "trafast" }
getDirectionsWithWaypoints
- Description: Provide optimal routes including waypoints
- Input:
start(object): Starting coordinatesgoal(object): Goal coordinateswaypoints(array, optional): List of waypoint coordinatesoption(string, optional): Route option
- Output: Route information with waypoints included
getDirectionsByNaturalLanguage
- Description: Convert natural language addresses to coordinates and provide optimal routes
- Input:
startAddress(string): Starting address as natural languagegoalAddress(string): Goal address as natural languageoption(string, optional): Route optionlang(string, optional): Guide language
- Output: Route information with original address data
- Example:
{ "startAddress": "서울특별시 강남구 테헤란로 129", "goalAddress": "서울특별시 중구 명동", "option": "trafast" }
getDirectionsWithWaypointsByNaturalLanguage
- Description: Convert natural language addresses (including waypoints) to coordinates and provide optimal routes
- Input:
startAddress(string): Starting address as natural languagegoalAddress(string): Goal address as natural languagewaypointAddresses(array, optional): List of waypoint addressesoption(string, optional): Route option
- Output: Route information with waypoints and original address data
- Example:
{ "startAddress": "서울특별시 강남구 테헤란로 129", "goalAddress": "서울특별시 중구 명동", "waypointAddresses": ["서울특별시 용산구 남산", "서울특별시 중구 시청"], "option": "trafast" }
transformCoordinates
- Description: Convert between various coordinate systems
- Input:
coords(object): Coordinates to transformfromCoordSys(string): Source coordinate systemtoCoordSys(string): Target coordinate system
- Output: Transformed coordinates
Getting Started
Prerequisites
- Node.js 18.0.0 or higher
- Naver Cloud Platform API credentials (Client ID, Client Secret)
Installation
- Install globally from npm:
npm install -g @devyhan/naver-maps-mcpOr run directly using npx:
npx @devyhan/naver-maps-mcp- Set up environment variables (recommended):
cp .env.example .envEdit the .env file to enter your Naver API authentication information:
NAVER_CLIENT_ID=your_client_id_here
NAVER_CLIENT_SECRET=your_client_secret_here- Set API credentials directly when running:
NAVER_CLIENT_ID=your_client_id NAVER_CLIENT_SECRET=your_client_secret npx @devyhan/naver-maps-mcp- Use programmatically in your application:
import naverMapsMcp from '@devyhan/naver-maps-mcp';
// Initialize with credentials
naverMapsMcp.initNaverMapsClient({
clientId: 'your_client_id',
clientSecret: 'your_client_secret'
});
// Start the MCP server
naverMapsMcp.startNaverMapsMCP();Running
npm startTesting
npm testTesting with MCP Inspector
You can test the server using MCP Inspector:
npx @modelcontextprotocol/inspector node index.jsUsage with Claude Desktop
Setup
To use this server with Claude Desktop, add this to your claude_desktop_config.json:
NPX
{
"mcpServers": {
"naverMaps": {
"command": "npx",
"args": ["-y", "@devyhan/naver-maps-mcp"],
"env": {
"NAVER_CLIENT_ID": "your_client_id_here",
"NAVER_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}Docker
{
"mcpServers": {
"naverMaps": {
"command": "docker",
"args": ["run", "-i", "--rm", "devyhan/naver-maps-mcp"],
"env": {
"NAVER_CLIENT_ID": "your_client_id_here",
"NAVER_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}Environment Variables
The server can be configured using the following environment variables:
NAVER_CLIENT_ID: Your Naver Cloud Platform Client IDNAVER_CLIENT_SECRET: Your Naver Cloud Platform Client SecretPORT: Server port (default: 3000)LOG_LEVEL: Logging level (error, warn, info, debug)
After setting up, restart Claude Desktop.
Building
Docker
Build a Docker image:
docker build -t devyhan/naver-maps-mcp .Project Structure
naver-maps-mcp/
├── index.js # Entry point
├── package.json # Project metadata
├── .env.example # Environment variables example
├── README.md # Project documentation
├── src/
│ ├── server.js # MCP server implementation
│ ├── api/
│ │ └── naverMapsClient.js # Naver API client
│ └── utils/
│ ├── config.js # Configuration management
│ └── logger.js # Logging utility
└── tests/
└── test.js # Test codeLicense
ISC
