flowR

io.github.flowr-analysis由 GitHub 帳號 flowr-analysis 發布v0.1.3更新於 Oct 29, 2026

Static dataflow analysis, program slicing, linting, and dependency extraction for R code.

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

flowR 提供單一 query 工具,讓助手在不執行程式碼的情況下對 R 程式碼做靜態分析:切片、lint、相依性擷取與簽章查詢。

可以做什麼
  • 靜態分析 R 程式碼:以程式切片找出影響某變數的程式碼、lint 結果、相依性擷取
  • 查詢 R 套件簽章,並依簽章資料庫推測套件版本
  • 透過同一個 query 工具執行 flowR Query API 的其他查詢
適用情境
適合助手需要處理 R 原始碼的情況:理解資料流、找出影響某個值的程式碼、對指令碼做 lint、列出相依性或查詢套件簽章,且不需要安裝 R 或執行程式碼。
執行需求
透過 npm 套件 @eagleoutice/flowr-mcp 以 stdio 在本機執行(npx),需要 Node.js,不需安裝 R。首次啟動會從 flowR 發行頁下載約 66 MB 的簽章資料庫到 ~/.cache/flowr 並驗證雜湊。遠端用戶端需以 HTTP 啟動並置於 HTTPS 之後,可設定 PORT、HOST 與 FLOWR_MCP_PATH。
安裝前請注意
伺服器不會執行被分析的程式碼,但 linter 的 checkUrls 選項會讓它連線程式碼中的網址。HTTP 模式下它將程式碼視為不可信並限制檔案存取、網路、程序與 R,但密鑰路徑(FLOWR_MCP_PATH)是遠端用戶端唯一支援的存取控制,公開執行個體建議加上速率限制。首次啟動會下載資料庫。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

flowR MCP Server

A Model Context Protocol server with a single query tool that lets LLM clients analyze R code with flowR: slicing, linting, dependencies, version guessing, signature database search, and every other query of the Query API. No R installation is needed.

On its first start, the server downloads flowR's signature database (about 66 MB) from the flowR releases into ~/.cache/flowr and checks its hash. Version guessing and signature search need this database. Everything else also works offline. The server never runs the analyzed code. It contacts no other server, unless a query asks the linter to check the URLs in the code (checkUrls, which is never allowed over HTTP).

In Claude Code, one plugin installs both this server and the flowR skill:

text
/plugin install flowr --marketplace flowr-analysis/flowr

Other local clients start it over stdio:

shell
claude mcp add flowr -- npx -y --omit=optional --ignore-scripts @eagleoutice/flowr-mcp      # Claude Codecodex mcp add flowr -- npx -y --omit=optional --ignore-scripts @eagleoutice/flowr-mcp       # OpenAI Codexgemini mcp add flowr npx -y --omit=optional --ignore-scripts @eagleoutice/flowr-mcp         # Gemini CLI

or, configured by JSON (Claude Desktop, Cursor, VS Code, ...):

json
{ "mcpServers": { "flowr": { "command": "npx", "args": ["-y", "--omit=optional", "--ignore-scripts", "@eagleoutice/flowr-mcp"] } } }

The flags keep the install small. They skip the optional dependencies flowR does not need here, and they run no install scripts. The package's npm-shrinkwrap.json pins every dependency.

Remote clients (ChatGPT, claude.ai, ...) need the server running over HTTP behind HTTPS:

shell
npx -y --omit=optional --ignore-scripts @eagleoutice/flowr-mcp --http 1042cloudflared tunnel --url http://localhost:1042

Then add https://<host>/mcp as a connector (in ChatGPT, this needs developer mode). Without a port, the server uses $PORT or 1042. It listens on 127.0.0.1 unless HOST says otherwise, for example HOST=0.0.0.0 in a container. Setting FLOWR_MCP_PATH=/mcp/<random> replaces /mcp with a secret path. A secret path is the only access control that every remote client supports.

Over HTTP, the server treats the code as untrusted:

  • It never reads its own files: there is no files argument, source() is ignored, and the config query is refused.
  • It runs in flowR's secure mode, without network access, processes, or R.
  • It keeps stack traces to itself.
  • It refuses requests from browser pages and requests over 1 MB.
  • It runs one analysis at a time, with at most 16 waiting, and stops each after 30 seconds or 2 GB of memory.
  • It cuts answers at 50000 characters.

Put a rate limit in front of a public instance.

SKILL.md is an agent skill (Claude, Codex, Gemini CLI, ...) that says when and how to use flowR, with or without this server. To use it, copy it to, for example, ~/.claude/skills/flowr/SKILL.md.

來源:mcp/README.md,提交 e2b2464

工具

1

query

Statically analyze R code and search R package signatures with flowR queries (https://github.com/flowr-analysis/flowr/wiki/Query-API). Common ones: {"type":"static-slice","criteria":["12@x"]} for the code affecting x in line 12, {"type":"linter"} for lint findings, {"type":"dependencies"} for loaded libraries, read and written files, {"type":"guess-dep-versions"} for the package versions the code works with, {"type":"call-context","callName":"^read_"} for calls, and, needing no code, {"type":"signature","package":"dplyr","function":"across"} to search signatures and versions (globs allowed), {"type":"function-info","name":"filter"} for the packages exporting a function. A query with wrong arguments is answered with its schema. Types: call-context (Call-Context Query), config (Config Query), control-flow (Control-Flow Query), call-graph (Call-Graph Query), dataflow (Dataflow Query), does-call (Does-Call Query), dataflow-lens (Dataflow Lens Query), absint (Abstract Interpretation Query), files (Files Query), id-map (Id-Map Query), normalized-ast (Normalized AST Query), dataflow-cluster (Dataflow Cluster Query), static-slice (Static Slice Query), provenance (Provenance Query), input-sources (Input Sources Query), dependencies (Dependencies Query), location-map (Location Map Query), search (Search Query), happens-before (Happens-Before Query), inspect-exception (Inspect Exceptions of Functions Query), inspect-higher-order (Inspect Higher-Order Functions Query), inspect-recursion (Inspect Recursive Functions Query), inspect-fn-props (Inspect Argument Roles Query), resolve-value (Resolve Value Query), project (Project Query), signature (Signature Query), origin (Origin Query), linter (Linter Query), dice (Dice Query), guess-dep-versions (Guess Dependency Versions Query), function-info (Function Info Query)

輸入參數codefilesqueries必填

版本歷史

2
  1. v0.1.3最新Oct 22, 2026
  2. v0.1.0Oct 20, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分