Get the FREE Ultimate OpenClaw Setup Guide →

mcp-finance -py

A minimal MCP server built with Python that exposes two example tools: one to convert a company name into a stock symbol, and another to fetch financial data from Yahoo Finance. The project focuses on learning how to build and run an MCP server—using a simple financial scenario purely as a demo use case.

How to use

The mcp-finance -py server is a minimal implementation of the Model Context Protocol (MCP) built with Python, designed to help developers learn how to build and operate an MCP server. This server specifically exposes two tools: one for converting a company name into its corresponding stock symbol and another for fetching real-time financial data from Yahoo Finance. This project serves as an excellent demo for anyone interested in exploring MCP capabilities in a financial context.

Once you connect to the mcp-finance -py server, you can interact with it using two primary tools. To convert a company name into a stock symbol, you can send a command like convert_company_name("Apple Inc."). For fetching financial data, use a command such as fetch_financial_data("AAPL"). These queries will provide you with the desired outputs, allowing you to test and understand the functionalities of the server effectively.

How to install

To install the mcp-finance -py server, ensure you have the following prerequisites:

  • Python 3.6 or higher

Option A: You can quickly start using the server with the following command if you have it available via npx:

npx -y mcp-finance -py

Option B: Alternatively, you can clone the repository and run the server manually. Use the following commands:

git clone https://github.com/esurovtsev/mcp-finance-server-py.git
cd mcp-finance-server-py
python -m pip install -r requirements.txt
python server.py

Additional notes

Ensure that you have configured your Python environment correctly and installed all necessary dependencies listed in requirements.txt. If you encounter issues, check that your Python version is compatible, as this server relies on features available in Python 3.6 and above. Additionally, make sure your network settings allow for the required connections to fetch data from Yahoo Finance.

Related MCP Servers

Sponsor this space

Reach thousands of developers