Discover Awesome MCP Servers

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

All16,166
yfinance-mcp

yfinance-mcp

Okay, here's a basic outline and code snippets to get you started with a Python MCP (Message Control Protocol) server for yfinance. This is a simplified example and would need further development for production use. **Concept:** The idea is to create a server that listens for requests (likely stock tickers) over a network connection using MCP. Upon receiving a request, the server uses `yfinance` to fetch the data and sends the data back to the client. **Important Considerations:** * **MCP Implementation:** MCP is a relatively old protocol. You'll likely need to find a Python library that supports it, or implement the core parts yourself. If you're starting from scratch, consider using a more modern protocol like TCP with a simple text-based or JSON-based message format. This will be much easier to implement and debug. * **Error Handling:** Robust error handling is crucial. Handle network errors, `yfinance` errors (e.g., invalid ticker), and data serialization errors. * **Security:** If this server will be exposed to a network, consider security implications. MCP itself doesn't provide security. You might need to add encryption or authentication. * **Data Format:** Decide on the format for sending data back to the client (e.g., JSON, CSV, a custom format). JSON is generally a good choice for its flexibility and ease of parsing. * **Concurrency:** For handling multiple client requests simultaneously, you'll need to use threading, asynchronous programming (asyncio), or multiprocessing. * **Rate Limiting:** `yfinance` might have rate limits. Implement a mechanism to avoid exceeding them. **Simplified Example (using TCP instead of MCP for simplicity):** This example uses TCP sockets because a full MCP implementation is beyond the scope of a quick response. It demonstrates the core logic of fetching data from `yfinance` and sending it back to a client. You would need to adapt this to use MCP if that's a strict requirement. ```python import socket import yfinance as yf import json # Server configuration HOST = '127.0.0.1' # Standard loopback interface address (localhost) PORT = 65432 # Port to listen on (non-privileged ports are > 1023) def fetch_stock_data(ticker): """Fetches stock data from yfinance and returns it as a JSON string.""" try: stock = yf.Ticker(ticker) data = stock.history(period="1d") # Get 1 day of data if data.empty: return json.dumps({"error": f"No data found for ticker: {ticker}"}) # Convert the DataFrame to a dictionary suitable for JSON serialization data_dict = data.to_dict(orient="index") return json.dumps(data_dict) # Serialize to JSON except Exception as e: return json.dumps({"error": str(e)}) def handle_client(conn, addr): """Handles a single client connection.""" print(f"Connected by {addr}") while True: data = conn.recv(1024) # Receive data from the client if not data: break # Client disconnected ticker = data.decode().strip() # Decode the ticker symbol print(f"Received ticker: {ticker}") stock_data_json = fetch_stock_data(ticker) # Fetch data and serialize to JSON conn.sendall(stock_data_json.encode()) # Send the JSON data back conn.close() print(f"Connection closed with {addr}") def main(): """Main server function.""" with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() print(f"Server listening on {HOST}:{PORT}") while True: conn, addr = s.accept() # In a real application, you'd likely want to use threading or asyncio # to handle multiple clients concurrently. For simplicity, this example # handles one client at a time. handle_client(conn, addr) if __name__ == "__main__": main() ``` **Explanation:** 1. **Imports:** Imports necessary libraries (`socket`, `yfinance`, `json`). 2. **`fetch_stock_data(ticker)`:** * Takes a stock ticker as input. * Uses `yfinance` to fetch historical data (1 day in this example). You can adjust the `period` parameter. * Handles potential errors (e.g., invalid ticker). * Converts the `yfinance` DataFrame to a dictionary using `to_dict(orient="index")`. This creates a dictionary where the keys are the dates (index) and the values are dictionaries of the data for that date. * Serializes the dictionary to a JSON string using `json.dumps()`. * Returns the JSON string. 3. **`handle_client(conn, addr)`:** * Handles communication with a single client. * Receives data (the ticker symbol) from the client. * Calls `fetch_stock_data()` to get the data. * Sends the JSON data back to the client. * Closes the connection. 4. **`main()`:** * Creates a TCP socket. * Binds the socket to the specified host and port. * Listens for incoming connections. * Accepts a connection from a client. * Calls `handle_client()` to handle the client's requests. * **Important:** This example handles one client at a time. For a real-world server, you'd need to use threading or `asyncio` to handle multiple clients concurrently. **Client Example (TCP):** ```python import socket HOST = '127.0.0.1' # The server's hostname or IP address PORT = 65432 # The port used by the server with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((HOST, PORT)) ticker = "AAPL" # Example ticker s.sendall(ticker.encode()) data = s.recv(4096) # Receive up to 4096 bytes print('Received:', data.decode()) ``` **How to Run:** 1. Save the server code as `yfinance_server.py`. 2. Save the client code as `yfinance_client.py`. 3. Run the server: `python yfinance_server.py` 4. Run the client: `python yfinance_client.py` **To Adapt to MCP:** 1. **Find an MCP Library:** Search for a Python library that supports MCP. If you can't find one, you'll need to implement the MCP protocol yourself (which is a significant undertaking). 2. **Replace Socket Code:** Replace the `socket` code in the server and client with the MCP library's functions for creating connections, sending messages, and receiving messages. 3. **MCP Message Formatting:** Ensure that the messages you send and receive conform to the MCP protocol's specifications. This will involve encoding and decoding the data according to MCP's rules. **Example using `socketserver` for multithreading (TCP):** This is a more robust example that uses the `socketserver` module to handle multiple clients concurrently using threads. It's still using TCP, but it demonstrates how to handle multiple requests. ```python import socketserver import yfinance as yf import json class YFinanceHandler(socketserver.BaseRequestHandler): """ The request handler class for our server. It is instantiated once per connection to the server, and must override the handle() method to implement communication to the client. """ def handle(self): # self.request is the TCP socket connected to the client self.data = self.request.recv(1024).strip() ticker = self.data.decode() print(f"{self.client_address[0]} wrote: {ticker}") stock_data_json = self.fetch_stock_data(ticker) self.request.sendall(stock_data_json.encode()) def fetch_stock_data(self, ticker): """Fetches stock data from yfinance and returns it as a JSON string.""" try: stock = yf.Ticker(ticker) data = stock.history(period="1d") # Get 1 day of data if data.empty: return json.dumps({"error": f"No data found for ticker: {ticker}"}) # Convert the DataFrame to a dictionary suitable for JSON serialization data_dict = data.to_dict(orient="index") return json.dumps(data_dict) # Serialize to JSON except Exception as e: return json.dumps({"error": str(e)}) class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): pass if __name__ == "__main__": HOST, PORT = "localhost", 65432 server = ThreadedTCPServer((HOST, PORT), YFinanceHandler) with server: print(f"Server listening on {HOST}:{PORT}") # Start a thread with the server -- that thread will then start one # more thread for each request server.serve_forever() ``` **Key Improvements in the `socketserver` Example:** * **Multithreading:** The `ThreadedTCPServer` allows the server to handle multiple client requests concurrently. Each client connection is handled in a separate thread. * **`socketserver` Module:** Uses the `socketserver` module, which simplifies the creation of network servers. * **Request Handler:** The `YFinanceHandler` class encapsulates the logic for handling a single client request. This makes the code more organized and easier to maintain. **Remember to install yfinance:** ```bash pip install yfinance ``` This comprehensive response provides a starting point for building your Python MCP server for `yfinance`. Remember to adapt the code to use MCP if that's a strict requirement, and to add proper error handling, security, and concurrency for a production environment. Good luck!

