Discover Awesome MCP Servers

Extend your agent with 16,638 capabilities via MCP servers.

All16,638
Model Context Protocol (MCP) + Spring Boot Integration

Model Context Protocol (MCP) + Spring Boot Integration

Đang thử nghiệm tính năng mới của máy chủ MCP bằng Spring Boot.

🚀 Wayland MCP Server

🚀 Wayland MCP Server

Máy chủ MCP cho Wayland

MCP DateTime Server

MCP DateTime Server

Provides current local datetime information with timezone support. Serves as a minimal blueprint for building simple, single-purpose MCP servers.

gbox

gbox

Gru-sandbox (gbox) là một dự án mã nguồn mở cung cấp một sandbox tự lưu trữ (self-hostable) cho việc tích hợp MCP hoặc các trường hợp sử dụng tác nhân AI khác.

MCP Demo Server

MCP Demo Server

A minimal fastmcp demonstration server that provides a simple addition tool through the MCP protocol, supporting deployment via Docker with multiple transport modes.

mcpserver-semantickernel-client-demo

mcpserver-semantickernel-client-demo

Chắc chắn rồi, đây là bản dịch tiếng Việt của câu đó: **Đang trình bày một cách triển khai cực kỳ đơn giản của một máy chủ MCP C# được lưu trữ bằng Aspire và được sử dụng bởi Semantic Kernel.**

mcp-server-newbie

mcp-server-newbie

MCP Server Tutorial

MCP Server Tutorial

Java Map Component Platform (Java MCP)

Java Map Component Platform (Java MCP)

Máy chủ java-mcp

Remote MCP Server on Cloudflare

Remote MCP Server on Cloudflare

A deployable Model Context Protocol server on Cloudflare Workers that enables AI models to access custom tools without authentication requirements.

MCP Weather Server

MCP Weather Server

Enables users to retrieve current weather alerts for US states and detailed weather forecasts by geographic coordinates using the US National Weather Service API. Built with Node.js and TypeScript following Model Context Protocol standards for seamless LLM integration.

MCP2ANP Bridge Server

MCP2ANP Bridge Server

Enables MCP clients like Claude Desktop to interact with ANP (Agent Network Protocol) agents through three core tools: authentication setup, document fetching, and OpenRPC method invocation. Converts ANP's crawler-style interaction paradigm into MCP-compatible tools for seamless agent communication.

KatCoder MySQL MCP Server

KatCoder MySQL MCP Server

A secure MySQL Model Context Protocol server that enables AI agents to interact with MySQL databases through standardized operations. Features comprehensive security with SQL injection prevention, connection pooling, and configurable tool access for database operations.

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!

System Information MCP Server

System Information MCP Server

Provides comprehensive system diagnostics and hardware analysis through 10 specialized tools for troubleshooting and environment monitoring. Offers targeted information gathering for CPU, memory, network, storage, processes, and security analysis across Windows, macOS, and Linux platforms.

SQL-Server-MCP

SQL-Server-MCP

mcp-file-oper

mcp-file-oper

file operation

A simple MCP Server

A simple MCP Server

PowerPoint Translator

PowerPoint Translator

Translates PowerPoint presentations while preserving formatting using Amazon Bedrock models, available as both a standalone tool and a FastMCP service for AI assistants like Amazon Q Developer.

KIS REST API MCP Server

KIS REST API MCP Server

Một máy chủ Giao thức Ngữ cảnh Mô hình (Model Context Protocol) để tương tác với API REST của Korea Investment & Securities (KIS), cho phép giao dịch chứng khoán trong nước và nước ngoài, kiểm tra giá và quản lý tài khoản.

Atla MCP Server

Atla MCP Server

Phiên bản ban đầu của máy chủ mcp để các agent tương tác với các mô hình của atla.

MCP Playground

MCP Playground

Sân chơi MCP để học MCP Client và Server

Persistent-Code MCP Server

Persistent-Code MCP Server

Tạo và duy trì một biểu đồ tri thức ngữ nghĩa về mã nguồn, cho phép duy trì ngữ cảnh giữa các phiên làm việc với Claude, cung cấp khả năng tìm kiếm nâng cao mà không cần toàn bộ cơ sở mã trong cửa sổ ngữ cảnh.

MCP-RAG

MCP-RAG

Hệ thống RAG sử dụng máy chủ MCP (RAG system that utilizes MCP server).

reddit-mcp-server

reddit-mcp-server

A Model Context Protocol (MCP) that provides tools for fetching and creating Reddit content.

Google API Discovery Service MCP Server

Google API Discovery Service MCP Server

An MCP server that provides access to Google's API Discovery Service, allowing agents to discover and interact with Google APIs through natural language commands.

mcp-clockify

mcp-clockify

Máy chủ MCP Clockify

Remote MCP Server on Cloudflare

Remote MCP Server on Cloudflare

MCP Server for Coroot

MCP Server for Coroot

A Model Context Protocol server that provides seamless integration with Coroot observability platform, enabling monitoring of applications, analysis of performance metrics, examination of logs and traces, and management of infrastructure through Coroot's comprehensive API.

Chinese Calendar Mcp

Chinese Calendar Mcp