13FLOW

io.github.bluetouff由 GitHub 帳號 bluetouff 發布v1.0.0更新於 Oct 24, 2026

Source-linked SEC 13F research, quality checks, watchlists and audit trails for agents.

已驗證Streamable HTTP可網頁執行金融資料與分析

概覽

AI 產生的概覽

以唯讀方式存取 13FLOW 的 SEC 13F 研究資料:基金持倉、個股持有人、自選股篩選、訊號與資料品質提示。

可以做什麼
  • 查看服務與研究狀態:LIVE/DEMO/DEGRADED 狀態、產品就緒度、研究邊界與彙總使用統計
  • 檢索並讀取 13F 管理機構:分頁基金清單,以及依 SEC CIK 查詢某基金的持倉、變動與申報歷史
  • 查詢某檔股票的目前 13F 持有人、季度變動、品質警告與序數研究評分
  • 篩選自選股:以 13F 資金流與品質門檻評估 1 至 25 檔股票,或依條件為候選股票排序
  • 讀取 Confluence 訊號、僅追加的修訂歷史與凍結的方法論契約
  • 檢視公開的資料品質警告,作為複核提示
適用情境
適合需要附來源連結的機構持倉研究、以 13F 為基礎的自選股篩選,或已發布訊號的稽核追溯,而不想自行建置 EDGAR 資料管線的情境。它是研究與篩選工具,不是交易或預測工具。
執行需求
遠端 Streamable HTTP 端點位於 13flow.eu;公開唯讀工具不需帳號、金鑰或環境變數。選用的 Pro 工具預設不對外公布,需由營運方啟用獨立設定,並提供 X-13FLOW-Key 標頭或 x402 付款簽章。
安裝前請注意
公開工具免費且唯讀,但選用的 Pro 設定可能透過區塊鏈網路上的 x402 付款按次收費,使用前應確認是否已啟用付款。評分僅為序數啟發式排名,不是機率或預測;資料品質警告是複核提示而非自動修正。使用統計僅保存彙總資料,不保存提示詞、參數或 IP 位址。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 13FLOW,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.bluetouff%2F13flow/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "13flow": {
      "type": "http",
      "url": "https://13flow.eu/api/mcp"
    }
  }
}

README

13FLOW MCP Server

This directory contains the production MCP surface for 13FLOW.

It is intentionally separate from the Flask application:

  • Flask serves the public website, public API and Pro API.
  • This Node service exposes a Model Context Protocol endpoint over Streamable HTTP.
  • Apache publishes the service at https://13flow.eu/api/mcp.
  • The service calls the local Flask API at http://127.0.0.1:8000 and never touches EDGAR.

The design mirrors the l0g.fr MCP architecture: stateless transport, one MCP server per request, bounded JSON bodies, Host/Origin validation, per-IP rate limiting, health checks, structured tool output and read-only annotations.

Capability boundary

Public tools are free and read-only:

  • get_live_status
  • get_product_status
  • get_research_readiness
  • list_funds
  • get_fund
  • get_stock
  • preview_watchlist
  • discover_watchlist
  • get_confluence_signals
  • get_signal_history
  • get_confluence_methodology
  • get_data_quality
  • get_agent_stats

Public resources include 13flow://product-status, 13flow://research-readiness and 13flow://agent-stats. They expose the current validation, data-quality and operator-review boundaries without turning the retired public commercial offer into an agent-facing contract.

get_agent_stats, the resource and GET /stats expose the same privacy-safe counters used by /agents, /fr/agents and /api/agent-stats. They store UTC daily aggregates only: fixed client families, registered tool names, handler outcomes and duration counters. The telemetry store never retains IP addresses, User-Agents, client versions, raw client names, arguments, prompts, responses or keys. An initialization is a handshake, not a unique user.

Context-heavy tools are bounded by default. list_funds returns compact paginated rows, fund and ticker tools expose explicit result-window counts, and watchlist tools limit movement evidence while keeping canonical web and API URLs in structured output.

