{"id":"08626e50-1ba6-460d-9801-173689e14208","slug":"ta-mcp","kind":"mcp","name":"ta-mcp","summary":"MCP server for Technical Analysis library.","owner":"T-bytes","repoUrl":"https://github.com/T-bytes/ta-mcp","license":"BSD-2-Clause","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"mcp","createdAt":"2025-08-11T01:54:05.000Z","addedAt":"2026-10-21T15:44:04.186Z","logoUrl":"https://avatars.githubusercontent.com/u/5740123?u=f4520441f0a6e57959acedae6ef6cd5c483c1c9a&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["cloud-infra"],"tags":[],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-22T18:59:59.076Z","sample":false,"url":"https://conduits.dev/tools/ta-mcp","language":"Python","transports":["stdio"],"install":{"pypi":"ta-mcp"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# ta-mcp\n\nMCP server that lets AI agents run [TA-Lib](https://ta-lib.org) technical-analysis calculations on price data they supply.\n\nIt 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.\n\n## Run\n\nRequires 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:\n\n```sh\nuvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp                  # stdio transport\nuvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp --max-bars 5000  # lower the per-call Bar Cap\nuvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp --max-steps 20   # lower the per-call Step Cap\n```\n\n| Setting | Flag | Environment | Default |\n|---|---|---|---|\n| Bar Cap (most Bars per call) | `--max-bars` | `TA_MCP_MAX_BARS` | `10000` |\n| Step Cap (most Steps per call) | `--max-steps` | `TA_MCP_MAX_STEPS` | `50` |\n\nA flag takes precedence over its environment variable.\n\n### Claude Code\n\n```sh\nclaude mcp add ta-mcp -- uvx --from git+https://github.com/T-bytes/ta-mcp ta-mcp\n```\n\n### Claude Desktop\n\n```json\n{\n  \"mcpServers\": {\n    \"ta-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"git+https://github.com/T-bytes/ta-mcp\", \"ta-mcp\"]\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool | Purpose |\n|---|---|\n| `list_indicators(group?)` | Names, display names and Groups. |\n| `describe_indicator(names)` | For each name: the Default Series it reads, Parameters (type, default, help, MA Type choices), Outputs, lookback and caveats. |\n| `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. |\n\n### Example\n\nA `compute_indicators` call:\n\n```json\n{\n  \"inputs\": {\"close\": [44.3, 44.1, 44.2, 43.6, 44.3]},\n  \"steps\": [{\"id\": \"bb\", \"name\": \"BBANDS\", \"params\": {\"timeperiod\": 3, \"matype\": \"EMA\"}}],\n  \"timestamps\": [\"2026-09-21\", \"2026-09-22\", \"2026-09-23\", \"2026-09-24\", \"2026-09-25\"],\n  \"tail\": 2,\n  \"precision\": 2\n}\n```\n\nreturns results keyed by Step id. `timestamps` comes back only if you sent it, and `tail` trims it along with the Outputs:\n\n```json\n{\n  \"results\": {\n    \"bb\": {\n      \"name\": \"BBANDS\",\n      \"outputs\": {\n        \"upperband\": [44.42, 44.72],\n        \"middleband\": [43.9, 44.1],\n        \"lowerband\": [43.38, 43.48]\n      },\n      \"lookback\": 2\n    }\n  },\n  \"timestamps\": [\"2026-09-24\", \"2026-09-25\"]\n}\n```\n\nTo 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:\n\n```json\n{\n  \"inputs\": {\"open\": [...], \"high\": [...], \"low\": [...], \"close\": [...]},\n  \"steps\": [\n    {\"id\": \"ha\", \"name\": \"HA\", \"include\": false},\n    {\"id\": \"doji\", \"name\": \"CDLDOJI\", \"input_mapping\": {\n      \"open\": \"ha.haopen\", \"high\": \"ha.hahigh\", \"low\": \"ha.halow\", \"close\": \"ha.haclose\"\n    }}\n  ]\n}\n```\n\n### Rules\n\n- **Series** are columnar arrays, oldest Bar first, all the same length. The Default Series are named `open`, `high`, `low`, `close` and `volume`; MAVP also reads `periods`. `describe_indicator` lists the ones each Indicator reads. Series no Step reads are ignored.\n- **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 read `series_a` and `series_b`.\n- **Chaining**: a Step reads an earlier Step's Output as `<id>.<output>`, at full precision and over the full history whatever `tail` and `precision` say. Set `include: false` on Steps you only chain. Step ids can't contain `.`, and a Step's Output can't replace a Series of the same name.\n- **Leading nulls** are allowed, for example the lookback of a chained Output. A null after the first real value is rejected.\n- **MA Types** are given by TA-Lib name (`SMA`, `EMA`, `WMA`, `DEMA`, `TEMA`, `TRIMA`, `KAMA`, `MAMA`, `T3`, `HMA`, `ZLEMA`, `RMA`).\n- **Candlestick Signals** are integers: positive is bullish, negative bearish, `0` means no pattern. A few patterns use `200`/`-200` to mark a confirmed signal.\n- **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 `timeperiod` in Bars. `describe_indicator` flags these Indicators.\n\n### Agent skill\n\n[`skills/ta-analysis/`](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.\n\nDesign decisions are recorded in [`docs/adr/`](docs/adr), and the domain vocabulary in [`CONTEXT.md`](CONTEXT.md).\n\n## Develop\n\n```sh\nuv sync\nuv run pytest\n```\n\n## License\n\nBSD-2-Clause, the same as TA-Lib. See [`LICENSE`](LICENSE).\n"}