tv-history

tv-history

MCP server for historical asset analysis using tvDatafeed and cached CSV files. Enables fetching OHLCV bars, candlestick charts, and trade execution data for TradingView-style assets.

Category
Visit Server

README

tv-history MCP

Standalone historical asset-analysis MCP server backed by tvDatafeed and local timeframe-specific CSV files.

Assets are loaded dynamically. TradingView-style EXCHANGE:SYMBOL is preferred, for example RUS:MX1!. The existing SYMBOL:EXCHANGE format remains accepted for backward compatibility. A valid request triggers an initial tvDatafeed download when no local history exists for that asset and timeframe.

Install and run

cd C:\_tools\202607_tradingview_mcp\tv_history
uv sync
uv run tv-history-mcp

HTTP transport:

uv run tv-history-mcp streamable-http --host 127.0.0.1 --port 8010

The MCP endpoint is http://127.0.0.1:8010/mcp.

Codex registration for the HTTP server:

codex mcp add tv-history --url http://127.0.0.1:8010/mcp

Or let Codex launch the stdio server:

codex mcp add tv-history -- C:\_tools\202607_tradingview_mcp\tv_history\.venv\Scripts\python.exe -m tv_history.server

Tool

asset_analysis(
  asset="BITSTAMP:BTCUSD",
  timeframe="1h",
  timestamp="2026-07-01T12:00:00Z"
)

The default legacy response remains available for existing callers. Request the compact, completed-bar-only trading response explicitly:

asset_analysis(
  asset="BITSTAMP:BTCUSD",
  timeframe="4h",
  timestamp="2026-07-01T12:00:00Z",
  response_version="execution",
  include_short_term=true,
  short_term_sessions=4
)
asset_bars(
  asset="ICEEUR:BRN1!",
  timeframe="1h",
  timestamp="2026-03-23T00:00:00Z",
  sessions=4
)

asset_bars returns completed OHLCV bars oldest-first. Use count (1–1000) or sessions; when both are supplied, sessions wins.

asset_chart(
  asset="BITSTAMP:BTCUSD",
  timeframe="4h",
  timestamp="2026-07-01T12:00:00Z",
  days="10"
)

asset_chart returns a PNG candlestick chart with red/green bodies, wicks, and volume, plus a compact metadata block describing the asset and chart range. Use sessions instead of days to request a fixed number of trading dates; sessions wins when both are supplied. All tool errors use the same structured error object and are marked as MCP errors.

Supported timeframes are 1h, 4h, 1D, and 1W. Each timeframe is fetched directly from tvDatafeed and stored independently as 1h.csv, 4h.csv, 1D.csv, or 1W.csv. Analysis and charts read the requested timeframe file; they do not construct higher-timeframe bars from 1h.csv.

An empty timeframe store requests up to 5,000 bars. A subsequent request refreshes only when its timestamp is later than the latest stored timestamp for that timeframe. The refresh size is the estimated number of missing bars plus 10 overlapping bars, capped at 5,000. New and old rows are merged by timestamp, with fresh provider values winning.

Provider failures are retried five times with a five-second wait between attempts. Attempts 1–3 use the original request capped at 5,000 bars, attempt 4 caps it at 4,000, and attempt 5 caps it at 2,000.

Every triggered provider download is appended to data/download_control.csv. The control rows contain asset, timeframe, requested_at, bars_requested, status (success or failure), and the UTC input_timestamp. Existing rows from the older schema are preserved with a blank timeframe because it cannot be inferred reliably. Requests already covered by local data do not trigger a download and are not logged.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured