Skip to main content
Glama
finance-mcp

finance-mcp

by esurovtsev

Finance MCP Server

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.

Installation

Development Installation

# Clone the repository
git clone https://github.com/yourusername/mcp-finance-server-py.git
cd mcp-finance-server-py

# Install in development mode
uv pip install -e .

Production Installation

uv pip install finance-mcp

Related MCP server: Model Context Protocol Demo

Usage

Running the Server Directly

finance-mcp

Configuration with Claude Desktop or other MCP clients

Add this to your MCP configuration file (e.g., claude_desktop_config.json):

{
  "mcpServers": {
    "finance-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mcp-finance-server-py", // Update this path
        "run",
        "finance-mcp"
      ]
    }
  }
}

Video Walkthrough

Build Your Own MCP Server: Practical Guide with Python SDK and Cursor IDE

Watch: Build Your Own MCP Server: Practical Guide with Python SDK and Cursor IDE

This video provides context and explanations that complement the code in this repository:

  • See the MCP server in action with a practical demonstration in Cursor IDE

  • Understand the design decisions behind the implementation

  • Learn how the different components work together

  • Get insights into how AI models discover and interact with custom tools

If you're looking to understand not just the "what" but the "why" behind this MCP implementation, the video offers a guided tour through the development process and explains the reasoning behind key architectural choices.

Available Tools

2 tools
fetch_stock_dataC

Fetches comprehensive stock data for a given symbol.

Args: stock_symbol: The stock ticker symbol (e.g., 'TSLA'). period: The period to analyze (e.g., '1mo', '3mo', '1y').

Returns: A dictionary combining general stock info and historical market data.

Inputs: stock_symbol (required), period.

lookup_stock_symbolB

Converts a company name to its stock symbol using a financial API.

Args: company_name: The full company name (e.g., 'Tesla').

Returns: The stock symbol (e.g., 'TSLA') or an error message.

Inputs: company_name (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 2 tools

    Disambiguation5/5

    Each tool serves a distinct purpose: one converts company names to stock symbols, the other fetches stock data given a symbol. No overlap in functionality.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern with snake_case: 'fetch_stock_data' and 'lookup_stock_symbol', making them predictable and easy to understand.

    Tool Count3/5

    With only 2 tools, the set feels thin for a finance server. While the two tools are essential, the count is borderline low, lacking additional common operations.

    Completeness2/5

    The server covers only basic stock data retrieval and symbol lookup. Many common finance operations (e.g., financial statements, market indices, historical comparisons) are missing, posing significant gaps for agents.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      A simple MCP server for Yahoo Finance using yfinance. This server provides a set of tools to fetch stock data, news, and other financial information.
      2
      15
      208
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A demonstration server for the Model Context Protocol (MCP) that exposes calculator and Yahoo Finance tools, allowing LLMs to interpret natural language requests and make tool calls via the MCP standard.
      1
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      MCP server that exposes Yahoo Finance data through tools for searching instruments, fetching quotes, history, company info, financials, dividends, news, recommendations, and options. Enables AI assistants to answer market-data questions using natural language.
      24
      2,315 PyPI
      2
      MIT