The MCP Server Example allows you to retrieve weather-related information:
- Get weather alerts for a specific U.S. state using its two-letter code
- Get weather forecasts for a specific location using latitude and longitude coordinates
MCP Server Example
This project is a very basic MCP server ready to be consumed by Cursor or other tools.
Modify index.ts and add any tools you want, or keep the default ones.
Then build the project:
And run it:
Now add a .cursor/mcp.json file in your project, and paste the following;
Replace [path] with the absolute path to this project. Run pwd in the project folder for that. For example, in my case it is:
Now go to "Settings" in cursor. You should be able to see the MCP server there. Enable it (click on the top right)
Now go to the chat, switch to Agent mode and select claude-3.7-sonnet as your model.
Type the following:
It will use the MCP to get first the weather alerts, and then the forecast Here is an example of how the chat interface looks when querying the weather in Texas:
A basic MCP server template that can be integrated with Cursor to enable AI tools like weather information retrieval using Claude-3.7-sonnet model.
Related MCP Servers
- AsecurityFlicenseAqualityA starter template for building Model Context Protocol servers that can be integrated with Cursor or Claude Desktop, allowing developers to create custom tools and extensions for AI assistants.Last updated -11513TypeScript
- -securityFlicense-qualityA simple MCP service that allows users to query weather conditions for cities worldwide through the Cursor AI assistant.Last updated -1JavaScript
- -securityFlicense-qualityAn open source toolkit that converts 280+ integrations into MCP servers for use with Claude Desktop, Cursor, or Windsurf, enabling AI automation through a type-safe pieces framework written in TypeScript.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables users to fetch weather forecasts through Cursor AI by using natural language queries.Last updated -PythonMIT License