- Home
- MCP servers
- TA-Lib
TA-Lib
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
TA-Lib MCP Server provides a dedicated MCP implementation for technical analysis indicators, exposing TA-Lib tools over the MCP protocol as well as an HTTP API and a CLI. It enables you to run indicators locally or access them remotely from MCP clients, REST clients, or command-line tooling with consistent results across transports.
How to use
You can run the MCP server in three ways and use any MCP client, HTTP client, or the built-in CLI to work with TA-Lib indicators. The MCP server supports both STDIO transport for local clients and an HTTP transport for browser or networked clients. The HTTP API offers a REST interface for programmatic access to indicators, while the CLI lets you call indicators directly from the command line.
Common usage patterns include starting the MCP server to listen for MCP clients via STDIO, starting a dedicated HTTP API server for REST calls, or using the CLI to explore tools and compute indicators on the fly.
To verify availability and experiment with a few calls, you can also start the CLI tools directly, which lists tools and allows invoking a tool with parameters.
How to install
Prerequisites: you need Python and the uv utility used to run MCP servers. You should also have access to a shell where you can run single-line commands.
Step 1. Install the runtime helper for running MCP servers.
Step 2. Install required Python dependencies and logging configuration file.
Step 3. Start the MCP server using STDIO transport for local clients.
Step 4. Start the MCP server using HTTP transport for web clients.
Step 5. Start the HTTP API server for programmatic REST access.
Configuration and examples
The server supports two access methods at runtime: an MCP server over STDIO or HTTP transport, and a separate HTTP API server for REST calls. You can also use CLI tools to interact with indicators directly.
MCP STDIO example to run the server locally (for MCP clients like Claude Desktop):
uv run python -m mcp_talib.cli --mode mcp --transport stdio
MCP HTTP example to run the server over HTTP (for MCP Inspector or web clients):
uv run python -m mcp_talib.cli --mode mcp --transport http --port 8000
HTTP API example to run REST endpoints on port 8001:
uv run python -m mcp_talib.cli --mode api --port 8001
CLI tools can be listed and invoked directly:
uv run python -m mcp_talib.cli_tools list
uv run python -m mcp_talib.cli_tools call sma --close '[1,2,3,4,5]' --timeperiod 3
Notes on security and maintenance
The HTTP transport includes CORS middleware to support browser-based MCP clients. If you are behind a reverse proxy or need access restrictions, adjust allow_origins in the transport configuration.
Available tools
calculate_sma
Simple Moving Average calculated over the provided close prices with a configurable time period.
calculate_ema
Exponential Moving Average calculated over the provided close prices with a configurable time period.
calculate_rsi
Relative Strength Index calculated from close prices with a configurable time period.
calculate_bbands
Bollinger Bands calculated from close prices with standard deviation bands.
calculate_dema
Double Exponential Moving Average for smoother signals.
calculate_ht_trendline
Hilbert Transform Trendline used for trend direction estimation.
calculate_kama
Kaufman Adaptive Moving Average adapting to market conditions.
calculate_ma
Moving Average with configurable matype.
calculate_mama
MESA Adaptive Moving Average based on adaptive smoothing.
calculate_mavp
Moving Average Variable Period across a dataset.
calculate_midpoint
Midpoint price calculation over a window.
calculate_midprice
Midpoint price calculation for current period.
calculate_sar
Parabolic SAR indicator for trend direction.
calculate_sarext
Parabolic SAR Extended with additional features.
calculate_t3
T3 Moving Average offering smoother responses.
calculate_tema
Triple Exponential Moving Average for reduced lag.
calculate_trima
Triangular Moving Average with smoothing.
calculate_wma
Weighted Moving Average emphasizing recent data.