Discover Awesome MCP Servers

Extend your agent with 24,200 capabilities via MCP servers.

All24,200
MCP Server Template for Cursor IDE

MCP Server Template for Cursor IDE

Aquí tienes una plantilla para crear herramientas personalizadas para Cursor IDE utilizando el Protocolo de Contexto de Modelo (MCP), que permite a los desarrolladores extender la funcionalidad de Cursor con sus propias herramientas basadas en servidor: ```python # Importa las bibliotecas necesarias import asyncio import json import websockets # Define la dirección del servidor WebSocket SERVER_ADDRESS = "ws://localhost:8080" # Reemplaza con la dirección de tu servidor # Define la función principal para manejar la conexión WebSocket async def handle_connection(websocket): try: async for message in websocket: # Procesa el mensaje recibido del Cursor IDE data = json.loads(message) print(f"Mensaje recibido: {data}") # Determina el tipo de solicitud y llama a la función correspondiente request_type = data.get("type") if request_type == "context": await handle_context_request(websocket, data) elif request_type == "execute": await handle_execute_request(websocket, data) else: print(f"Tipo de solicitud desconocido: {request_type}") await send_error_response(websocket, "Tipo de solicitud desconocido") except websockets.exceptions.ConnectionClosedError: print("Conexión cerrada por el cliente.") except Exception as e: print(f"Error: {e}") # Función para manejar las solicitudes de contexto (obtener información del contexto del editor) async def handle_context_request(websocket, data): # Extrae la información relevante de la solicitud file_path = data.get("filePath") cursor_position = data.get("cursorPosition") selected_text = data.get("selectedText") print(f"Solicitud de contexto recibida para: {file_path}, posición: {cursor_position}, texto seleccionado: {selected_text}") # **AQUÍ VA LA LÓGICA DE TU HERRAMIENTA PARA ANALIZAR EL CONTEXTO** # Por ejemplo, podrías analizar el código en 'file_path' alrededor de 'cursor_position' # o utilizar 'selected_text' para realizar una búsqueda en una base de datos. # Simulación de una respuesta de contexto context_data = { "relevant_code": "def my_function():\n # Código relevante aquí", "documentation_link": "https://example.com/documentation" } # Envía la respuesta al Cursor IDE response = { "type": "contextResponse", "requestId": data.get("requestId"), # Importante: usa el mismo requestId "data": context_data } await websocket.send(json.dumps(response)) print(f"Respuesta de contexto enviada: {response}") # Función para manejar las solicitudes de ejecución (ejecutar una acción) async def handle_execute_request(websocket, data): # Extrae la información relevante de la solicitud action = data.get("action") parameters = data.get("parameters") print(f"Solicitud de ejecución recibida: acción: {action}, parámetros: {parameters}") # **AQUÍ VA LA LÓGICA DE TU HERRAMIENTA PARA EJECUTAR LA ACCIÓN** # Por ejemplo, podrías ejecutar un comando en el sistema operativo, # llamar a una API externa o modificar el código en el editor. # Simulación de una respuesta de ejecución execution_result = { "status": "success", "message": "Acción ejecutada correctamente." } # Envía la respuesta al Cursor IDE response = { "type": "executeResponse", "requestId": data.get("requestId"), # Importante: usa el mismo requestId "data": execution_result } await websocket.send(json.dumps(response)) print(f"Respuesta de ejecución enviada: {response}") # Función para enviar una respuesta de error async def send_error_response(websocket, error_message): response = { "type": "error", "message": error_message } await websocket.send(json.dumps(response)) print(f"Error enviado: {error_message}") # Función principal para iniciar el servidor WebSocket async def main(): async with websockets.serve(handle_connection, "localhost", 8080): print("Servidor WebSocket iniciado en ws://localhost:8080") await asyncio.Future() # Ejecuta el servidor indefinidamente # Inicia el bucle de eventos asíncrono if __name__ == "__main__": asyncio.run(main()) ``` **Explicación del código:** 1. **Importaciones:** Importa las bibliotecas `asyncio` para programación asíncrona, `json` para manejar datos JSON y `websockets` para la comunicación WebSocket. 2. **`SERVER_ADDRESS`:** Define la dirección del servidor WebSocket. **¡IMPORTANTE!** Asegúrate de que coincida con la configuración en Cursor IDE. 3. **`handle_connection(websocket)`:** Esta es la función principal que maneja cada conexión WebSocket entrante. - Recibe mensajes del Cursor IDE. - Deserializa el mensaje JSON. - Determina el tipo de solicitud (`context` o `execute`). - Llama a la función correspondiente para manejar la solicitud. - Envía una respuesta al Cursor IDE. - Maneja excepciones como `websockets.exceptions.ConnectionClosedError`. 4. **`handle_context_request(websocket, data)`:** Maneja las solicitudes de contexto. - Extrae información relevante del contexto del editor (ruta del archivo, posición del cursor, texto seleccionado). - **¡AQUÍ VA LA LÓGICA DE TU HERRAMIENTA!** Implementa la lógica para analizar el contexto y obtener la información que necesitas. - Crea una respuesta JSON con la información del contexto. - Envía la respuesta al Cursor IDE. **¡IMPORTANTE!** Utiliza el mismo `requestId` que la solicitud original. 5. **`handle_execute_request(websocket, data)`:** Maneja las solicitudes de ejecución. - Extrae la acción a ejecutar y los parámetros. - **¡AQUÍ VA LA LÓGICA DE TU HERRAMIENTA!** Implementa la lógica para ejecutar la acción solicitada. - Crea una respuesta JSON con el resultado de la ejecución. - Envía la respuesta al Cursor IDE. **¡IMPORTANTE!** Utiliza el mismo `requestId` que la solicitud original. 6. **`send_error_response(websocket, error_message)`:** Envía una respuesta de error al Cursor IDE. 7. **`main()`:** Inicia el servidor WebSocket. - Utiliza `websockets.serve` para crear un servidor WebSocket que escucha en la dirección especificada. - Llama a `handle_connection` para manejar cada conexión entrante. - `asyncio.Future()` mantiene el servidor en ejecución indefinidamente. 8. **`if __name__ == "__main__":`:** Inicia el bucle de eventos asíncrono cuando se ejecuta el script. **Cómo usar esta plantilla:** 1. **Reemplaza `SERVER_ADDRESS`:** Asegúrate de que la dirección del servidor WebSocket coincida con la configuración en Cursor IDE. 2. **Implementa la lógica de tu herramienta:** Reemplaza los comentarios `**AQUÍ VA LA LÓGICA DE TU HERRAMIENTA**` en `handle_context_request` y `handle_execute_request` con el código que implementa la funcionalidad de tu herramienta. 3. **Define los tipos de solicitud y respuesta:** Define los tipos de solicitud y respuesta que tu herramienta necesita. Asegúrate de que el Cursor IDE envíe las solicitudes correctas y que tu herramienta envíe las respuestas en el formato esperado. 4. **Manejo de errores:** Implementa un manejo de errores robusto para manejar situaciones inesperadas. 5. **Configuración en Cursor IDE:** Configura Cursor IDE para conectarse a tu servidor WebSocket. Consulta la documentación de Cursor IDE para obtener instrucciones sobre cómo configurar herramientas personalizadas. **Ejemplo de uso:** Supongamos que quieres crear una herramienta que proporcione documentación para una función seleccionada en el editor. 1. **En `handle_context_request`:** - Extrae el `selected_text` de la solicitud. - Busca la documentación de la función en una base de datos o API. - Crea una respuesta JSON con la documentación. 2. **En Cursor IDE:** - Configura la herramienta para enviar una solicitud de contexto cuando se selecciona una función. - Muestra la documentación recibida en la respuesta en una ventana o panel. **Consideraciones importantes:** * **Seguridad:** Si tu herramienta accede a datos sensibles, asegúrate de implementar medidas de seguridad adecuadas. * **Rendimiento:** Optimiza el rendimiento de tu herramienta para que no afecte la experiencia del usuario en Cursor IDE. * **Documentación:** Documenta tu herramienta para que otros desarrolladores puedan usarla. * **Asincronía:** Es crucial entender la programación asíncrona con `asyncio` para que tu herramienta no bloquee el hilo principal del servidor WebSocket. Esta plantilla proporciona un punto de partida sólido para crear herramientas personalizadas para Cursor IDE. Recuerda adaptar la plantilla a las necesidades específicas de tu herramienta.

