Discover Awesome MCP Servers

Extend your agent with 84,516 capabilities via MCP servers.

All84,516
Teable MCP Server

Teable MCP Server

Connects Teable no-code databases to LLMs, enabling AI agents to query records, explore schema structures, retrieve data history, and interact with spaces, bases, tables, and views using natural language.

XERT Cycling Training

XERT Cycling Training

Connect Claude to XERT cycling analytics - access fitness signature (FTP, LTP, HIE), training load, workouts, and activities.

Reddit MCP

Reddit MCP

Enables browsing, searching, and reading Reddit posts, comments, and subreddits through Reddit's API using PRAW.

mcp_server

mcp_server

Okay, I understand. You want me to describe how to implement a weather MCP (Message Passing Communication) server that can be called by a client IDE like Cursor. Here's a breakdown of the implementation, covering the key aspects: **1. Understanding the Requirements** * **MCP (Message Passing Communication):** This implies a structured way for the client (Cursor) and the server to exchange information. We need to define a protocol for the messages. Common choices include: * **JSON:** Human-readable, easy to parse, and widely supported. Good for simple data structures. * **Protocol Buffers (protobuf):** More efficient (smaller messages, faster parsing), but requires defining schemas. Better for complex data or performance-critical applications. * **XML:** Verbose, but well-established. Less common for new projects. * **Weather Data:** The server needs to fetch weather information from a reliable source. Popular options include: * **OpenWeatherMap:** Free and paid tiers, provides current weather, forecasts, historical data. Requires an API key. * **WeatherAPI.com:** Similar to OpenWeatherMap, offers various plans. * **AccuWeather:** Commercial API. * **National Weather Service (NWS) (US):** Free, but data format can be less consistent. * **Client (Cursor):** The server needs to be accessible from the Cursor IDE. This means it should expose an endpoint that Cursor can call (e.g., an HTTP endpoint). * **Error Handling:** Robust error handling is crucial. The server should gracefully handle invalid requests, API errors, and network issues. * **Scalability (Optional):** If you anticipate many clients, consider designing the server to be scalable (e.g., using asynchronous operations, load balancing). **2. Technology Stack** Here's a suggested stack: * **Language:** Python is a good choice due to its ease of use, extensive libraries, and suitability for web development. * **Web Framework:** Flask or FastAPI are excellent for creating lightweight web APIs. FastAPI is generally preferred for its performance and automatic data validation. * **HTTP Library:** `requests` (for making API calls to weather services). * **JSON Library:** `json` (built-in to Python). * **Asynchronous Library (Optional):** `asyncio` and `aiohttp` (for handling concurrent requests). **3. Implementation Steps** ```python # weather_server.py (Example using Flask) from flask import Flask, request, jsonify import requests import os # For accessing environment variables from dotenv import load_dotenv load_dotenv() # Load environment variables from .env file app = Flask(__name__) # Replace with your actual API key from OpenWeatherMap or another provider WEATHER_API_KEY = os.getenv("WEATHER_API_KEY") WEATHER_API_URL = "https://api.openweathermap.org/data/2.5/weather" # Example URL def get_weather_data(city): """Fetches weather data from the OpenWeatherMap API.""" try: params = { 'q': city, 'appid': WEATHER_API_KEY, 'units': 'metric' # Use Celsius } response = requests.get(WEATHER_API_URL, params=params) response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx) data = response.json() return data except requests.exceptions.RequestException as e: print(f"Error fetching weather data: {e}") return None except Exception as e: print(f"An unexpected error occurred: {e}") return None @app.route('/weather', methods=['GET']) def weather(): """ Handles the /weather endpoint. Expects a 'city' query parameter. Returns weather data as JSON. """ city = request.args.get('city') if not city: return jsonify({'error': 'City parameter is required'}), 400 weather_data = get_weather_data(city) if weather_data: # Extract relevant information (customize as needed) temperature = weather_data['main']['temp'] description = weather_data['weather'][0]['description'] humidity = weather_data['main']['humidity'] wind_speed = weather_data['wind']['speed'] return jsonify({ 'city': city, 'temperature': temperature, 'description': description, 'humidity': humidity, 'wind_speed': wind_speed, 'source': 'OpenWeatherMap' # Indicate the data source }) else: return jsonify({'error': 'Failed to retrieve weather data for the specified city'}), 500 if __name__ == '__main__': app.run(debug=True, host='0.0.0.0', port=5000) # Listen on all interfaces ``` **Explanation:** 1. **Imports:** Imports necessary libraries (Flask, requests, json). 2. **.env and API Key:** Loads the OpenWeatherMap API key from an environment variable. **Important:** Never hardcode API keys directly into your code. Use environment variables or a configuration file. Create a `.env` file in the same directory as your script and add `WEATHER_API_KEY=YOUR_API_KEY`. Make sure to add `.env` to your `.gitignore` file to prevent committing your API key to your repository. 3. **`get_weather_data(city)` Function:** * Takes a city name as input. * Constructs the API request URL with the city and API key. * Uses the `requests` library to make the API call. * Handles potential errors (network issues, invalid API key, etc.). * Parses the JSON response from the weather API. * Returns the parsed data or `None` if an error occurred. 4. **`/weather` Route:** * Defines a Flask route `/weather` that handles GET requests. * Retrieves the `city` parameter from the query string (e.g., `/weather?city=London`). * Calls the `get_weather_data()` function to fetch the weather. * Extracts the relevant weather information (temperature, description, etc.) from the API response. **Customize this part to extract the specific data you need.** * Returns the weather data as a JSON response. * Includes error handling to return appropriate HTTP status codes (400 for bad request, 500 for server error). 5. **`if __name__ == '__main__':` Block:** * Starts the Flask development server when the script is run directly. * `debug=True` enables debugging mode (useful during development). **Disable this in production.** * `host='0.0.0.0'` makes the server accessible from any IP address (important if you're running it on a remote machine). * `port=5000` specifies the port the server will listen on. **4. Running the Server** 1. **Install Dependencies:** ```bash pip install flask requests python-dotenv ``` 2. **Set Environment Variable:** Create a `.env` file with `WEATHER_API_KEY=YOUR_API_KEY` (replace `YOUR_API_KEY` with your actual API key). 3. **Run the Server:** ```bash python weather_server.py ``` The server will start and listen on `http://0.0.0.0:5000`. **5. Client-Side (Cursor IDE) Integration** You'll need to write code within the Cursor IDE to call the weather server's API. Here's a conceptual example (the exact implementation will depend on Cursor's capabilities): ```javascript // Example JavaScript code (within Cursor) async function getWeather(city) { const apiUrl = `http://localhost:5000/weather?city=${city}`; // Replace with your server's address try { const response = await fetch(apiUrl); if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); } const data = await response.json(); return data; } catch (error) { console.error("Error fetching weather:", error); return null; } } // Example usage: async function displayWeather(city) { const weatherData = await getWeather(city); if (weatherData) { console.log(`Weather in ${weatherData.city}:`); console.log(`Temperature: ${weatherData.temperature}°C`); console.log(`Description: ${weatherData.description}`); console.log(`Humidity: ${weatherData.humidity}%`); console.log(`Wind Speed: ${weatherData.wind_speed} m/s`); } else { console.log("Failed to get weather information."); } } // Call the function (e.g., when a button is clicked or a command is executed) displayWeather("London"); ``` **Explanation of Client-Side Code:** 1. **`getWeather(city)` Function:** * Constructs the API URL to call the weather server. * Uses `fetch` (or a similar HTTP library available in Cursor) to make the API request. * Handles potential errors (network issues, server errors). * Parses the JSON response from the server. * Returns the parsed data or `null` if an error occurred. 2. **`displayWeather(city)` Function:** * Calls the `getWeather()` function to fetch the weather data. * Displays the weather information in the Cursor IDE (e.g., in a console, a text editor, or a custom UI element). 3. **Example Usage:** * Shows how to call the `displayWeather()` function with a city name. You'll need to integrate this into Cursor's event handling mechanism (e.g., when a user types a command or clicks a button). **6. Key Considerations and Improvements** * **Error Handling:** Implement comprehensive error handling on both the server and the client. Log errors to a file or a monitoring system. Provide informative error messages to the user. * **Data Validation:** Validate the input data on the server (e.g., check if the city name is valid). Use a library like `marshmallow` or `pydantic` for data validation. * **Caching:** Cache the weather data on the server to reduce the number of API calls to the weather service. Use a caching library like `cachetools` or `redis`. * **Asynchronous Operations:** Use asynchronous operations (e.g., with `asyncio` and `aiohttp`) to handle concurrent requests efficiently, especially if you expect many clients. * **Security:** If you're handling sensitive data, implement appropriate security measures (e.g., HTTPS, authentication, authorization). * **Configuration:** Use a configuration file (e.g., a YAML or JSON file) to store the server's settings (API key, port number, etc.). * **Logging:** Implement robust logging to track server activity and debug issues. * **Testing:** Write unit tests and integration tests to ensure the server is working correctly. * **Rate Limiting:** Be mindful of the weather API's rate limits. Implement rate limiting on your server to avoid exceeding the limits. * **API Key Security:** Never commit your API key to your repository. Use environment variables or a secure configuration management system. * **Deployment:** Consider deploying the server to a cloud platform (e.g., AWS, Google Cloud, Azure) for scalability and reliability. **Example using FastAPI (Recommended for Performance):** ```python # weather_server_fastapi.py from fastapi import FastAPI, HTTPException, Query from pydantic import BaseModel import requests import os from dotenv import load_dotenv load_dotenv() app = FastAPI() WEATHER_API_KEY = os.getenv("WEATHER_API_KEY") WEATHER_API_URL = "https://api.openweathermap.org/data/2.5/weather" class WeatherResponse(BaseModel): city: str temperature: float description: str humidity: int wind_speed: float source: str def get_weather_data(city: str): try: params = { 'q': city, 'appid': WEATHER_API_KEY, 'units': 'metric' } response = requests.get(WEATHER_API_URL, params=params) response.raise_for_status() data = response.json() return data except requests.exceptions.RequestException as e: print(f"Error fetching weather data: {e}") return None except Exception as e: print(f"An unexpected error occurred: {e}") return None @app.get("/weather", response_model=WeatherResponse) async def weather(city: str = Query(..., title="City", description="The city to get weather for")): weather_data = get_weather_data(city) if weather_data: temperature = weather_data['main']['temp'] description = weather_data['weather'][0]['description'] humidity = weather_data['main']['humidity'] wind_speed = weather_data['wind']['speed'] return WeatherResponse( city=city, temperature=temperature, description=description, humidity=humidity, wind_speed=wind_speed, source='OpenWeatherMap' ) else: raise HTTPException(status_code=500, detail="Failed to retrieve weather data for the specified city") if __name__ == "__main__": import uvicorn uvicorn.run(app, host="0.0.0.0", port=8000) ``` **Key Differences with FastAPI:** * **FastAPI:** Uses FastAPI instead of Flask. FastAPI is generally faster and provides automatic data validation using Pydantic. * **Pydantic:** Uses Pydantic `BaseModel` to define the structure of the weather response. This provides automatic data validation and serialization. * **Type Hints:** Uses type hints (e.g., `city: str`) for better code readability and maintainability. * **Query Parameters:** Uses `Query` to define the `city` parameter as a query parameter. * **HTTPException:** Uses `HTTPException` to raise HTTP errors with appropriate status codes and error messages. * **uvicorn:** Uses `uvicorn` as the ASGI server to run the FastAPI application. To run the FastAPI example: 1. **Install Dependencies:** ```bash pip install fastapi uvicorn requests python-dotenv ``` 2. **Set Environment Variable:** Create a `.env` file with `WEATHER_API_KEY=YOUR_API_KEY`. 3. **Run the Server:** ```bash python weather_server_fastapi.py ``` The server will start and listen on `http://0.0.0.0:8000`. You can access the API documentation at `http://0.0.0.0:8000/docs`. This comprehensive guide should give you a solid foundation for implementing a weather MCP server that can be called by a client IDE like Cursor. Remember to adapt the code to your specific needs and requirements. Good luck!

