mcp-server-x
This document provides a structured summary of a Model Context Protocol (MCP) server designed to offer weather querying and route planning services.
The MCP server, named 'china-weather-map', is designed to provide two main services: querying weather information and planning routes. It leverages the Amap API to fetch real-time weather data and driving directions. The server is structured to handle requests efficiently and return data in a format that can be easily integrated into various applications. The weather querying tool fetches detailed weather information for a specified city, while the route planning tool calculates driving directions between two points. This server is ideal for applications that require up-to-date weather and navigation data, such as travel apps or logistics platforms.
Features
- Real-time Weather Data: Fetches current weather conditions and forecasts using the Amap API.
- Route Planning: Provides driving directions between specified origin and destination points.
- Efficient Data Handling: Processes requests quickly to deliver timely information.
- Scalable Architecture: Designed to handle multiple requests simultaneously.
- Easy Integration: Offers data in a format that can be easily integrated into various platforms.
MCP Tools
- {'Weather Query Tool': 'Fetches weather data from Amap API for a specified city.'}
- {'Route Planning Tool': 'Calculates driving directions using Amap API between two points.'}
Usage with Different Platforms
Node.js
javascript
const axios = require('axios');
async function getWeather(city) {
const response = await axios.get(`https://restapi.amap.com/v3/weather/weatherInfo?key=2e645bee34ad494cfbd9baceccb351d0&city=${city}&extensions=all`);
return response.data;
}
async function getRoute(origin, destination) {
const response = await axios.get(`https://restapi.amap.com/v5/direction/driving?key=2e645bee34ad494cfbd9baceccb351d0&origin=${origin}&destination=${destination}&strategy=0`);
return response.data;
}
// Example usage
getWeather('110000').then(data => console.log(data));
getRoute('116.481488,39.990464', '116.403124,39.940693').then(data => console.log(data));
Related MCP Servers
View all location_services servers →mcp-server-airbnb
by openbnb-org
MCP Server for searching Airbnb and getting listing details.
apple-mcp
by Dhravya
This is a collection of Apple-native tools for the Model Context Protocol (MCP) that integrates with various Apple applications to automate tasks and manage communications.
iMCP
by loopwork-ai
iMCP is a macOS app that connects your digital life with AI, supporting the Model Context Protocol (MCP) for seamless integration with various clients.
mcp_weather_server
by isdaniel
A Model Context Protocol (MCP) server that provides weather information using the Open-Meteo API.
open-streetmap-mcp
by jagan-shanmugam
An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data.