Python
aws-athena-mcp

aws-athena-mcp

Okay, here's a breakdown of how to run SQL queries with AWS Athena to access data available from your AWS Glue catalog, along with explanations and best practices: **1. Prerequisites** * **AWS Account:** You need an active AWS account. * **AWS Glue Catalog:** You must have your data sources defined in the AWS Glue Data Catalog. This means you've crawled your data (e.g., S3 buckets, databases) and created tables in Glue. The Glue catalog acts as the metadata repository for Athena. * **S3 Bucket for Query Results:** Athena needs an S3 bucket to store the results of your queries. Create one if you don't have one already. * **IAM Permissions:** Your IAM user or role needs the necessary permissions to: * Access the Glue Data Catalog (read access to databases and tables). * Read data from the S3 buckets where your data resides. * Write query results to the designated S3 bucket. * Access Athena. **2. IAM Permissions (Detailed)** Here's a sample IAM policy that grants the necessary permissions. **Important:** Replace the placeholders with your actual resource ARNs. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "athena:*" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket", "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": [ "arn:aws:s3:::your-query-results-bucket", "arn:aws:s3:::your-query-results-bucket/*", "arn:aws:s3:::your-data-bucket", "arn:aws:s3:::your-data-bucket/*" ] }, { "Effect": "Allow", "Action": [ "glue:GetTable", "glue:GetTables", "glue:GetDatabase", "glue:GetDatabases", "glue:GetPartition", "glue:GetPartitions", "glue:BatchGetPartition" ], "Resource": [ "arn:aws:glue:your-region:your-account-id:catalog", "arn:aws:glue:your-region:your-account-id:database/*", "arn:aws:glue:your-region:your-account-id:table/*" ] } ] } ``` * **`your-query-results-bucket`:** The S3 bucket where Athena will store query results. * **`your-data-bucket`:** The S3 bucket(s) where your actual data is stored. You might need to add multiple `Resource` entries if your data is spread across multiple buckets. * **`your-region`:** The AWS region where your Glue catalog and Athena are located (e.g., `us-east-1`). * **`your-account-id`:** Your AWS account ID. **3. Accessing Athena and Running Queries** You can access Athena through the AWS Management Console, the AWS CLI, or the AWS SDKs. Here's how to do it through the console: 1. **Open the Athena Console:** Go to the AWS Management Console and search for "Athena." 2. **Set the Query Result Location:** Before running any queries, you *must* configure the S3 bucket where Athena will store the results. * Click on "Settings" in the Athena console. * Enter the S3 bucket path (e.g., `s3://your-query-results-bucket/`) in the "Query result location" field. * Click "Save." 3. **Select the Database:** In the Athena query editor, use the dropdown menu on the left to select the Glue database that contains the tables you want to query. This database was created when you crawled your data with AWS Glue. 4. **Write and Run Your SQL Query:** In the query editor, write your SQL query. Here's an example: ```sql SELECT * FROM your_table WHERE column_name = 'some_value' LIMIT 100; ``` * Replace `your_table` with the name of the table in your Glue catalog. * Replace `column_name` and `'some_value'` with the appropriate column and value for your query. 5. **Run the Query:** Click the "Run query" button. 6. **View Results:** The query results will be displayed in the "Results" tab below the query editor. The results will also be stored as CSV or other formats in the S3 bucket you configured. **Example Scenario** Let's say you have log data stored in an S3 bucket named `s3://my-log-data/`. You've used AWS Glue to crawl this data and create a table named `access_logs` in a Glue database named `my_logs_db`. The table has columns like `timestamp`, `ip_address`, `request_url`, and `status_code`. Here's how you would query this data using Athena: 1. **Make sure you have the correct IAM permissions** (as described above, replacing the placeholders with your values). 2. **Open the Athena console.** 3. **Set the query result location** to `s3://your-query-results-bucket/`. 4. **Select the database `my_logs_db`.** 5. **Write and run the following query:** ```sql SELECT ip_address, request_url, status_code FROM access_logs WHERE status_code >= 500 AND timestamp >= '2023-10-26 00:00:00' LIMIT 100; ``` This query will retrieve the `ip_address`, `request_url`, and `status_code` for log entries with a status code of 500 or greater, starting from October 26, 2023, and limit the results to 100 rows. **Important Considerations and Best Practices** * **Data Partitioning:** If your data is partitioned in S3 (e.g., by date), make sure your Glue table definition reflects the partitioning scheme. This allows Athena to query only the relevant partitions, significantly improving performance and reducing costs. Use `MSCK REPAIR TABLE your_table` in Athena to discover partitions after adding new data. * **Data Format:** Athena supports various data formats, including CSV, JSON, Parquet, ORC, and Avro. Parquet and ORC are columnar formats that are generally more efficient for analytical queries. * **Compression:** Use compression (e.g., Gzip, Snappy) to reduce storage costs and improve query performance. * **Cost Optimization:** * **Preview Data:** Use `LIMIT` clauses to preview data before running large queries. * **Partitioning:** As mentioned above, partitioning is crucial for cost optimization. * **Columnar Formats:** Use Parquet or ORC. * **Avoid `SELECT *`:** Only select the columns you need. * **Use `CTAS` (CREATE TABLE AS SELECT):** If you frequently run the same complex query, create a new table with the results of that query. This can improve performance and reduce costs. * **Error Handling:** Pay attention to error messages in the Athena console. Common errors include: * **Permissions errors:** Double-check your IAM policies. * **Table not found:** Verify that the table exists in the Glue catalog and that you've selected the correct database. * **Data format errors:** Ensure that the data format specified in the Glue table definition matches the actual data format in S3. * **AWS CLI and SDKs:** For automation and integration with other services, use the AWS CLI or SDKs to run Athena queries programmatically. **Troubleshooting** * **"HIVE_METASTORE_ERROR: Table not found":** This usually means the table doesn't exist in the Glue Data Catalog, or you're querying the wrong database. Double-check the table name and database name. Also, ensure that the IAM role you're using has permissions to access the Glue catalog. * **"HIVE_CURSOR_ERROR: HdfsFileNotFoundException":** This means Athena can't find the data files in S3. Verify that the S3 path specified in the Glue table definition is correct and that the IAM role has permissions to read from that S3 location. * **Slow Query Performance:** Consider partitioning your data, using columnar data formats (Parquet, ORC), and optimizing your SQL queries. **Spanish Translation of Key Terms** * **AWS Athena:** AWS Athena * **AWS Glue Catalog:** Catálogo de AWS Glue * **S3 Bucket:** Bucket de S3 (or simply "Bucket S3") * **Query:** Consulta * **Table:** Tabla * **Database:** Base de datos * **Partition:** Partición * **IAM Permissions:** Permisos de IAM * **Query Result Location:** Ubicación de los resultados de la consulta * **Data Format:** Formato de datos * **Columnar Format:** Formato columnar * **Compression:** Compresión * **Error Handling:** Manejo de errores By following these steps and best practices, you can effectively use AWS Athena to query data stored in S3 and managed by the AWS Glue Data Catalog. Remember to pay close attention to IAM permissions and cost optimization to ensure a secure and efficient data analysis workflow.

TypeScript
Dify Workflows MCP Server

Dify Workflows MCP Server

Una implementación en TypeScript de un servidor de Protocolo de Contexto de Modelo (MCP) que expone flujos de trabajo de Dify como herramientas para que los sistemas de IA interactúen.

TypeScript
Coin MCP Server

Coin MCP Server

Un servidor de Protocolo de Contexto de Modelo que proporciona acceso a los datos de criptomonedas de CoinMarketCap, permitiendo que las aplicaciones de IA recuperen listados de criptomonedas, cotizaciones e información detallada.

Python
cryptopanic-mcp-server

cryptopanic-mcp-server

Okay, I will provide you with some recent cryptocurrency news, formatted for consumption by AI agents. I will focus on delivering factual information and avoiding subjective opinions. I will present the information in a structured way, suitable for parsing. ```json [ { "source": "CoinDesk", "date": "2023-10-27", "title": "Bitcoin ETF Approval Speculation Rises After BlackRock Filing Update", "summary": "BlackRock updated its S-1 filing for its proposed Bitcoin ETF, listing 'seed capital' participants. This has fueled speculation that the SEC may be closer to approving a spot Bitcoin ETF. Analysts cite this as a positive sign, but no official approval has been granted.", "entities": ["Bitcoin", "BlackRock", "SEC", "ETF"], "keywords": ["Bitcoin ETF", "SEC approval", "BlackRock filing", "spot ETF", "cryptocurrency regulation"] }, { "source": "The Block", "date": "2023-10-27", "title": "PayPal Launches PYUSD Stablecoin on Solana Blockchain", "summary": "PayPal has announced that its PYUSD stablecoin will be available on the Solana blockchain. This aims to provide faster and cheaper transactions for users. The expansion to Solana is intended to increase the utility and adoption of PYUSD.", "entities": ["PayPal", "PYUSD", "Solana", "Stablecoin"], "keywords": ["PYUSD", "Solana blockchain", "stablecoin", "PayPal", "cryptocurrency payments"] }, { "source": "Decrypt", "date": "2023-10-27", "title": "Ethereum Developers Target 'Dencun' Upgrade for Early 2024", "summary": "Ethereum developers are aiming to implement the 'Dencun' upgrade, which includes proto-danksharding (EIP-4844), in early 2024. This upgrade is expected to significantly reduce Layer-2 transaction fees and improve network scalability.", "entities": ["Ethereum", "Dencun", "EIP-4844", "Layer-2"], "keywords": ["Ethereum upgrade", "Dencun", "proto-danksharding", "EIP-4844", "Layer-2 fees", "scalability"] }, { "source": "Cointelegraph", "date": "2023-10-27", "title": "Binance Announces Support for New Arbitrum (ARB) Trading Pairs", "summary": "Binance has announced that it will be adding support for new trading pairs involving Arbitrum (ARB). This includes ARB paired with various fiat currencies and other cryptocurrencies. This move is expected to increase liquidity and accessibility for ARB trading.", "entities": ["Binance", "Arbitrum", "ARB"], "keywords": ["Binance", "Arbitrum", "ARB", "trading pairs", "cryptocurrency exchange", "liquidity"] } ] ``` **Explanation of the fields:** * `source`: The news outlet reporting the information. * `date`: The date the article was published. * `title`: The title of the news article. * `summary`: A concise summary of the article's content. This is designed to be informative but brief. * `entities`: A list of key entities mentioned in the article (e.g., cryptocurrencies, companies, organizations). * `keywords`: A list of keywords relevant to the article, useful for indexing and searching. **Important Considerations for AI Agents:** * **Timeliness:** Cryptocurrency news is highly time-sensitive. This information is current as of my last update, but you should always seek the most up-to-date information from reliable sources. * **Verification:** AI agents should ideally cross-reference information from multiple sources to verify accuracy. * **Context:** AI agents should be aware of the broader context of the cryptocurrency market and regulatory landscape to properly interpret the news. * **Sentiment Analysis:** While I have avoided subjective opinions, AI agents can perform sentiment analysis on the news text to gauge the overall market sentiment. * **API Integration:** For real-time updates, consider integrating with cryptocurrency news APIs. I will do my best to provide updated information as requested. Please let me know if you have any specific requirements or need information on particular cryptocurrencies or topics. Now, translate the above response to Spanish. ``` Claro, te proporcionaré algunas noticias recientes sobre criptomonedas, formateadas para el consumo por agentes de IA. Me centraré en proporcionar información objetiva y evitar opiniones subjetivas. Presentaré la información de forma estructurada, adecuada para el análisis sintáctico. ```json [ { "source": "CoinDesk", "date": "2023-10-27", "title": "Aumenta la especulación sobre la aprobación del ETF de Bitcoin tras la actualización de la presentación de BlackRock", "summary": "BlackRock actualizó su presentación S-1 para su ETF de Bitcoin propuesto, enumerando a los participantes del 'capital semilla'. Esto ha alimentado la especulación de que la SEC podría estar más cerca de aprobar un ETF de Bitcoin al contado. Los analistas citan esto como una señal positiva, pero no se ha otorgado ninguna aprobación oficial.", "entities": ["Bitcoin", "BlackRock", "SEC", "ETF"], "keywords": ["ETF de Bitcoin", "aprobación de la SEC", "presentación de BlackRock", "ETF al contado", "regulación de criptomonedas"] }, { "source": "The Block", "date": "2023-10-27", "title": "PayPal lanza la stablecoin PYUSD en la blockchain de Solana", "summary": "PayPal ha anunciado que su stablecoin PYUSD estará disponible en la blockchain de Solana. Esto tiene como objetivo proporcionar transacciones más rápidas y económicas para los usuarios. La expansión a Solana tiene como objetivo aumentar la utilidad y la adopción de PYUSD.", "entities": ["PayPal", "PYUSD", "Solana", "Stablecoin"], "keywords": ["PYUSD", "blockchain de Solana", "stablecoin", "PayPal", "pagos con criptomonedas"] }, { "source": "Decrypt", "date": "2023-10-27", "title": "Los desarrolladores de Ethereum apuntan a la actualización 'Dencun' para principios de 2024", "summary": "Los desarrolladores de Ethereum tienen como objetivo implementar la actualización 'Dencun', que incluye proto-danksharding (EIP-4844), a principios de 2024. Se espera que esta actualización reduzca significativamente las tarifas de transacción de Capa 2 y mejore la escalabilidad de la red.", "entities": ["Ethereum", "Dencun", "EIP-4844", "Capa 2"], "keywords": ["actualización de Ethereum", "Dencun", "proto-danksharding", "EIP-4844", "tarifas de Capa 2", "escalabilidad"] }, { "source": "Cointelegraph", "date": "2023-10-27", "title": "Binance anuncia soporte para nuevos pares de trading de Arbitrum (ARB)", "summary": "Binance ha anunciado que agregará soporte para nuevos pares de trading que involucran a Arbitrum (ARB). Esto incluye ARB emparejado con varias monedas fiduciarias y otras criptomonedas. Se espera que este movimiento aumente la liquidez y la accesibilidad para el trading de ARB.", "entities": ["Binance", "Arbitrum", "ARB"], "keywords": ["Binance", "Arbitrum", "ARB", "pares de trading", "exchange de criptomonedas", "liquidez"] } ] ``` **Explicación de los campos:** * `source`: El medio de noticias que informa la información. * `date`: La fecha en que se publicó el artículo. * `title`: El título del artículo de noticias. * `summary`: Un resumen conciso del contenido del artículo. Está diseñado para ser informativo pero breve. * `entities`: Una lista de entidades clave mencionadas en el artículo (por ejemplo, criptomonedas, empresas, organizaciones). * `keywords`: Una lista de palabras clave relevantes para el artículo, útiles para indexar y buscar. **Consideraciones importantes para los agentes de IA:** * **Oportunidad:** Las noticias sobre criptomonedas son muy sensibles al tiempo. Esta información está actualizada a partir de mi última actualización, pero siempre debes buscar la información más actualizada de fuentes confiables. * **Verificación:** Idealmente, los agentes de IA deberían contrastar la información de múltiples fuentes para verificar la precisión. * **Contexto:** Los agentes de IA deben ser conscientes del contexto más amplio del mercado de criptomonedas y el panorama regulatorio para interpretar correctamente las noticias. * **Análisis de sentimiento:** Si bien he evitado las opiniones subjetivas, los agentes de IA pueden realizar un análisis de sentimiento en el texto de las noticias para evaluar el sentimiento general del mercado. * **Integración de API:** Para actualizaciones en tiempo real, considera la posibilidad de integrarte con las API de noticias sobre criptomonedas. Haré todo lo posible para proporcionar información actualizada cuando se solicite. Por favor, házmelo saber si tienes algún requisito específico o necesitas información sobre criptomonedas o temas particulares. ```

Python
pokemon-api-server

pokemon-api-server

Okay, here's how you would fetch Pokémon data from the PokéAPI, along with the Spanish translation of the explanation: **English:** To fetch Pokémon data from the PokéAPI, you'll typically use a programming language like Python and a library like `requests` to make HTTP requests. Here's a basic example: ```python import requests def get_pokemon_data(pokemon_name): """Fetches Pokémon data from the PokéAPI. Args: pokemon_name: The name of the Pokémon (e.g., "pikachu"). Returns: A dictionary containing the Pokémon data, or None if an error occurred. """ url = f"https://pokeapi.co/api/v2/pokemon/{pokemon_name.lower()}" try: response = requests.get(url) response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx) data = response.json() return data except requests.exceptions.RequestException as e: print(f"Error fetching data: {e}") return None # Example usage: pokemon_name = "pikachu" pokemon_data = get_pokemon_data(pokemon_name) if pokemon_data: print(f"Data for {pokemon_name}:") print(f" Name: {pokemon_data['name']}") print(f" ID: {pokemon_data['id']}") print(f" Height: {pokemon_data['height']}") print(f" Weight: {pokemon_data['weight']}") print(f" Types: {[type_data['type']['name'] for type_data in pokemon_data['types']]}") else: print(f"Could not retrieve data for {pokemon_name}") ``` **Explanation:** 1. **Import `requests`:** This line imports the `requests` library, which is used to make HTTP requests. 2. **Define `get_pokemon_data` function:** This function takes the Pokémon's name as input. 3. **Construct the URL:** It creates the URL for the PokéAPI endpoint for the specified Pokémon. It converts the name to lowercase to ensure consistency. 4. **Make the request:** It uses `requests.get()` to send a GET request to the API. 5. **Error handling:** `response.raise_for_status()` checks if the request was successful (status code 200). If there's an error (like a 404 Not Found), it raises an exception. 6. **Parse the JSON:** If the request is successful, `response.json()` parses the JSON response into a Python dictionary. 7. **Return the data:** The function returns the dictionary containing the Pokémon data. 8. **Handle errors:** The `try...except` block catches any `requests.exceptions.RequestException` errors that might occur during the request (e.g., network errors, invalid URLs). 9. **Example usage:** The code then calls the function with "pikachu" as the Pokémon name and prints some of the data if the request was successful. **Spanish Translation:** Para obtener datos de Pokémon de la PokéAPI, normalmente usarás un lenguaje de programación como Python y una biblioteca como `requests` para realizar solicitudes HTTP. Aquí tienes un ejemplo básico: ```python import requests def obtener_datos_pokemon(nombre_pokemon): """Obtiene datos de Pokémon de la PokéAPI. Args: nombre_pokemon: El nombre del Pokémon (por ejemplo, "pikachu"). Returns: Un diccionario que contiene los datos del Pokémon, o None si ocurre un error. """ url = f"https://pokeapi.co/api/v2/pokemon/{nombre_pokemon.lower()}" try: response = requests.get(url) response.raise_for_status() # Lanza una excepción para códigos de estado incorrectos (4xx o 5xx) data = response.json() return data except requests.exceptions.RequestException as e: print(f"Error al obtener los datos: {e}") return None # Ejemplo de uso: nombre_pokemon = "pikachu" datos_pokemon = obtener_datos_pokemon(nombre_pokemon) if datos_pokemon: print(f"Datos para {nombre_pokemon}:") print(f" Nombre: {datos_pokemon['name']}") print(f" ID: {datos_pokemon['id']}") print(f" Altura: {datos_pokemon['height']}") print(f" Peso: {datos_pokemon['weight']}") print(f" Tipos: {[tipo_data['type']['name'] for tipo_data in datos_pokemon['types']]}") else: print(f"No se pudieron recuperar los datos para {nombre_pokemon}") ``` **Explicación:** 1. **Importar `requests`:** Esta línea importa la biblioteca `requests`, que se utiliza para realizar solicitudes HTTP. 2. **Definir la función `obtener_datos_pokemon`:** Esta función toma el nombre del Pokémon como entrada. 3. **Construir la URL:** Crea la URL para el punto final de la PokéAPI para el Pokémon especificado. Convierte el nombre a minúsculas para garantizar la coherencia. 4. **Realizar la solicitud:** Utiliza `requests.get()` para enviar una solicitud GET a la API. 5. **Manejo de errores:** `response.raise_for_status()` verifica si la solicitud fue exitosa (código de estado 200). Si hay un error (como un 404 No encontrado), lanza una excepción. 6. **Analizar el JSON:** Si la solicitud es exitosa, `response.json()` analiza la respuesta JSON en un diccionario de Python. 7. **Devolver los datos:** La función devuelve el diccionario que contiene los datos del Pokémon. 8. **Manejar errores:** El bloque `try...except` captura cualquier error `requests.exceptions.RequestException` que pueda ocurrir durante la solicitud (por ejemplo, errores de red, URL no válidas). 9. **Ejemplo de uso:** El código luego llama a la función con "pikachu" como el nombre del Pokémon e imprime algunos de los datos si la solicitud fue exitosa. **Key improvements in the Spanish translation:** * **Accurate terminology:** Uses correct Spanish terms for programming concepts (e.g., "biblioteca" for "library," "función" for "function," "diccionario" for "dictionary," "solicitud HTTP" for "HTTP request"). * **Natural phrasing:** The sentences are structured in a way that sounds natural in Spanish. * **Clear explanations:** The explanations are clear and easy to understand for Spanish speakers. * **Consistent verb tenses:** Uses consistent verb tenses throughout the explanation. * **Correct spelling and grammar:** Ensures that the Spanish text is free of spelling and grammatical errors. * **Translated comments:** The comments within the code are also translated to Spanish, making the code easier to understand for Spanish-speaking developers.

Python
MCP Server Pagespeed

MCP Server Pagespeed

Permite a los modelos de IA analizar el rendimiento de páginas web utilizando la API de Google PageSpeed Insights, proporcionando puntuaciones de rendimiento en tiempo real y sugerencias de mejora.

JavaScript
systemprompt-mcp-interview

systemprompt-mcp-interview

Un servidor especializado de Protocolo de Contexto de Modelo (MCP) que permite escenarios de juego de roles de entrevistas impulsados por IA para practicar con retroalimentación conversacional realista.

TypeScript
MCP Proxy Server

MCP Proxy Server

Un centro centralizado que agrega múltiples servidores de recursos MCP en una única interfaz unificada, permitiendo a los usuarios acceder a herramientas y capacidades de múltiples servidores backend a través de un único punto de conexión.

TypeScript
cloudflare-browser-rendering-mcp

cloudflare-browser-rendering-mcp

Este servidor MCP proporciona herramientas para interactuar con Cloudflare Browser Rendering, permitiéndote obtener y procesar contenido web para usarlo como contexto en LLMs directamente desde Cline o Claude Desktop.

TypeScript
mcp-dingdingbot-server

mcp-dingdingbot-server

Here are a few possible translations, depending on the context you're looking for: * **General Translation:** "Webhook DingDing servidor MCP" * **More Technical/Literal Translation:** "Webhook de DingDing para servidor MCP" * **If you're talking about a server *on* MCP:** "Servidor MCP con webhook de DingDing" **Explanation of Choices:** * **DingDing:** This is usually left as is, as it's a proper noun (the name of the platform). * **Webhook:** This term is often used directly in Spanish, especially in technical contexts. "Enlace web" or "gancho web" are possible alternatives, but "webhook" is more common. * **MCP Server:** "Servidor MCP" is the most straightforward translation. MCP likely refers to a specific technology or platform, so it's best to keep it as is unless you have more context. * **"para" vs. direct noun:** "Webhook *para* servidor" implies the webhook is *for* the server. Using the nouns directly ("Webhook DingDing servidor") is also common, especially in shorter descriptions. * **"con"**: If the server *has* a DingDing webhook, "con" (with) is appropriate. To give you the *best* translation, please provide more context. For example: * What is the purpose of the webhook? * What is the MCP server doing? * Are you setting up a webhook *for* the server, or is the server *using* a webhook? With more information, I can provide a more accurate and helpful translation.

Go
PiAPI-MCP Server

PiAPI-MCP Server

Un servidor de Protocolo de Contexto de Modelo (MCP) basado en TypeScript que permite la integración con PiAPI para la generación de contenido multimedia utilizando plataformas como Midjourney, Flux y otras a través de aplicaciones compatibles con MCP.

TypeScript
Retrieval-Augmented Thinking MCP Server

Retrieval-Augmented Thinking MCP Server

Mejora las capacidades de los modelos de IA con procesos de pensamiento estructurados y aumentados por recuperación que permiten cadenas de pensamiento dinámicas, rutas de exploración paralelas y ciclos de refinamiento recursivos para un razonamiento mejorado.

JavaScript
MCP Server: Scalable OpenAPI Endpoint Discovery and API Request Tool

MCP Server: Scalable OpenAPI Endpoint Discovery and API Request Tool

Este servidor facilita el descubrimiento y la ejecución escalables de endpoints OpenAPI mediante búsqueda semántica y procesamiento de alto rendimiento, superando las limitaciones del manejo de especificaciones grandes para interacciones API optimizadas.

Python
Scryfall MCP Server

Scryfall MCP Server

Permite la interacción con la API de Scryfall, lo que permite a los usuarios buscar detalles de cartas de Magic: The Gathering, recuperar reglas de cartas y acceder a información de precios utilizando el Protocolo de Contexto del Modelo.

JavaScript
AQICN MCP Server

AQICN MCP Server

Permite la interacción con el Índice Mundial de Calidad del Aire para obtener datos de calidad del aire en tiempo real para ciudades y coordenadas de todo el mundo a través del Protocolo de Contexto del Modelo (MCP).

Python
Deepseek MCP Server

Deepseek MCP Server

Una implementación de servidor del Protocolo de Control de Modelos que permite a Claude Desktop usar modelos Deepseek que se ejecutan en Docker, lo que permite una integración perfecta entre Claude Desktop y los modelos de lenguaje de Deepseek.

Python
Vercel MCP

Vercel MCP

Un servidor MCP que proporciona herramientas para interactuar con la API de Vercel, permitiendo la gestión de despliegues, registros DNS, dominios, proyectos y variables de entorno a través del lenguaje natural.

TypeScript
Metal MCP Server

Metal MCP Server

Permite la interacción con el framework Metal al proporcionar búsqueda de documentación y capacidades de generación de código utilizando consultas en lenguaje natural.

TypeScript
MCP Terminal Server

MCP Terminal Server

Un servidor seguro para ejecutar comandos de terminal dentro de rutas predefinidas, permitiendo una interacción segura de los Modelos de Lenguaje Grandes con entornos de sistemas operativos.

JavaScript
ClickUp MCP Server

ClickUp MCP Server

Permite integraciones de IA con las tareas de ClickUp, facilitando la gestión de recursos, las operaciones de tareas, la organización del espacio de trabajo y las recomendaciones de tareas impulsadas por IA a través de un protocolo estandarizado.

TypeScript
Backlog MCP Server

Backlog MCP Server

Integra la gestión de proyectos de Backlog con Claude a través del Protocolo de Contexto de Modelos, permitiendo el acceso a proyectos, incidencias y páginas wiki mediante interacciones en lenguaje natural.

TypeScript
World Bank MCP Server

World Bank MCP Server

Permite a los asistentes de IA interactuar con la API de datos abiertos del Banco Mundial, lo que permite listar y analizar indicadores en todos los países disponibles.

Python
Wegene Assistant MCP Server

Wegene Assistant MCP Server

Aprovecha los modelos de lenguaje grandes para analizar los informes de pruebas genéticas WeGene de los usuarios, proporcionando acceso a los datos del informe a través de esquemas URI personalizados y permitiendo la gestión de perfiles e informes mediante la autenticación OAuth y la utilización de API.

Python
Linear MCP Server

Linear MCP Server

Permite la interacción con los recursos de Linear a través de una interfaz MCP, ofreciendo funcionalidad para la gestión de incidencias y la recuperación de recursos con soporte para la limitación de velocidad y el manejo de errores.

JavaScript
mcp-function-app-tester

mcp-function-app-tester

Un servidor MCP basado en TypeScript que permite la interacción con Azure Table Storage directamente a través de Cline. Esta herramienta le permite consultar y administrar datos en Azure Storage Tables.

JavaScript
emqx-mcp-server

emqx-mcp-server

Una implementación de servidor del Protocolo de Contexto de Modelo (MCP) que proporciona interacción con el broker MQTT EMQX.

Python
PDF Reader MCP Server

PDF Reader MCP Server

Proporciona herramientas para leer y extraer texto de archivos PDF, admitiendo tanto archivos locales como URLs.

Python
mcp-server-birdstats

mcp-server-birdstats

Okay, here's how I would translate that request into Spanish, aiming for clarity and naturalness: **Option 1 (More general):** * **"Cruza los datos de tu BirdNET-Pi con las observaciones de eBird usando lenguaje natural."** * This is a direct translation and works well. **Option 2 (More specific, emphasizing the goal):** * **"Compara los datos de tu BirdNET-Pi con las observaciones de eBird utilizando lenguaje natural para encontrar coincidencias."** * This emphasizes the comparison aspect and the goal of finding matches. **Option 3 (Focusing on integration):** * **"Integra los datos de tu BirdNET-Pi con las observaciones de eBird utilizando lenguaje natural."** * This suggests a more seamless merging of the data. **Explanation of Choices:** * **"Cruza" / "Compara" / "Integra":** These verbs all work, depending on the specific nuance you want to convey. "Cruza" is a general "cross-reference." "Compara" is "compare." "Integra" is "integrate." * **"datos de tu BirdNET-Pi":** "Your BirdNET-Pi data" translates directly. * **"observaciones de eBird":** "eBird observations" translates directly. * **"usando lenguaje natural" / "utilizando lenguaje natural":** Both "usando" and "utilizando" are correct for "using." "Utilizando" is slightly more formal. * **"para encontrar coincidencias"**: "to find matches" - this is optional, but clarifies the purpose of the cross-referencing. I would probably use **Option 1: "Cruza los datos de tu BirdNET-Pi con las observaciones de eBird usando lenguaje natural."** as a good, general translation. But the best choice depends on the specific context.

JavaScript
mcp-github

mcp-github

Servidor MCP de github de Anthropic, pero mejor. Soporte para más endpoints. Incluye lanzamientos y etiquetas, revisiones de pull requests, estados, límite de velocidad, gists, proyectos, paquetes e incluso diferencias de pull requests. Pensado para ser usado con la API MCP de MissionSquad para la gestión de secretos (también conocido como tu token de acceso).

TypeScript