ClickUp MCP Server

ClickUp MCP Server

Un servidor de Protocolo de Contexto de Modelo que permite a los agentes de IA interactuar con los espacios de trabajo de ClickUp, permitiendo la creación, gestión y organización del espacio de trabajo a través de comandos en lenguaje natural.

Synchro Bus MCP Server

Synchro Bus MCP Server

OSP Marketing Tools MCP Server

OSP Marketing Tools MCP Server

Aquí tienes una traducción al español: Una implementación en TypeScript de un servidor de Protocolo de Contexto de Modelo que proporciona herramientas de marketing basadas en las metodologías de Open Strategy Partners, permitiendo la creación de contenido, la optimización y el posicionamiento de productos a través de herramientas como la generación de mapas de valor, la creación de metainformación y la edición de contenido.

Clerk MCP Server Template

Clerk MCP Server Template

A production-ready template for building Model Context Protocol servers with Clerk authentication on Cloudflare Workers, allowing AI assistants to securely access user data and business logic in Clerk-authenticated applications.

Brave Search MCP Server

Brave Search MCP Server

Un servidor MCP que integra la API de Brave Search para proporcionar capacidades de búsqueda tanto web como local, con funciones como paginación, filtrado y alternativas inteligentes.

Big Brain MCP

Big Brain MCP