Optional Pro tools are read-only, but are not registered or advertised unless an operator deliberately sets MCP_PRO_TOOLS_ENABLED=1:

  • pro.list_funds
  • pro.get_fund
  • pro.get_data_quality

When that separate profile is enabled, calls are accepted only when one of these conditions is true:

  1. The request includes a valid existing 13FLOW Pro API key in X-13FLOW-Key.
  2. The request includes an x402 v2 PAYMENT-SIGNATURE that is verified and settled through the configured facilitator.

Client Authorization headers are never accepted as MCP Pro credentials and are never forwarded downstream. This prevents an MCP OAuth token from being passed through to a different API audience.

If neither condition holds, the server returns HTTP 402 Payment Required with a PAYMENT-REQUIRED header. The body remains JSON-RPC shaped so MCP clients can display a clear failure.

x402 policy

13FLOW can use x402 as a machine-to-machine payment gate for individual Pro MCP tool calls. It is disabled by default, absent from the Registry profile and not part of the current public offer. Enabling it also requires an explicit Pro profile and a fresh operational security review. The server advertises one accepted payment option for each paid tool:

  • scheme: exact by default
  • network: eip155:8453 by default
  • price: MCP_X402_PRICE
  • destination: MCP_X402_PAY_TO
  • resource: https://13flow.eu/api/mcp#<tool>

The server is fail-closed:

  • if MCP_X402_ENABLED=1 is absent, no x402 paid access is granted;
  • if MCP_X402_PAY_TO is absent, no x402 paid access is granted;
  • if MCP_X402_FACILITATOR_URL is absent, no x402 paid access is granted;
  • if MCP_13FLOW_INTERNAL_PRO_TOKEN_FILE is absent, no x402 paid access is granted;
  • a payment must pass facilitator /verify and /settle before the MCP tool runs.

The implementation follows x402 v2 HTTP headers:

  • PAYMENT-REQUIRED: server to client, base64 JSON payment requirement;
  • PAYMENT-SIGNATURE: client to server, base64 JSON payment payload;
  • PAYMENT-RESPONSE: server to client, base64 JSON settlement response.

The optional payment-identifier extension is accepted. When present, the server stores a short-lived fingerprint-bound settlement cache so retries for the exact same request do not execute as a different paid operation. Use Redis or another shared store before running multiple MCP replicas behind a load balancer.

Environment

bash
MCP_HOST=127.0.0.1MCP_PORT=8849MCP_PATH=/mcpMCP_PUBLIC_SITE=https://13flow.euMCP_13FLOW_API_BASE=http://127.0.0.1:8000# Required only for an explicitly enabled isolated Pro profile.MCP_13FLOW_PRO_API_BASE=http://127.0.0.1:8001MCP_ALLOWED_HOSTS=13flow.eu,www.13flow.eu,127.0.0.1,localhostMCP_ALLOWED_ORIGINS=https://13flow.eu,https://www.13flow.euMCP_RATE_MAX=120MCP_MAX_RATE_BUCKETS=10000MCP_MAX_BODY=1048576MCP_MAX_UPSTREAM_BODY=8388608MCP_MAX_IN_FLIGHT=32MCP_MAX_CONNECTIONS=128MCP_MAX_PAYMENT_CACHE=500MCP_STATS_RETENTION_DAYS=30# Production is pinned to this systemd StateDirectory path.MCP_STATS_FILE=/var/lib/13flow-mcp/agent-stats.jsonMCP_API_TIMEOUT_MS=10000MCP_REQUEST_TIMEOUT_MS=15000MCP_GIT_SHA=<deploy sha>
# Keep this disabled on the public Registry daemon.MCP_PRO_TOOLS_ENABLED=0
# Optional isolated profile only (do not uncomment on the Registry daemon):# MCP_PRO_TOOLS_ENABLED=1# MCP_X402_ENABLED=1# MCP_X402_SCHEME=exact# MCP_X402_NETWORK=eip155:8453# MCP_X402_PRICE=$0.05# MCP_X402_PAY_TO=0x...# MCP_X402_ASSET=<optional asset identifier># MCP_X402_FACILITATOR_URL=https://...# Production secrets must use root-owned files, never inline environment values.# MCP_X402_FACILITATOR_AUTH_FILE=/etc/13flow/mcp-facilitator-auth
# Server-side Pro credential used only after a verified x402 settlement.# Prefer the _FILE form with a root-readable/flowmcp-readable 0640 secret.# MCP_13FLOW_INTERNAL_PRO_TOKEN_FILE=/etc/13flow/mcp-internal-pro-token

