Canli Quant — MCP Server for Claude Code: Setup and Features
Run quantitative finance calculations through an AI coding agent, from option pricing and portfolio analysis to strategy testing and market-data checks.
claude mcp add --env CANLI_TOOLSETS=<CANLI_TOOLSETS> --transport stdio mcp-quant -- npx -y canli-quant-mcpWhat Canli Quant 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.
What it helps with
- 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 for the agent
- 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.
How to install Canli Quant
Platform CLI
claude mcp add --env CANLI_TOOLSETS=<CANLI_TOOLSETS> --transport stdio mcp-quant -- npx -y canli-quant-mcpReplace <…> with your own values
Platform CLI
codex mcp add mcp-quant --env CANLI_TOOLSETS=<CANLI_TOOLSETS> -- npx -y canli-quant-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp-quant": {
"command": "npx",
"args": [
"-y",
"canli-quant-mcp"
],
"env": {
"CANLI_TOOLSETS": "<CANLI_TOOLSETS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp-quant": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"canli-quant-mcp"
],
"env": {
"CANLI_TOOLSETS": "<CANLI_TOOLSETS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e CANLI_TOOLSETS=<CANLI_TOOLSETS> mcp-quant npx -y canli-quant-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Canli Quant
How do I install Canli Quant in Claude Code?
Run claude mcp add canli-quant-mcp -- npx -y canli-quant-mcp. To configure selected tool groups, run claude mcp add --env CANLI_TOOLSETS=<CANLI_TOOLSETS> --transport stdio mcp-quant -- npx -y canli-quant-mcp.
What does Canli Quant do?
It exposes quantitative finance calculations to an AI agent, including risk analysis, derivative pricing, econometric tests and portfolio construction. Its strategy library supports comparisons across 399 predefined sleeves.
Does Canli Quant require an API key?
No. It runs locally over stdio without making network calls. Launch it with npx.