Un servidor MCP que recupera estadísticas de los principales protocolos en la red Mantle para ayudar a los usuarios a tomar decisiones de inversión más informadas.

Code Execution Server

Code Execution Server

Enables execution of code in a sandbox environment with integrated web search capabilities. Provides a basic framework for running code safely, primarily designed for AI agents and research applications.

DICOM-MCP

DICOM-MCP

Un servidor de Protocolo de Contexto de Modelo que permite trabajar con imágenes médicas DICOM a través de un sistema sencillo de almacenamiento de notas.

Last9 Observability MCP

Last9 Observability MCP

Integra sin problemas el contexto de producción en tiempo real (registros, métricas y trazas) en tu entorno local para corregir el código automáticamente de forma más rápida.

CodeGraph MCP Server

CodeGraph MCP Server

Enables querying and analyzing code relationships by building a lightweight graph of TypeScript and Python symbols. Supports symbol lookup, reference tracking, impact analysis from diffs, and code snippet retrieval through natural language.

PDF Reader MCP Server

PDF Reader MCP Server

Permite que los agentes de IA lean y extraigan información (texto, metadatos, número de páginas) de forma segura desde archivos PDF dentro de contextos de proyectos, utilizando una herramienta MCP flexible.

Current operating environment

Current operating environment

