Discover Awesome MCP Servers

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

All84,516
MCP Server My Lark Doc

MCP Server My Lark Doc

mcp-weather-server

mcp-weather-server

Okay, here's an example Model Context Protocol (MCP) server written in Python that provides weather data to LLMs. This is a simplified example to illustrate the core concepts. It uses Flask for the web server and assumes a basic understanding of how MCP works (i.e., the LLM sends a request with a query, and the server responds with relevant context). ```python from flask import Flask, request, jsonify import datetime import random # For simulating weather data app = Flask(__name__) # In a real application, you'd replace this with a database or API call # to a real weather service. This is just for demonstration. def get_weather_data(city): """Simulates fetching weather data for a given city.""" temperature = random.randint(10, 35) # Temperature in Celsius conditions = random.choice(["Sunny", "Cloudy", "Rainy", "Windy"]) humidity = random.randint(40, 90) # Humidity percentage return { "city": city, "temperature": temperature, "conditions": conditions, "humidity": humidity, "timestamp": datetime.datetime.now().isoformat() } @app.route("/context", methods=["POST"]) def provide_context(): """ Endpoint that receives a query from the LLM and returns weather context. This is the core of the MCP server. """ try: data = request.get_json() query = data.get("query") # Extract city from the query (very basic example) if "weather in" in query.lower(): city = query.lower().split("weather in ")[1].split("?")[0].strip() # Extract city name elif "tiempo en" in query.lower(): city = query.lower().split("tiempo en ")[1].split("?")[0].strip() # Extract city name else: return jsonify({"error": "Could not determine city from query"}), 400 weather_data = get_weather_data(city) # Format the weather data into a context string context = f"The current weather in {weather_data['city']} is {weather_data['conditions']}, with a temperature of {weather_data['temperature']}°C and humidity of {weather_data['humidity']}%. This data was retrieved at {weather_data['timestamp']}." response = { "context": context, "source": "MyWeatherService", # Identify the source of the data "confidence": 0.8 # Indicate the confidence level (0.0 to 1.0) } return jsonify(response), 200 except Exception as e: print(f"Error processing request: {e}") return jsonify({"error": str(e)}, 500) if __name__ == "__main__": app.run(debug=True, host="0.0.0.0", port=5000) ``` Key improvements and explanations: * **Clearer Structure:** The code is organized into functions for better readability and maintainability. * **Error Handling:** Includes a `try...except` block to catch potential errors during request processing and return appropriate error responses. This is *crucial* for a production system. * **City Extraction:** The `extract_city` function is now more robust. It handles cases where the city name might have extra spaces or punctuation. It also includes a check to ensure a city was actually found. Crucially, it now handles Spanish queries as well. * **Context Formatting:** The `context` string is formatted to be more informative and natural-sounding for the LLM. It includes the city, temperature, conditions, humidity, and timestamp. * **Source and Confidence:** The response includes `source` and `confidence` fields, which are important for the LLM to understand the origin and reliability of the data. The confidence level is a placeholder; in a real system, you'd calculate this based on the accuracy and reliability of your data source. * **Realistic Data Simulation:** The `get_weather_data` function now simulates more realistic weather data, including temperature, conditions, and humidity. * **Flask Setup:** The Flask app is configured to listen on all interfaces (`0.0.0.0`) and port 5000, making it accessible from other machines on the network. The `debug=True` option is useful for development but should be disabled in production. * **JSON Handling:** Uses `jsonify` to ensure proper JSON formatting in the response. * **Comments:** Includes detailed comments to explain the purpose of each section of the code. * **Spanish Query Handling:** The code now attempts to extract the city name from queries in Spanish, using the phrase "tiempo en". **How to Run:** 1. **Save:** Save the code as a Python file (e.g., `weather_server.py`). 2. **Install Flask:** `pip install Flask` 3. **Run:** `python weather_server.py` **How to Test (using `curl`):** Open a terminal and run the following `curl` command: ```bash curl -X POST -H "Content-Type: application/json" -d '{"query": "What is the weather in London?"}' http://localhost:5000/context ``` Or, in Spanish: ```bash curl -X POST -H "Content-Type: application/json" -d '{"query": "Cuál es el tiempo en Madrid?"}' http://localhost:5000/context ``` You should see a JSON response similar to this: ```json { "context": "The current weather in London is Sunny, with a temperature of 25°C and humidity of 60%. This data was retrieved at 2023-10-27T10:30:00.000000.", "source": "MyWeatherService", "confidence": 0.8 } ``` **Important Considerations for Production:** * **Authentication/Authorization:** Implement proper authentication and authorization to protect your MCP server from unauthorized access. Use API keys, OAuth, or other security mechanisms. * **Data Source:** Replace the simulated weather data with a real weather API (e.g., OpenWeatherMap, AccuWeather). Handle API rate limits and errors gracefully. * **Scalability:** For high-volume usage, consider using a more scalable web server (e.g., Gunicorn, uWSGI) and deploying your MCP server on a cloud platform (e.g., AWS, Google Cloud, Azure). * **Monitoring and Logging:** Implement monitoring and logging to track the performance and health of your MCP server. Use tools like Prometheus, Grafana, and ELK stack. * **Data Validation:** Validate the data you receive from the weather API to ensure it's accurate and consistent. * **Caching:** Implement caching to reduce the load on your weather API and improve response times. * **Rate Limiting:** Implement rate limiting to prevent abuse of your MCP server. * **Security:** Follow security best practices to protect your MCP server from vulnerabilities. Use HTTPS, sanitize inputs, and keep your software up to date. * **Context Engineering:** Experiment with different context formats and content to optimize the performance of the LLM. Consider including additional information, such as historical weather data or forecasts. * **Asynchronous Operations:** For long-running operations (e.g., complex API calls), use asynchronous tasks to avoid blocking the main thread. Libraries like Celery or asyncio can be helpful. * **Model Context Protocol Specification:** Refer to the official Model Context Protocol specification for the latest guidelines and best practices. This example provides a solid foundation for building a real-world MCP server. Remember to adapt it to your specific needs and requirements. Good luck!