Applitools MCP Server

Applitools MCP Server

Enables AI assistants to set up, manage, and analyze visual tests using Applitools Eyes within Playwright JavaScript and TypeScript projects. It supports adding visual checkpoints, configuring cross-browser testing via Ultrafast Grid, and retrieving structured test results.

@deepidv/mcp-server

@deepidv/mcp-server

Enables AI agents to perform identity verification, KYC/KYB, PEP & sanctions screening, bank statement analysis, and workflow automation via the Model Context Protocol.

mcp-gtags-server

mcp-gtags-server

Provides fast, indexed code navigation (definitions, references, callers, etc.) for AI coding agents by leveraging GNU Global (gtags), dramatically reducing context noise compared to grep.

Hacker News MCP Server

Hacker News MCP Server

Enables LLMs to browse Hacker News stories, inspect items, and look up user profiles via the official Firebase API.

AI Voice Assistant MCP Server

AI Voice Assistant MCP Server

Enables a voice-enabled AI assistant to call 7 built-in MCP tools including calculator, web search (DuckDuckGo), weather (wttr.in), date/time, and local file read/write/list operations, integrating with Gemini 2.0 Flash for tool-calling conversations.

MCP Montano Server

MCP Montano Server

Browser AI Debate MCP

Browser AI Debate MCP

