MCP Weather Service
This server provides weather information for specified cities.
Retrieve weather data for cities like Fukuoka, Tokyo, Osaka, Moscow, New York, and other cities recognized by the Open-Meteo API.
Uses the
get-weatherendpoint with a requiredcityparameter.Interaction occurs through the Model Context Protocol (MCP).
Can be tested using the MCP Inspector at
http://127.0.0.1:6274.
Used to make HTTP requests to the Open-Meteo API for fetching weather information for various cities
Provides version control functionality for the weather service project, allowing users to clone, commit, and push changes
Enables users to store, share, and collaborate on the weather service project through repositories, pull requests, and issue tracking
Serves as the runtime environment for the weather service, required to execute the MCP server
Used as the programming language for implementing the weather service with type safety
Provides schema validation for the weather data retrieved from the API
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Weather Servicewhat's the weather like in Tokyo today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Weather Service
This repository is a simple service that uses the Model Context Protocol (MCP) to provide weather information for multiple cities (Fukuoka, Tokyo, Osaka, Moscow, New York, etc.).
table of contents
Related MCP server: Weather MCP
Prerequisites
To complete this project, you need the following software:
Node.js (version 18 and above)
npm (usually installed with Node.js)
Git
How to install
Installing Node.js and npm
Download the installer from the official Node.js website and install it.
Once the installation is complete, verify it by running the following command in Terminal:
node -v
npm -vInstalling Git
Download the installer from the official Git website and install it.
Once the installation is complete, verify it by running the following command in Terminal:
git --versionProject Setup
Creating a New Project
Create a new directory and navigate to it:
mkdir my-weather-mcp
cd my-weather-mcpInitialize your npm project:
npm init -yInstall the required packages:
npm install @modelcontextprotocol/sdk axios zod typescript @types/node https-proxy-agent
npm install --save-dev ts-nodeCreate a TypeScript configuration file:
npx tsc --initEdit your
tsconfig.jsonfile as follows:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"outDir": "./build",
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}Edit the scripts section of your
package.jsonfile as follows:
"scripts": {
"build": "tsc && node -e \"import('fs').then(fs => fs.default.chmodSync('build/index.js', '755'))\"",
"start": "node build/index.js",
"inspect": "npx @modelcontextprotocol/inspector build/index.js",
"dev": "ts-node src/index.ts"
}Create the project directory structure:
mkdir -p src testClone an existing project
If you want to use an existing project, clone it:
git clone https://github.com/terisuke/my-weather-mcp.git
cd my-weather-mcp
npm installHow to use
Build and run
To build and run the project, use the following commands:
npm run build && npm run startUsing the Inspector
To test the weather service using the MCP Inspector, run the following command:
npm run build && npm run inspectOnce the Inspector is running, you can interact with the weather service by visiting http://127.0.0.1:6274 in your browser.
Get weather information
Using the Inspector, you can get weather information for the following cities:
Fukuoka
Tokyo
Osaka
Moscow
new york
Other cities can be specified, but they must be recognized by the Open-Meteo API.
Development Guide
File Structure
my-weather-mcp/
├── build/ # コンパイルされたJavaScriptファイル
├── src/ # TypeScriptソースコード
│ └── index.ts # メインのアプリケーションコード
├── test/ # テストファイル
├── package.json # プロジェクト設定
├── tsconfig.json # TypeScript設定
└── README.md # このファイルFixing the code
Edit the
src/index.tsfile to add or modify the functionality.To test your changes, run the following command:
npm run build && npm run inspectOnce you are satisfied that the changes work, commit the changes.
Upload to GitHub
Creating your first GitHub repository
Go to GitHub and create an account or log in.
Click the "+" button in the top right and select "New repository".
Enter a repository name (for example,
my-weather-mcp) and add an optional description.Set your repository to public or private and click "Create repository".
Initialize and push the local repository
In your local project directory, initialize a Git repository:
git initAdd your changes to the staging area:
git add .Commit the changes:
git commit -m "初回コミット:MCP天気サービスの実装"Add a remote repository (using the repository URL from GitHub):
git remote add origin https://github.com/ユーザー名/my-weather-mcp.gitPush the changes to the remote repository:
git push -u origin mainPushing changes to an existing repository
Add your changes to the staging area:
git add .Commit the changes:
git commit -m "変更内容の説明"Push the changes to the remote repository:
git pushCreating a pull request
Go to the repository page on GitHub.
Click the "Pull requests" tab and then click the "New pull request" button.
Select the base branch and the compare branch.
Click the “Create pull request” button.
Enter a title and description for your pull request and click the "Create pull request" button.
troubleshooting
Common problems and solutions
ERR_PACKAGE_PATH_NOT_EXPORTED Error
This error occurs when the import path of the @modelcontextprotocol/sdk package is incorrect. Please fix it as follows:
// 誤ったインポート
import { McpServer } from "@modelcontextprotocol/sdk";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/transports";
// 正しいインポート
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";Network connection error
If you get a network error while making an API call, please check your proxy settings. You can use a proxy by setting the environment variables HTTP_PROXY or HTTPS_PROXY :
export HTTP_PROXY=http://プロキシサーバー:ポート
export HTTPS_PROXY=https://プロキシサーバー:ポートOther issues
If the problem persists, please create an issue with the following information:
The error message that occurred
The version of Node.js and npm you are using
Command executed
Expected vs. Actual Behavior
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.857Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.1
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather data and forecasts for any city.111ISC
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides weather information using the Open-Meteo API, allowing users to get current weather for specific cities and retrieve weather data for date ranges.Apache 2.0
Related MCP Connectors
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/terisuke/my-weather-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server