Canli Capital
io.github.arhancanliv0.3.0更新於 Oct 11, 2026
306 finance tools (quant, validation, SEC filings, markets, options, paper trading) behind 3 tools.
概覽
把 306 個金融工具(量化分析、SEC 基本面、市場資料、回測與 Alpaca 模擬交易)整合在三個搜尋與呼叫工具之後。
- 功能
- 一個本機 MCP 伺服器,把七個各自獨立發布的金融工具包載入同一個行程,並透過三個工具對外提供:find_tool 用來搜尋,describe_tool 用來讀取單一工具的 schema,run_tool 用來呼叫任何工具。工具包涵蓋量化金融(績效與風險、選擇權、固定收益、投資組合、計量經濟、指標、策略組合庫)、回測驗證(通縮夏普比率、過度配適與資料窺探檢定、洩漏與安慰劑檢定)、時點化 SEC 基本面、市場與宏觀資料、因子回測,以及附交易前檢查的 Alpaca 模擬交易。另外提供 company_brief、earnings_preview、macro_snapshot、ownership、backtest_check 五個提示工作流程。
- 適用情境
- 適合需要在同一處取得廣泛金融分析能力的助理:量化與風險計算、SEC 申報與基本面、市場、宏觀與持股資料、策略回測與驗證,或模擬交易。也適合不想分別安裝七個伺服器並承擔其上下文成本的軟體使用者。
- 執行需求
- 透過 stdio 在本機執行,通常使用 npx canli-mcp,因此需要 Node.js。預設工具包不需要帳號。可選環境變數:CANLI_PACKS 選擇啟用的工具包,CANLI_OFFLINE=1 只保留 quant 與 validation,CANLI_HOME 指定模擬交易工具包的檔案位置,ALPACA_PAPER_KEY_ID 與 ALPACA_PAPER_SECRET_KEY 用來啟用模擬交易。fundamentals、research、backtest、markets 與 paper 工具包需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Canli Capital,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
canli-mcp
Every Canli Capital MCP server in one: 306 finance tools for Claude, Cursor or any MCP client.
- Quant finance: 235 tools covering performance and risk, options and exotics, fixed income, portfolios, econometrics, indicators, and a library of 399 strategy sleeves with multiple-testing corrections.
- Backtest validation: deflated Sharpe, overfitting probability, data-snooping tests, leakage checks and placebo tests, run on your machine.
- Point-in-time SEC fundamentals.
- Markets from the sources, no key: screens of every US-listed company, company reports, event studies, SEC filings and their sections, insider trades, 13F and 5% holders, fund and ETF portfolios, index members, short interest, off-exchange volume, fails to deliver, futures positioning, executive pay, revenue by segment, options chains and volatility surfaces, the VIX futures curve, Fed decisions and projections, the economic calendar, Treasury yields and auctions, the federal debt, FRED, World Bank and OECD data, and prices for stocks, currencies, futures, indices and crypto.
- Canli Capital's open research record.
- Factor backtests without lookahead.
- Alpaca paper trading behind pre-trade checks.
Each pack is a published, separately tested server. This package loads them into one process and puts three tools in front of them.
Claude Code:
Claude Desktop, Cursor or any MCP client:
Why one server is cheaper and faster
Measured on Node 24 on 2026-10-11 with bench/context.py (o200k tokens of the tool objects a
client receives, plus the server instructions; start-up is the median time from launch to the
tool list):
- Three tools in context. The model searches with
find_tool, reads one schema withdescribe_tool, and calls anything withrun_tool. On 48 everyday requests written after the last change to the search and never tuned on, the right tool comes first 46 times and is in the top three 47 times (0.2.1: 25 and 29).test/search.test.mjsholds these and 135 more. - Nothing loads until it is used. Start-up reads a prebuilt index of all 306 tools; a pack's code loads the first time one of its tools runs.
- Data by file, not by pasting. Any argument can be
{"$file": "prices.csv", "column": "close"}(or"columns": ["SPY", "TLT"]or"all"). For 1,000 prices that is 23 tokens instead of 4,893, and the model cannot drop a number while copying. - Several calls in one round trip.
run_tooltakescalls(up to 25). A call can use an earlier call's output with{"$result": 0, "path": "rows", "pick": [0, 1]}, so intermediate data never passes through the model, andreturn: "last"sends back only the final answer. Labeling 1,000 prices and then weighting the labels took 72 tokens of tool input this way, against 31,917 to read the labels and type them into the next call. - Shorter numbers when they are enough.
digits: 5rounds every result.
Workflows as prompts
Clients that show MCP prompts (Claude Desktop and Claude Code list them as slash commands) offer five
workflows. Each one runs a single batched run_tool call and says what to write from the results:
A prompt is offered only when every tool it names is in an enabled pack (CANLI_PACKS,
CANLI_OFFLINE), and test/prompts.test.mjs checks each call against its tool's own schema.
Prompts add nothing to a request's context until one is chosen.
An agent, end to end
The same model (gpt-5.4-mini) answered seven tasks twice each:
- the Sharpe ratio, drawdown and value at risk of a pasted price file;
- a deflated Sharpe from summary numbers;
- a Black-Scholes price;
- a 399-sleeve tournament on three assets;
- Apple's first-reported 2019 EPS.
Answers were graded against the tools' own values (bench/agent-eval.mjs; results in
bench/agent-eval-2026-10-08.json):
The fixes came from reading the runs:
- The model narrowed
find_toolto one pack and missed the tool that took its inputs, so the pack filter is gone. - It passed made-up two-point series to a tool that wanted returns, so the quant deflated and probabilistic Sharpe tools now take summary numbers and refuse too little data.
- It put
selectandreturninside a tool's arguments, so run_tool moves them out. - It asked
selectfor fields that do not exist, so the reply now lists the fields that do.
This is one small model with two runs per task, so read the differences as large or small, not as exact rates.
Privacy
Everything runs on your machine. canli://privacy states, per pack, what leaves it:
CANLI_OFFLINE=1 enables only the packs with no network, and no other pack's code is even loaded.
test/privacy.test.mjs runs the server that way with fetch and every network module made to
throw, and the quant and validation tools still answer. The server itself has no network, write or
logging code (also tested). Opt-in receipts (receipt: true) carry hashes, never data.
Configuration
Order-sending tools never run inside a batch: preview first, then send on its own.
Packs and what each is checked against
Two tools differ from their standalone servers. Validation's stress_test is strategy_stress_test
here, because the quant pack has a portfolio stress_test. Validation's get_key and
service_status are left out, because validation runs locally here. canli://packs lists both.
Development
MIT licence.
來源:mcp-canli/README.md,提交 d2d0c99
工具
0版本歷史
1- v0.3.0最新Oct 11, 2026

