Skip to main content
Glama
Otman404

yfinance MCP Server

by Otman404

yfinance MCP Server

Model Context Protocol server that allows LLMs to get accurate and up-to-date prices and news about stock/cryptocurrencies tickers.

Available Tools

  • get_price_tool: Get the price of a stock/cryptocurrency ticker

    • Arguments:

      • ticker (string): Required - Ticker name or alias (e.g., "BTC-USD", "AAPL")

      • period (string): Optional - Time period (e.g., "1d", "5d", "1mo"). Defaults to "1d"

  • get_news_tool: Get the news of a stock/cryptocurrency ticker.

    • Required arguments:

      • ticker (string): Required

      • count (string): Optional - Number of articles to retrieve (default: 5)

Related MCP server: Yahoo Finance MCP Server

Installation

Installing via Smithery

To install yfinance-mcp-server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @Otman404/finance-mcp-server --client claude

Using uv

Install the package locally

uv pip install -e .

Run the server

finance-mcp-server

Using docker

# build the container
docker build -t finance-server .

# run the container
docker run -it finance-server

Configuration

Usage for Claude Desktop

Add the following to claude_desktop_config.json

uvx

"mcpServers": {
  "finance": {
    "command": "uvx",
    "args": ["finance-mcp-server"]
  }
}

docker

{
  "mcpServers": {
    "finance": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "finance-server"]
    }
  }
}

Usage for 5ire

uvx

{
  "key": "finance",
  "command": "uvx",
  "args": ["finance-mcp-server"]
}

docker

{
  "key": "finance-server",
  "command": "docker",
  "args": ["run", "-i", "--rm", "finance-server"]
}

Example Interactions

example

Available Tools

2 tools
get_newsC

Get the news of a stock/crypto ticker.

ParametersJSON Schema
NameRequiredDescriptionDefault
tickerYes
countNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It only states the basic function without mentioning rate limits, data sources, or potential errors. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks necessary detail. It is appropriately front-loaded but does not earn its place with substantive information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should hint at return format or data structure. It does not, leaving the agent uninformed about what to expect after invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no additional meaning beyond the input schema. With 0% schema description coverage, it fails to explain what 'ticker' format is expected or what 'count' represents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves news for a stock/crypto ticker, using a specific verb and resource. It distinguishes from the sibling 'get_price' tool which presumably fetches price data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus 'get_price' or other alternatives. The description lacks any contextual cues for appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_priceC

Get the price of a stock/crypto ticker.

ParametersJSON Schema
NameRequiredDescriptionDefault
tickerYes
periodNo1d

TDQS

C2.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as network calls, rate limits, authentication needs, or what the 'period' parameter means. The description implies a single price, but the 'period' parameter suggests historical data, creating ambiguity and contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise but too brief for a tool with untrivial input parameters. It lacks structure and does not front-load critical information beyond the basic purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and unannotated parameters, the description does not explain what the tool returns (e.g., a number or object) or how the period affects the output. The context is incomplete for effective use, especially with the ambiguous period parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 2 parameters (ticker, period) with 0% description coverage. The description does not explain the parameters or their expected values (e.g., what '1d' means or other valid periods), adding no value beyond the schema. The agent must infer usage from parameter names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets the price of a stock/crypto ticker, with a specific verb and resource. It distinguishes itself from the sibling 'get_news' by the type of data returned. However, it does not clarify whether it returns current or historical prices, leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, nor any mention of limitations, prerequisites, or when not to use it. The only sibling is 'get_news', but no explicit comparison is made.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedget_news
    • First observedget_price

TDQS

C2.7/5.0
Disambiguation5/5

get_news and get_price target distinct aspects (news vs. price) with no overlap. An agent can easily choose the correct tool for the intended action.

Naming Consistency5/5

Both tools follow the consistent pattern of get_<resource>, using snake_case and a clear verb-noun structure. No deviations.

Tool Count2/5

With only 2 tools for a domain as rich as stock/crypto data, the set is far too sparse. Most financial APIs offer dozens of endpoints; this limited set feels incomplete.

Completeness1/5

Crucial operations are missing: no historical price data, no financial statements, no market statistics, no search. An agent cannot perform basic financial analysis with just news and current price.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables querying Yahoo Finance data including stock prices, historical data, financial statements, dividends, news, analyst recommendations, and company information through the yfinance library.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to retrieve stock market data and financial information from Yahoo Finance using the yfinance Python library. Supports querying stock prices, historical data, and other financial metrics through natural language.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables fetching real-time financial market data, including price, key metrics, and news headlines, for stock tickers using the yfinance API.
    75
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Otman404/finance-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server