An MCP server that orchestrates structured multi-round debates between ChatGPT Web and Gemini Web in the same Chrome browser via CDP, requiring no API keys.

@first-ch/tools-mcp

@first-ch/tools-mcp

MCP server exposing First CH Tools' free web-tool logic for WCAG contrast, JP character counting, WebP conversion, JSON-LD, and llms.txt generation to AI agents.

AI Sticky Notes MCP Server

AI Sticky Notes MCP Server

Enables AI assistants to save and retrieve persistent sticky notes across conversations, with tools, a resource, and a prompt for note management and summarization.

neo4j-gds

neo4j-gds

Enables LLMs to run complex graph algorithms on Neo4j databases, answering graph-related questions by selecting and executing appropriate parameterised graph algorithms.

Melchizedek

Melchizedek

Persistent memory for Claude Code. Automatically indexes every conversation and provides production-grade hybrid search (BM25 + vectors + reranker) via MCP tools. 100% local, zero config, zero API keys, zero invoice.

Google Search MCP Server

Google Search MCP Server

Enables users to perform Google Custom Search queries through the Model Context Protocol. Requires Google API credentials and Custom Search Engine configuration for web search functionality.

Arcjet - MCP Server

Arcjet - MCP Server

Arcjet Model Context Protocol (MCP) server. Help your AI agents implement bot detection, rate limiting, email validation, attack protection, data redaction.