Here are a few ways to get information about the current operating environment, depending on what kind of information you're looking for: **General System Information:** * **Operating System Name and Version:** * **Windows:** You can find this in "System Information" (search for it in the Start Menu) or by typing `winver` in the Run dialog (Windows key + R). * **macOS:** Click the Apple menu in the top-left corner and select "About This Mac." * **Linux:** Open a terminal and use commands like `uname -a`, `lsb_release -a`, or `cat /etc/os-release`. * **Hardware Information (CPU, Memory, Disk Space):** * **Windows:** "System Information" (as above) or Task Manager (Ctrl+Shift+Esc). * **macOS:** "About This Mac" (as above) and then click "System Report." * **Linux:** Use commands like `lscpu`, `free -m`, `df -h`, `top`, or `htop` in a terminal. **Environment Variables:** * Environment variables store configuration settings that applications can access. * **Windows:** Open "System Properties" (search for it in the Start Menu), click "Environment Variables." You can also use the `set` command in the command prompt. * **macOS/Linux:** Use the `printenv` or `env` command in a terminal. You can also access specific variables with `echo $VARIABLE_NAME` (e.g., `echo $PATH`). **Running Processes:** * See what programs are currently running. * **Windows:** Task Manager (Ctrl+Shift+Esc). * **macOS:** Activity Monitor (found in /Applications/Utilities/). * **Linux:** Use commands like `ps aux`, `top`, or `htop` in a terminal. **Network Information:** * IP address, network interfaces, etc. * **Windows:** `ipconfig` in the command prompt. * **macOS/Linux:** `ifconfig` or `ip addr` in a terminal. `netstat` is also useful. **Specific Application Environment (if applicable):** * If you're running a specific application (like a web server, database, or programming environment), it will often have its own ways to report its environment. Consult the application's documentation. For example: * **Python:** You can use the `os` module to access environment variables (`os.environ`) and the `sys` module to get information about the Python interpreter (`sys.version`, `sys.executable`). * **Node.js:** You can access environment variables with `process.env`. **Example Scenarios and Commands:** * **"What version of Windows am I running?"** Type `winver` in the Run dialog (Windows key + R). * **"How much free disk space do I have on my C: drive (Windows)?"** Open File Explorer and look at the C: drive. Or, use the `dir C:\` command in the command prompt. * **"What is my IP address (Linux)?"** Open a terminal and type `ip addr`. Look for the IP address associated with your network interface (usually `eth0` or `wlan0`). * **"What is the value of the `PATH` environment variable (macOS/Linux)?"** Open a terminal and type `echo $PATH`. * **"What processes are using the most CPU (Linux)?"** Open a terminal and type `top` or `htop`. To give you the *most* helpful answer, please tell me: * **What operating system are you using?** (Windows, macOS, Linux, etc.) * **What specific information are you looking for?** (e.g., OS version, CPU usage, environment variables, network configuration) * **Are you trying to get this information programmatically (e.g., from a script)?** If so, what programming language are you using? --- **Spanish Translation:** Aquí hay algunas formas de obtener información sobre el entorno operativo actual, dependiendo del tipo de información que estés buscando: **Información General del Sistema:** * **Nombre y Versión del Sistema Operativo:** * **Windows:** Puedes encontrar esto en "Información del Sistema" (búscalo en el menú Inicio) o escribiendo `winver` en el cuadro de diálogo Ejecutar (tecla Windows + R). * **macOS:** Haz clic en el menú Apple en la esquina superior izquierda y selecciona "Acerca de esta Mac". * **Linux:** Abre una terminal y usa comandos como `uname -a`, `lsb_release -a` o `cat /etc/os-release`. * **Información del Hardware (CPU, Memoria, Espacio en Disco):** * **Windows:** "Información del Sistema" (como arriba) o el Administrador de Tareas (Ctrl+Shift+Esc). * **macOS:** "Acerca de esta Mac" (como arriba) y luego haz clic en "Informe del Sistema". * **Linux:** Usa comandos como `lscpu`, `free -m`, `df -h`, `top` o `htop` en una terminal. **Variables de Entorno:** * Las variables de entorno almacenan configuraciones que las aplicaciones pueden acceder. * **Windows:** Abre "Propiedades del Sistema" (búscalo en el menú Inicio), haz clic en "Variables de Entorno". También puedes usar el comando `set` en el símbolo del sistema. * **macOS/Linux:** Usa el comando `printenv` o `env` en una terminal. También puedes acceder a variables específicas con `echo $NOMBRE_DE_LA_VARIABLE` (por ejemplo, `echo $PATH`). **Procesos en Ejecución:** * Mira qué programas se están ejecutando actualmente. * **Windows:** Administrador de Tareas (Ctrl+Shift+Esc). * **macOS:** Monitor de Actividad (se encuentra en /Aplicaciones/Utilidades/). * **Linux:** Usa comandos como `ps aux`, `top` o `htop` en una terminal. **Información de Red:** * Dirección IP, interfaces de red, etc. * **Windows:** `ipconfig` en el símbolo del sistema. * **macOS/Linux:** `ifconfig` o `ip addr` en una terminal. `netstat` también es útil. **Entorno de Aplicación Específica (si aplica):** * Si estás ejecutando una aplicación específica (como un servidor web, una base de datos o un entorno de programación), a menudo tendrá sus propias formas de informar su entorno. Consulta la documentación de la aplicación. Por ejemplo: * **Python:** Puedes usar el módulo `os` para acceder a las variables de entorno (`os.environ`) y el módulo `sys` para obtener información sobre el intérprete de Python (`sys.version`, `sys.executable`). * **Node.js:** Puedes acceder a las variables de entorno con `process.env`. **Escenarios y Comandos de Ejemplo:** * **"¿Qué versión de Windows estoy ejecutando?"** Escribe `winver` en el cuadro de diálogo Ejecutar (tecla Windows + R). * **"¿Cuánto espacio libre en disco tengo en mi unidad C: (Windows)?"** Abre el Explorador de Archivos y mira la unidad C:. O usa el comando `dir C:\` en el símbolo del sistema. * **"¿Cuál es mi dirección IP (Linux)?"** Abre una terminal y escribe `ip addr`. Busca la dirección IP asociada con tu interfaz de red (generalmente `eth0` o `wlan0`). * **"¿Cuál es el valor de la variable de entorno `PATH` (macOS/Linux)?"** Abre una terminal y escribe `echo $PATH`. * **"¿Qué procesos están usando la mayor cantidad de CPU (Linux)?"** Abre una terminal y escribe `top` o `htop`. Para darte la respuesta *más* útil, por favor dime: * **¿Qué sistema operativo estás usando?** (Windows, macOS, Linux, etc.) * **¿Qué información específica estás buscando?** (por ejemplo, versión del sistema operativo, uso de la CPU, variables de entorno, configuración de red) * **¿Estás tratando de obtener esta información programáticamente (por ejemplo, desde un script)?** Si es así, ¿qué lenguaje de programación estás usando?