MCP_X402_TEST_MODE=1 is only for local tests. It must not be enabled in production.

Local run

bash
cd mcp-servernpm cinpm run checkMCP_13FLOW_API_BASE=https://13flow.eu npm start

In another terminal:

bash
cd mcp-serverURL=http://127.0.0.1:8849/mcp npm test

The test client verifies transport headers, Host/Origin rejection, JSON-RPC batch rejection, protocol version handling, body limits, tool/resource discovery, read-only annotations, result-size bounds, canonical provenance links and absence of Pro tools by default. Run npm run test:config and npm run test:security for fail-closed configuration, oversized upstream response and concurrency-cap regressions. npm run test:telemetry verifies persistence, retention, metric reconciliation and absence of raw client/tool data. Set SKIP_HEALTH=1 only when testing through a public proxy that intentionally keeps /healthz private. The production ModSecurity edge can reject an unsupported request content type before the MCP backend. On Debian 12, the packaged ModSecurity 2.x JSON processor is also affected by upstream issue #2807: truncated JSON can be rejected with a generic HTTP 500 before REQBODY_ERROR becomes available to a phase-2 rule. Set EXPECT_WAF_REJECTIONS=1 to accept only these bounded, fail-closed edge differences (403 or 415 for unsupported content type; 400 or 500 for truncated JSON). Direct backend tests remain strict and require 415 and 400 respectively. Do not disable SecRequestBodyAccess or the JSON processor to normalize these statuses: that would reduce request-body inspection.

bash
URL=https://13flow.eu/api/mcp \STATS_URL=https://13flow.eu/api/agent-stats \SKIP_HEALTH=1 EXPECT_WAF_REJECTIONS=1 npm test

Official MCP Registry

The root server.json declares the public Streamable HTTP endpoint as io.github.bluetouff/13flow. Validate the manifest before publication:

bash
cd /opt/13flowmcp-publisher validate

After the matching server version is deployed and the public smoke passes, authenticate as late as possible, publish once, then verify the exact version and remote URL:

bash
mcp-publisher login githubmcp-publisher publishcd mcp-servernpm run registry:verify -- --version 1.0.0

Registry publication is metadata publication. It does not deploy the MCP daemon, so the live endpoint and Registry entry must be verified independently.

Prove that the default Registry profile does not execute a private tool:

bash
curl -i http://127.0.0.1:8849/mcp \  -H 'Content-Type: application/json' \  -H 'Accept: application/json, text/event-stream' \  --data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pro.list_funds","arguments":{}}}'

Expected result: a JSON-RPC unknown-tool error. pro.list_funds must also be absent from tools/list.

An isolated, explicitly enabled Pro profile accepts only the dedicated key header:

bash
printf "API token: "read -r -s TOKENprintf "\n"
curl -fsS http://127.0.0.1:8849/mcp \  -H 'Content-Type: application/json' \  -H 'Accept: application/json, text/event-stream' \  -H "X-13FLOW-Key: $TOKEN" \  --data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pro.list_funds","arguments":{}}}'
unset TOKEN

Production deployment

Install dependencies once:

bash
sudo useradd --system --no-create-home --shell /usr/sbin/nologin flowmcpcd /opt/13flow/mcp-serversudo npm ci --omit=devsudo chown -R root:flowmcp /opt/13flow/mcp-serversudo chmod o+x /opt/13flow

Install the systemd unit from deploy/13flow-mcp.service, set environment variables in /etc/13flow/13flow-mcp.env, then:

bash
sudo systemctl daemon-reloadsudo systemctl enable --now 13flow-mcpcurl -fsS http://127.0.0.1:8849/healthz | python3 -m json.toolcurl -fsS http://127.0.0.1:8849/stats | python3 -m json.tool

The unit creates /var/lib/13flow-mcp as a mode 0700 systemd StateDirectory and grants the daemon no other persistent write path. agent-stats.json is written mode 0600 through a bounded temporary file and rename; production refuses an alternate telemetry path.

Apache must allow POST only on /api/mcp and proxy that path to the Node service. Keep the main site method allow-list in place so other public endpoints remain read-only. The supplied vhost caps the request at 1 MiB and removes client-supplied forwarding headers before proxying. The supplied systemd unit denies non-loopback networking; enabling an external x402 facilitator therefore requires a deliberate network-policy override and a new review. It also removes every Pro/x402 activation and secret variable after reading the environment file, so this public unit cannot be converted into the private profile by an accidental env edit.

Methodology contract

The MCP server is only a delivery protocol. It does not redefine the investment signal.

Confluence v1 remains the frozen public research contract:

  • score is an ordinal heuristic rank, not a probability or expected return;
  • default weights are heuristic until live historical validation is published;
  • live status, data quality, accession counts and coverage stay public;
  • the append-only signal history is the audit trail for signal revisions;
  • Pro output must keep enough metadata to reproduce the selected filing, basis date, positions, moves and data-quality caveats.

No MCP tool calls EDGAR directly. Freshness and 13F coverage come from the already published market database and cache files.

來源:mcp-server/README.md,提交 aa2518e

工具

13

get_live_status

Get live status

Return verifiable public state: LIVE/DEMO/DEGRADED, commit, generated_at, data_as_of, 13F period and coverage.

無需輸入參數。

get_product_status

Get product status

Return go-to-market readiness, sellable boundaries, validation status and blocked full-quant artifact.

無需輸入參數。

get_research_readiness

Get research readiness

Return the current research, validation, data-quality and operator-review boundary without commercial claims.

無需輸入參數。

get_agent_stats

Get agent statistics

Return aggregate 7/30-day MCP usage, fixed client families, tool mix and reliability. Initializations are not unique users; no IP, user-agent, version, arguments, prompts or responses are stored.

無需輸入參數。

list_funds

List tracked funds

Search and page through compact tracked 13F manager summaries. Use get_fund for positions and moves.

輸入參數limitqueryoffset

get_fund

Get fund evidence

Get a bounded public fund portfolio by SEC CIK, including filing metadata, positions, moves and history counts.

輸入參數cik必填move_limithistory_limitposition_limit

get_stock

Get ticker flow evidence

Get bounded current 13F holders, quarter moves, quality warnings and ordinal research score for one ticker.

輸入參數ticker必填holder_limitmovement_limitinclude_quality_details

preview_watchlist

Preview a ticker watchlist

Evaluate 1 to 25 tickers against trusted 13F flow, quality gates and explainable watch/monitor/block triggers.

輸入參數tickers必填movement_limitinclude_quality_details

discover_watchlist

Discover watchlist candidates

Rank trusted 13F watchlist candidates with explicit filters. Scores are ordinal research screens, not forecasts.

輸入參數limitmovesactionsmin_scoremin_buyersmin_holdersmovement_limitexclude_mega_capmax_13f_value_usdinclude_quality_details

get_confluence_signals

Get Confluence signals

Return public cached Confluence v1 signals. Scores are ordinal heuristic ranks, not probabilities. Diagnostics include up to 10 examples per category, with available/returned counts and a source_url for full API details.

輸入參數limitwindow

get_signal_history

Get signal history

Read append-only Confluence signal revisions for audit and replay.

輸入參數limittickerwindow

get_confluence_methodology

Get Confluence methodology

Return the frozen Confluence v1 methodology contract, including proof boundary and validation requirements.

無需輸入參數。

get_data_quality

Get data quality

Return public read-only data-quality warnings. These are review signals, never automatic corrections.

輸入參數limitthreshold

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分