Tarot MCP Server

Tarot MCP Server

Provides tarot card reading capabilities with a complete 78-card deck, multiple spread layouts (Celtic Cross, Past-Present-Future, etc.), and detailed card interpretations for divination and daily guidance.

ULink MCP Server

ULink MCP Server

Enables AI assistants to manage ULink deep linking projects, including creating smart links, configuring domains, and viewing analytics.

German Law MCP Server

German Law MCP Server

Enables querying 6,870 German federal statutes, case law, and legislative preparatory works directly from AI assistants and MCP-compatible clients.

mcp-server-cloudbrowser

mcp-server-cloudbrowser

My Coding Buddy MCP Server

My Coding Buddy MCP Server

A personal AI coding assistant that connects to various development environments and helps automate tasks, provide codebase insights, and improve coding decisions by leveraging the Model Context Protocol.

Xero MCP Server

Xero MCP Server

Máy chủ MCP cho phép Khách hàng tương tác với Phần mềm Kế toán Xero.

Datalog Studio MCP Server

Datalog Studio MCP Server

Integrates with the Datalog Studio REST API to explore projects, tables, and assets within a workspace. It enables users to understand data schemas and upload plain text content directly for AI processing.

Salesforce MCP Server

Salesforce MCP Server

A comprehensive server that transforms Claude Desktop into a Salesforce IDE for managing metadata, executing SOQL queries, and automating multi-org operations. It provides 60 optimized tools for intelligent debugging, bulk data management, and Apex testing through natural language commands.

ThetaCog MCP

ThetaCog MCP

This server enables decidable, hardware-attested semantic verification of AI outputs using on-chip ballistic walks, providing reproducible receipts that can be recomputed byte-for-byte.

Peru Payments MCP

Peru Payments MCP

Enables AI agents to accept payments in Peru including Yape, PagoEfectivo, cards, and Mercado Pago wallet via hosted checkout. Acts as a stateless translation layer without storing funds or credentials.

Specularis AI Visibility Audit

Specularis AI Visibility Audit

Runs AI visibility (GEO/AEO) audits on websites, checking AI crawler access, schema markup, llms.txt, and content signals, with optional full PDF report.

RealTest MCP Server

RealTest MCP Server

Provides structured access to RealTest backtesting documentation and example scripts to help LLM agents generate accurate RealScript code. It offers tools for semantic search, authoritative function references, and verified script retrieval to prevent hallucinations.

brocogni

brocogni

semantic browser observation for AI agents via MCP, 100% local, zero telemetry