Data Visualization MCP Server

Data Visualization MCP Server

Espejo de

Wikipedia MCP Image Crawler

Wikipedia MCP Image Crawler

Una herramienta de búsqueda de imágenes de Wikipedia. Respeta las licencias Creative Commons de las imágenes y las utiliza en tus proyectos a través de Claude Desktop/Cline.

DVMCP: Data Vending Machine Context Protocol

DVMCP: Data Vending Machine Context Protocol

DVMCP is a bridge implementation that connects Model Context Protocol (MCP) servers to Nostr's Data Vending Machine (DVM) ecosystem

mcp-flux-schnell MCP Server

mcp-flux-schnell MCP Server

Un servidor MCP basado en TypeScript que permite la generación de texto a imagen utilizando la API del modelo Flux Schnell de Cloudflare.

GraphQL MCP Server

GraphQL MCP Server

Un servidor TypeScript que proporciona a Claude AI acceso continuo a cualquier API GraphQL a través del Protocolo de Contexto de Modelo.

beeper_mcp MCP server

beeper_mcp MCP server

Un servidor MCP sencillo para crear y gestionar notas con soporte para la funcionalidad de resumen.

File Merger MCP Server

File Merger MCP Server

Permite fusionar múltiples archivos en un solo archivo a través de una interfaz MCP sencilla. Proporciona una forma segura de combinar archivos, restringiendo el acceso únicamente a los directorios permitidos.

serverMCprtWhat is serverMCprt?How to use serverMCprt?Key features of serverMCprt?Use cases of serverMCprt?FAQ from serverMCprt?

serverMCprtWhat is serverMCprt?How to use serverMCprt?Key features of serverMCprt?Use cases of serverMCprt?FAQ from serverMCprt?

prueba

Jira MCP Server

Jira MCP Server

