StockFlow MCP Server logo

StockFlow MCP Server

Community
twolven

Stock market data provider for Claude Desktop using MCP

Publishertwolven
Repositorymcp-stockflow
LanguagePython
Forks
8
Stars
26
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    StockFlow MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    26 stars and 8 forks from the linked repository.

StockFlow MCP

A typed FastMCP server for stock metadata, price history, technical indicators, financial statements, calendars, and option chains through yfinance. It supports local stdio and containerized Streamable HTTP transports.

Tools

  • get_stock_data_v2(symbol, include_financials=False, include_analysis=False, include_calendar=False)
  • get_historical_data_v2(symbol, period, interval='1d', prepost=False)
  • get_options_chain_v2(symbol, expiration_date=None, include_greeks=False)

Historical downloads explicitly use unadjusted prices, repair enabled, timezone retention, a timeout, and a flat single-symbol index. Rows retain timestamps and omit the separately adjusted-close column. Volatility is annualized for every requested interval, uses 252/5 for five-day bars, and scales intraday periods for extended-hours sessions. RSI uses the canonical Wilder simple-average seed followed by recursive smoothing, with defined zero-gain/loss behavior. When requested, option Greeks are theoretical European Black-Scholes estimates per share (theta per day; vega/rho per one percentage point); risk-free-rate metadata identifies the configured fallback.

powershell
uv sync --locked
uv run python stockflow.py

The server uses stdio. Yahoo Finance is an unofficial personal-use source and may be delayed, incomplete, rate-limited, missing fields, or structurally changed. Dividends and American-style early exercise are not modeled in Greeks. Results are not investment advice or guaranteed real-time data.

Docker / Streamable HTTP

The container runs as an unprivileged user, installs the locked production dependencies, and serves MCP at http://127.0.0.1:8000/mcp. Start it with:

powershell
docker compose up --build -d
Invoke-RestMethod http://127.0.0.1:8000/health

Connect a Streamable HTTP-capable MCP client to http://127.0.0.1:8000/mcp. To avoid a port collision when running multiple servers, set MCP_HOST_PORT before starting Compose, for example $env:MCP_HOST_PORT=8003. Stop and remove the container with docker compose down.

The Compose mapping intentionally binds to localhost. The endpoint has no authentication or TLS and must not be exposed to an untrusted network without a properly configured reverse proxy and access control.

Binding to loopback alone does not make the endpoint private: a browser can still reach it through DNS rebinding, so the server validates Host and Origin headers before a request reaches an MCP session. Requests carrying a foreign Host are answered with 421 Misdirected Request and those carrying a foreign Origin with 403 Forbidden, while same-origin loopback traffic and non-browser clients that send no Origin are unaffected.

VariableDefaultPurpose
MCP_TRANSPORTstdiostdio, http, or streamable-http.
MCP_HOST127.0.0.1Interface the HTTP server binds.
MCP_PORT8000Port inside the container.
MCP_PATH/mcpStreamable HTTP endpoint path.
MCP_HOST_PORT8000Host port Compose publishes on 127.0.0.1.
MCP_HOST_ORIGIN_PROTECTIONtruetrue, auto, or false. Disable only behind a proxy that performs the same validation.
MCP_ALLOWED_HOSTSunsetComma-separated extra hostnames permitted in Host.
MCP_ALLOWED_ORIGINSunsetComma-separated extra browser origins permitted in Origin.

Put the reverse-proxy hostname in MCP_ALLOWED_HOSTS when fronting the container, otherwise the guard rejects the proxied Host. Running uv run python stockflow.py remains the stdio-compatible default outside Docker.

Run validation with uv lock --check, uv run ruff check ., uv run mypy ., uv run pytest, uv build, and uv run python scripts/verify_wheel.py. CI also builds the container and performs health plus MCP tool-discovery checks over Streamable HTTP. Domain/provider branch coverage is gated at 90%. Set YFINANCE_LIVE=1 to opt into live shape smoke tests.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "twolven-mcp-stockflow": {
      "command": "",
      "args": []
    }
  }
}

Use StockFlow MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once StockFlow MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add StockFlow MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the StockFlow MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "twolven-mcp-stockflow": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-stockflow"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the StockFlow MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the StockFlow MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use StockFlow MCP Server to help me with this task?
StockFlow MCP Server
Sure. I read it.
Here is what I found using StockFlow MCP Server.

Frequently asked questions

What is the StockFlow MCP Server MCP server used for?

StockFlow MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use StockFlow MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use StockFlow MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use StockFlow MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With StockFlow MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect StockFlow MCP Server MCP to TypingMind?

StockFlow MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does StockFlow MCP Server MCP provide in TypingMind?

StockFlow MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use StockFlow MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If StockFlow MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