Set up
Runs on your computer. Pick your agent and operating system.
Before you start
- uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
{
"mcpServers": {
"ta-mcp": {
"command": "uvx",
"args": [
"ta-mcp"
]
}
}
}same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12
Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs
README
synced Oct 22, 2026ta-mcp
MCP server that lets AI agents run TA-Lib technical-analysis calculations on price data they supply.
It is a stateless calculator: the agent sends Series, and the server returns Indicator values. It never fetches market data and keeps nothing between calls. The catalogue covers 174 Indicators across TA-Lib's eight analysis groups. The Math Operators and Math Transform groups are left out.
Run
Requires Python 3.12 or later. The ta-lib wheels bundle the TA-Lib C library. ta-mcp isn't on PyPI yet, so uvx installs it from GitHub:
uvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp # stdio transport
uvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp --max-bars 5000 # lower the per-call Bar Cap
uvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp --max-steps 20 # lower the per-call Step Cap
| Setting | Flag | Environment | Default |
|---|---|---|---|
| Bar Cap (most Bars per call) | --max-bars | TA_MCP_MAX_BARS | 10000 |
| Step Cap (most Steps per call) | --max-steps | TA_MCP_MAX_STEPS | 50 |
A flag takes precedence over its environment variable.
Claude Code
claude mcp add ta-mcp -- uvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp
Claude Desktop
{
"mcpServers": {
"ta-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/T-bytes/ta-mcp", "ta-mcp"]
}
}
}
Tools
| Tool | Purpose |
|---|---|
list_indicators(group?) | Names, display names and Groups. |
describe_indicator(names) | For each name: the Default Series it reads, Parameters (type, default, help, MA Type choices), Outputs, lookback and caveats. |
compute_indicators(inputs, steps, timestamps?, tail?, precision?) | Runs each Step (id, name, params?, input_mapping?, include?) over one shared set of Series. For each Step id: Outputs aligned Bar-for-Bar with the input, null for the lookback period, and the lookback count. |
Example
A compute_indicators call:
{
"inputs": {"close": [44.3, 44.1, 44.2, 43.6, 44.3]},
"steps": [{"id": "bb", "name": "BBANDS", "params": {"timeperiod": 3, "matype": "EMA"}}],
"timestamps": ["2026-09-21", "2026-09-22", "2026-09-23", "2026-09-24", "2026-09-25"],
"tail": 2,
"precision": 2
}
returns results keyed by Step id. timestamps comes back only if you sent it, and tail trims it along with the Outputs:
{
"results": {
"bb": {
"name": "BBANDS",
"outputs": {
"upperband": [44.42, 44.72],
"middleband": [43.9, 44.1],
"lowerband": [43.38, 43.48]
},
"lookback": 2
}
},
"timestamps": ["2026-09-24", "2026-09-25"]
}
To chain Steps, point input_mapping at an earlier Step's Outputs. This call reads doji patterns off Heikin-Ashi candles instead of the raw OHLC:
{
"inputs": {"open": [...], "high": [...], "low": [...], "close": [...]},
"steps": [
{"id": "ha", "name": "HA", "include": false},
{"id": "doji", "name": "CDLDOJI", "input_mapping": {
"open": "ha.haopen", "high": "ha.hahigh", "low": "ha.halow", "close": "ha.haclose"
}}
]
}
Rules
- Series are columnar arrays, oldest Bar first, all the same length. The Default Series are named
open,high,low,closeandvolume; MAVP also readsperiods.describe_indicatorlists the ones each Indicator reads. Series no Step reads are ignored. - Input Mapping reads another Series in place of a Default Series, e.g.
{"close": "obv.real"}. Use it to chain Indicators or to feed Heikin-Ashi candles into pattern Indicators. CORREL and BETA readseries_aandseries_b. - Chaining: a Step reads an earlier Step's Output as
<id>.<output>, at full precision and over the full history whatevertailandprecisionsay. Setinclude: falseon Steps you only chain. Step ids can't contain., and a Step's Output can't replace a Series of the same name. - Leading nulls are allowed, for example the lookback of a chained Output. A null after the first real value is rejected.
- MA Types are given by TA-Lib name (
SMA,EMA,WMA,DEMA,TEMA,TRIMA,KAMA,MAMA,T3,HMA,ZLEMA,RMA). - Candlestick Signals are integers: positive is bullish, negative bearish,
0means no pattern. A few patterns use200/-200to mark a confirmed signal. - Unstable Period: for some Indicators (EMA, RSI, ATR and others), values just after the lookback depend on how much history you send. Send several times the
timeperiodin Bars.describe_indicatorflags these Indicators.
Agent skill
skills/ta-analysis/ is an agent skill for using these tools well: preparing inputs, parameter conventions and platform parity, history sizing, ready-to-send recipes, and turning Outputs into signals without look-ahead bias. Copy it into ~/.claude/skills/ (or a project's .claude/skills/) to use it with Claude Code.
Design decisions are recorded in docs/adr/, and the domain vocabulary in CONTEXT.md.
Develop
uv sync
uv run pytest
License
BSD-2-Clause, the same as TA-Lib. See LICENSE.