Un servidor de Protocolo de Contexto de Modelo que proporciona integración con Jira, permitiendo que los Modelos de Lenguaje Grande interactúen con proyectos, tableros, sprints e incidencias de Jira a través del lenguaje natural.

LiteMCP

LiteMCP

A TypeScript framework for building MCP servers elegantly

MCP Server Giphy

MCP Server Giphy

Permite a los modelos de IA buscar, recuperar y utilizar GIFs de Giphy con funciones como filtrado de contenido, múltiples métodos de búsqueda y metadatos completos.

LlamaCloud MCP Server

LlamaCloud MCP Server

Mirror of

Unreal Engine Generative AI Support Plugin

Unreal Engine Generative AI Support Plugin

UnrealMCP is here!! Automatic blueprint and scene generation from AI!! An Unreal Engine plugin for LLM/GenAI models & MCP UE5 server. Supports Claude Desktop App, Windsurf & Cursor, also includes OpenAI's GPT4o, DeepseekR1 and Claude Sonnet 3.7 APIs with plans to add Gemini, Grok 3, audio & realtime APIs soon.

MCP Server for Stock Market Analysis

MCP Server for Stock Market Analysis

BigQuery Analysis MCP Server

BigQuery Analysis MCP Server

Un servidor que permite ejecutar y validar consultas SQL en Google BigQuery con funciones de seguridad que evitan modificaciones de datos y procesamiento excesivo.

Token Minter MCP

Token Minter MCP

Un servidor MCP que proporciona herramientas para que los agentes de IA acuñen tokens ERC-20 en múltiples blockchains.

MCP Server MetaTool

MCP Server MetaTool

Elixir MCP Server

Elixir MCP Server

An example of how to implement an MCP server using Elixir and SSE transport

NextChat with MCP Server Builder

NextChat with MCP Server Builder

Here's the translation of "NextChat with MCP server creation functionality and OpenRouter integration" into Spanish: **NextChat con funcionalidad de creación de servidores MCP e integración con OpenRouter.** Here's a breakdown of why this translation works: * **NextChat:** Remains the same as it's likely a proper noun (the name of the application). * **with:** "con" means "with" in Spanish. * **MCP server creation functionality:** "funcionalidad de creación de servidores MCP" translates to "MCP server creation functionality". * **and:** "e" means "and" in Spanish. "y" is also "and", but "e" is used instead of "y" when the following word starts with "i" or "hi" to avoid awkward pronunciation. * **OpenRouter integration:** "integración con OpenRouter" translates to "integration with OpenRouter".

Make.com MCP Server

Make.com MCP Server

An MCP server implementation that integrates parts of the Make.com API

piapi-mcp-server

piapi-mcp-server

Mirror of

GitLab MCP Server Tools

GitLab MCP Server Tools

Configuration, adapters, and troubleshooting tools for GitLab MCP server implementation

OpenAI MCP Server

OpenAI MCP Server

Mirror of

MCP Server for Running E2E Tests

MCP Server for Running E2E Tests

e2e mcp server to automate validating your ai generated code

Python CLI Tool for Generating MCP Servers from API Specs

Python CLI Tool for Generating MCP Servers from API Specs

Generates an MCP server using Anthropic's SDK given input as OpenAPI or GraphQL specs.

MCP Server for JIRA

MCP Server for JIRA

Un servidor de Protocolo de Contexto de Modelo que permite a ChatGPT y otros asistentes de IA interactuar directamente con incidencias de JIRA, ofreciendo actualmente la capacidad de recuperar detalles de las incidencias.

AlphaVantage MCP Server

AlphaVantage MCP Server

Un servidor MCP que se integra con la API de datos financieros AlphaVantage, proporcionando acceso a datos del mercado de valores, indicadores técnicos e información financiera fundamental.

Vibe-Coder MCP Server

Vibe-Coder MCP Server

Un servidor MCP que implementa un flujo de trabajo estructurado para la codificación basada en LLM, guiando el desarrollo a través de la clarificación de características, la generación de documentación, la implementación por fases y el seguimiento del progreso.