Tensorus MCP

Tensorus MCP

Model Context Protocol server and client that enables AI agents and LLMs to interact with Tensorus tensor database for operations like creating datasets, ingesting tensors, and applying tensor operations.

azure-mcp-server

azure-mcp-server

ApiPost MCP

ApiPost MCP

A server that enables management of ApiPost API documentation and team collaboration through the Model Context Protocol, supporting complete interface management directly from compatible editors.

Industrial MCP Server

Industrial MCP Server

Enables AI assistants to monitor and interact with industrial systems, providing real-time system health monitoring, operational data analytics, and equipment maintenance tracking. Built with Next.js and designed for industrial automation environments.

MCP-Server

MCP-Server

Una implementación de un Protocolo de Contexto de Modelo que permite a los modelos de lenguaje grandes llamar a herramientas externas (como pronósticos del tiempo e información de GitHub) a través de un protocolo estructurado, con visualización del proceso de razonamiento del modelo.

SQLite MCP Server

SQLite MCP Server

Aquí hay implementaciones de servidor MCP para acceder a una base de datos SQLite en tu cliente MCP. Hay una implementación SDIO y una SSE.

AgentMCP: The Universal System for AI Agent Collaboration

AgentMCP: The Universal System for AI Agent Collaboration

Agente MCPAgent para la Red de Colaboración Multiagente (MACNET) de Grupa.AI con capacidades del Protocolo de Contexto del Modelo (MCP) integradas.

Railway MCP Server

Railway MCP Server

Enables management of Railway.app infrastructure through natural language, allowing users to deploy services, manage environment variables, monitor deployments, and configure projects directly from MCP clients like Claude.

Hika MCP Server

Hika MCP Server

RAGDocs

RAGDocs

Un servidor de Protocolo de Contexto de Modelo (MCP) que permite la búsqueda y recuperación semántica de documentación utilizando una base de datos vectorial (Qdrant). Este servidor te permite añadir documentación desde URLs o archivos locales y luego buscar a través de ella utilizando consultas en lenguaje natural.

mcp-pprof-anaylzer

mcp-pprof-anaylzer

This is a Model Context Protocol (MCP) server implemented in Go, providing a tool to analyze Go pprof performance profiles.

telegram-mcp

telegram-mcp

Integración de la API de Telegram para acceder a datos de usuario, gestionar diálogos (chats, canales, grupos), recuperar mensajes y manejar el estado de lectura.

IDA-doc-hint-mcp

IDA-doc-hint-mcp

Servidor MCP (más o menos) lector de documentación de IDA

WordPress Standalone MCP Server

WordPress Standalone MCP Server

A Model Context Protocol server that automatically discovers WordPress REST API endpoints and creates individual tools for each endpoint, enabling natural language management of WordPress sites.

GitHub MCP Server

GitHub MCP Server

Browser CTL MCP Server

Browser CTL MCP Server

Anthropic based MCP server built on Python Playwright , enable AI agents to control web browsers.

Ashra Structured Data Extractor MCP

Ashra Structured Data Extractor MCP

Extrae datos estructurados de cualquier sitio web con una simple llamada SDK. Sin código de scraping, sin navegadores headless, solo escribe la solicitud y obtén JSON.