Token导航 LogoToken导航TokenDH.com
Flow Tracer logo
开发工具stdio官方级别未说明来源级核验

Flow Tracer

MCP Server

flow-tracer

FlowTracer是一款跨仓库代码流程追踪工具,通过生成Mermaid图表和逐步解释,帮助开发者理解复杂的代码流程。

工具数

4

提示词数

0

GitHub Stars

2

资源数

0
代码分析JavaScriptClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Nikita172002

提供方

Nikita172002

最后核验

2026/5/17 20:19

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx flow-tracer serve

详细介绍

流量跟踪器

跟踪代码在多个存储库中流动。用英语提问,获得美人鱼图+逐步解释。

You: "How does order creation work?"
FlowTracer: [mermaid diagram showing Frontend → API → Backend → DB across all repos]
            + step-by-step explanation with file paths and function names

适用于 任何语言 (TypeScript、Haskell、Python、Go、Java、Rust等)和 任意数量的repo.

快速开始

选项A:MCP服务器(建议Claude Code用户使用)

# Add to Claude Code (one-time)
claude mcp add flow-tracer -- npx flow-tracer

# Then in Claude Code, just say:
#   "Register repos /path/to/frontend and /path/to/backend"
#   "How does the checkout flow work?"

选项B:Web用户界面

npx flow-tracer serve
# Open http://localhost:3847
# Enter repo paths, ask questions, see diagrams in browser

选项C:克隆并在本地运行

git clone 
cd flow-tracer
npm install
node bin/flow-tracer.js serve     # web UI
# or
node bin/flow-tracer.js mcp       # MCP server

认证

FlowTracer需要访问Claude模型。两种选择:

选项1:Claude Code Pro(无需设置)

如果你有一个Claude Code订阅,它会自动工作——使用 claude CLI在引擎盖下。

选项2:无烟煤API密钥

  1. 首选 console.anthropic.com
  2. 注册/登录
  3. 首选 设置>API密钥
  4. 点击 创建密钥
  5. 复制密钥(以开头 sk-ant-api03-...)
# Set the key
export ANTHROPIC_API_KEY=sk-ant-api03-...

# Then run
npx flow-tracer serve

新帐户获取 $5免费积分每个问题的成本:约3.5美分。

可选环境变量:

ANTHROPIC_API_KEY=sk-ant-...                    # Required if no Claude CLI
FILE_SELECT_MODEL=claude-haiku-4-5-20251001     # Cheap model for file picking (default)
ANALYSIS_MODEL=claude-sonnet-4-20250514         # Quality model for analysis (default)
PORT=3847                                        # Web UI port (default)

运作原理

1. REGISTER: You give it repo paths. It scans all files and builds a
   compact manifest (function signatures + imports for each file).

2. ASK: You ask a question. Two LLM calls happen:
   Call #1 (fast): LLM reads the manifest and picks 15-25 relevant files
   Call #2 (deep): LLM reads those files and generates diagrams + explanation

3. FOLLOW UP: Ask more questions — the conversation context is preserved.

关键见解:我们让LLM读取函数签名和导入,以了解每个文件的功能,然后选择正确的文件,而不是关键字匹配文件路径(这会错过关键文件)。

MCP工具

当用作MCP服务器时,FlowTracer会公开:

工具说明
register_repos将repo路径注册到索引。先叫这个。
trace_flow问一个关于代码流的问题。返回美人鱼+解释。
follow_up使用之前的对话背景回答后续问题。
list_repos列出所有已注册的回购组。

项目结构

flow-tracer/
├── bin/flow-tracer.js      # CLI entry point (mcp or serve)
├── src/
│   ├── mcp.js              # MCP server (for Claude Code/Desktop)
│   ├── server.js           # Express web server (browser UI)
│   ├── indexer.js           # Repo scanner + LLM-guided file selection
│   ├── llm.js              # Claude integration (CLI + API dual mode)
│   ├── summarizer.js        # Builds file manifest (signatures + imports)
│   └── public/index.html   # Chat UI with mermaid rendering
├── package.json
└── README.md

例子

"How does order creation work?"
"What happens when a user clicks checkout?"
"Trace the payment flow from frontend to backend"
"How does the cart sync between Shopify and our backend?"
"What services are involved in the refund flow?"
"Show me how authentication works across repos"

目录标签

目录标签

代码分析JavaScriptClaude本地部署流程可视化多仓库支持LLM集成

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

flow-tracer

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP