Planned future integration that will provide GitHub Copilot with access to weather data services when MCP support is added to Copilot
MCP Data Server ๏ฟฝ
A comprehensive Model Context Protocol (MCP) server that provides various data services, starting with real-time weather data and designed for easy extension to other data sources.
๐ Features
Modular Architecture: Easy to extend with new data services
Real-time Weather Data: Get current weather conditions for any city
MCP Protocol Compliance: Fully compatible with the Model Context Protocol
TypeScript Support: Written in TypeScript for better type safety
Stdio Transport: Uses standard input/output for communication
Extensible Design: Ready for news, finance, sports, and other data services
๐ Prerequisites
Node.js (v18 or higher)
npm or yarn package manager
TypeScript support
๐ ๏ธ Installation
Clone the repository:
Install dependencies:
Build the project (optional):
๐ฏ Usage
Running the Server
Development Mode
Production Mode
MCP Configuration
Add the following configuration to your MCP client's configuration file (.vscode/mcp.json
):
๐ง Available Services
Weather Service
getWeather
Get current weather data for a specified city.
Parameters:
city
(string): The name of the city to get weather for
Example Usage:
Response Format:
๐ฎ Future Services (Planned)
News Service: Get latest news from various sources
Finance Service: Stock prices, market data, cryptocurrency
Sports Service: Live scores, team statistics, schedules
Social Media Service: Trending topics, social metrics
Maps Service: Location data, directions, places
๐๏ธ Architecture
Project Structure
Transport Layer
The server uses StdioServerTransport for communication:
Input: Standard input (stdin)
Output: Standard output (stdout)
Protocol: JSON-RPC over stdio
Benefits: Simple, reliable, and widely supported
Service Architecture
Each service follows this pattern:
๐ค AI Assistant Integration
Claude Desktop (Available Now)
Your MCP server works with Claude Desktop out of the box! See docs/AI_INTEGRATION.md
for setup instructions.
GitHub Copilot (Coming Soon)
GitHub Copilot doesn't support MCP yet, but your server is ready! See docs/GITHUB_COPILOT_INTEGRATION.md
for:
Current workarounds using VS Code extensions
What to expect when MCP support is added
Example integration patterns
VS Code Extension Example
Check out examples/vscode-extension/
for a working example that integrates your MCP server with VS Code today!
๐ MCP Inspector Integration
For debugging and development, you can use the MCP Inspector:
Install the MCP Inspector:
Run the inspector:
Open the inspector in your browser at
http://localhost:5173
๐งช Development
Adding New Services
Create Type Definitions (
src/types/myservice.ts
):
Implement Service (
src/services/myservice.ts
):
Register Tool (in
src/main.ts
):
Development Scripts
npm run dev
- Run in development mode with hot reloadnpm run build
- Build the TypeScript projectnpm start
- Run the built projectnpm test
- Run all testsnpm run test:watch
- Run tests in watch modenpm run test:coverage
- Run tests with coverage report
๐ API Details
Weather Service API
Geocoding:
https://geocoding-api.open-meteo.com/v1/search
Weather:
https://api.open-meteo.com/v1/forecast
Rate Limit: Free tier, no authentication required
Model: UKMO Seamless (UK Met Office)
๐ค Contributing
We welcome contributions for new data services! Here's how:
Fork the repository
Create a feature branch:
git checkout -b feature/new-service
Add your service following the architecture above
Add tests and documentation
Commit your changes:
git commit -m 'Add new service'
Push to the branch:
git push origin feature/new-service
Open a Pull Request
Service Guidelines
Each service should be self-contained in its own file
Use TypeScript for type safety
Include proper error handling
Add JSDoc comments for public methods
Follow the existing code style
๐ License
This project is licensed under the ISC License - see the LICENSE file for details.
๐ Acknowledgments
Model Context Protocol for the protocol specification
Open-Meteo for the free weather API
TypeScript for type safety
๐ Support
If you encounter any issues or have questions:
Check the Issues page
Create a new issue with detailed information
Contact: rajasekaran.parthiban7@gmail.com
๐ Changelog
v1.0.0
Initial release with weather service
Modular architecture for easy extension
MCP protocol compliance
TypeScript implementation
Stdio transport support
Made with โค๏ธ by ParthibanRajasekaran | Ready for extension to any data service! const server = new McpServer({ name: "MCP Weather Server", version: "1.0.0", description: "A server that provides weather data" });
๐ Project Structure
๐ MCP Inspector Integration
To use with the MCP Inspector for debugging and development:
Configure MCP Client: Add the server to your MCP configuration file (
.vscode/mcp.json
):
Launch Inspector: The server can be inspected using MCP-compatible tools and inspectors.
Debug Mode: Use the development server for real-time debugging:
๐ API Integration
The server integrates with two Open-Meteo APIs:
Geocoding API
Endpoint:
https://geocoding-api.open-meteo.com/v1/search
Purpose: Convert city names to coordinates
Features: Multi-language support, fuzzy matching
Weather API
Endpoint:
https://api.open-meteo.com/v1/forecast
Purpose: Retrieve weather data using coordinates
Model: UK Met Office Seamless model (
ukmo_seamless
)Data: Current conditions + hourly forecasts
๐ ๏ธ Development
Available Scripts
Adding New Features
New Tools: Add tools to the server using the
server.tool()
methodEnhanced Data: Extend the weather API calls to include more parameters
Error Handling: Improve error handling for edge cases
๐ Usage Examples
Basic Weather Query
Multi-City Comparison
๐ Error Handling
The server includes comprehensive error handling:
Invalid Cities: Returns helpful error messages for non-existent cities
API Failures: Graceful handling of network issues
Data Validation: Input validation using Zod schemas
๐ Data Schema
Current Weather Response
๐ค Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature
)Commit your changes (
git commit -m 'Add amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
๐ License
This project is licensed under the ISC License - see the LICENSE file for details.
๐ Acknowledgments
Open-Meteo for providing free weather data
Model Context Protocol for the MCP specification
UK Met Office for the weather model data
๐ Support
For questions or issues:
Create an issue on GitHub
Check the MCP Documentation
Built with โค๏ธ using the Model Context Protocol
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
A Model Context Protocol server that provides real-time weather data and forecasts for any city.
- ๐ Features
- ๐ Prerequisites
- ๐ ๏ธ Installation
- ๐ฏ Usage
- ๐ง Available Services
- ๐๏ธ Architecture
- ๐ค AI Assistant Integration
- ๐ MCP Inspector Integration
- ๐งช Development
- ๐ API Details
- ๐ค Contributing
- ๐ License
- ๐ Acknowledgments
- ๐ Support
- ๐ Changelog
- ๐ Project Structure
- ๐ MCP Inspector Integration
- ๐ API Integration
- ๐ ๏ธ Development
- ๐ Usage Examples
- ๐ Error Handling
- ๐ Data Schema
- ๐ค Contributing
- ๐ License
- ๐ Acknowledgments
- ๐ Support
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.Last updated -
- AsecurityFlicenseAqualityA Model Context Protocol server that provides current weather forecasts for specific locations and active weather alerts for US states.Last updated -2
- AsecurityAlicenseAqualityA Model Context Protocol server that provides weather information and forecasts based on user location or address input.Last updated -6154MIT License
- -securityFlicense-qualityA Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.Last updated -