# Canli Quant

Run quantitative finance calculations through an AI coding agent, from option pricing and portfolio analysis to strategy testing and market-data checks.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: arhancanli
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/arhancanli/canlicapital/tree/HEAD/mcp-quant
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/canli-quant

## What it does

Canli Quant gives an agent access to quantitative finance functions covering performance, risk, derivatives, fixed income, econometrics, technical indicators, execution and portfolio construction. Its library contains 399 strategy sleeves, each defined by a fixed rule and a specified warm-up period. Agents can compare these strategies against supplied price data and apply statistical corrections when many candidates are tested at once.

The server exposes three discovery and execution tools by default. `find_tool` searches the catalog, `describe_tool` returns a function's input schema, and `run_tool` performs the calculation. Results are tested against separate implementations, including QuantLib, statsmodels and arch. Local stdio execution needs no API key and makes no network calls, keeping submitted data on the machine. Calculations that produce `NaN` or `Infinity` fail with a tool error instead of being reported as successful. Run it with `npx`, and use `CANLI_TOOLSETS` to choose which tool groups to expose.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CANLI_TOOLSETS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CANLI_TOOLSETS=<CANLI_TOOLSETS> --transport stdio mcp-quant -- npx -y canli-quant-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp-quant --env CANLI_TOOLSETS=<CANLI_TOOLSETS> -- npx -y canli-quant-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-quant": {
            "command": "npx",
            "args": [
                "-y",
                "canli-quant-mcp"
            ],
            "env": {
                "CANLI_TOOLSETS": "<CANLI_TOOLSETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-quant": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "canli-quant-mcp"
            ],
            "env": {
                "CANLI_TOOLSETS": "<CANLI_TOOLSETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CANLI_TOOLSETS=<CANLI_TOOLSETS> mcp-quant npx -y canli-quant-mcp
```
Replace <…> with your own values

## When to use it
- Measure a trading strategy's returns and downside risk
- Price a barrier or Asian option against a vanilla contract
- Test a time series for stationarity and mean reversion
- Rank strategy sleeves while correcting for multiple trials
- Construct a portfolio using a selected allocation method

## Example prompts
- Evaluate my strategy's returns after accounting for all the variants I tested, including the deflated Sharpe ratio.
- Price a six-month barrier option and compare its value with a standard call.
- Run ADF and KPSS on this spread, then backtest a mean-reversion strategy with trading costs.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44591
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5469
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2817
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2197
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [arhancanli/canlicapital](https://affpapa.org/en/nevibecode/by/arhancanli/canlicapital.md) — 7 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
