A Model Context Protocol (MCP) server written in Swift that provides a weather tool for retrieving current weather conditions for a specified city.
- Simple MCP server implementation in Swift
- Weather tool that fetches current weather data using the wttr.in API
- Standard I/O transport for integration with MCP clients
- macOS 13.0 or later
- Swift 6.1 or later
Clone the repository:
git clone https://github.com/your-username/swift-version-mcp.git
cd swift-version-mcpBuild the project:
swift buildRun the server:
swift runThe server provides a weather tool that accepts a city name and returns the current weather conditions.
To add this MCP server to Cursor IDE, follow these steps:
-
Build the project:
swift build
-
Add the following configuration to Cursor:
{ "mcpServers": { "swift-weather-server": { "type": "stdio", "command": "/full/path/to/SimpleWeatherMCPSwift/.build/arm64-apple-macosx/debug/swift-weather-mcp" } } }
Now you can access the weather tool from within Cursor IDE's AI features by typing /mcp in the chat and selecting the weather tool.
[Your License Here]
- Uses wttr.in for weather data
- Built with Swift MCP SDK