根茎
与编辑器无关的代码智能MCP服务器。赋予AI代理符号级别 导航、结构和重构曲面,而不是强迫它们读取 原始文件。
以真菌根茎命名,这是一种通过真菌传播的根状结构 环境,暴露隐藏的路径。
部分 担子菌生态系统.
______________________________________________________________________
问题
大多数MCP兼容客户端没有内置的代码智能。他们可以阅读 文件,但它们无法导航符号、查找引用、检查结构或 执行项目范围的重构,而无需昂贵的原始读取和脆弱的搜索。
解决方案
Rhizome为任何MCP客户端提供了一个独立的代码智能层。 Tree sitter处理快速的离线结构工作,LSP在需要时接管 跨文件语义,MCP表面保持结果足够紧凑 在真实会话中使用。
______________________________________________________________________
生态系统
| 工具 | 目的 |
|---|---|
| 根茎 | 通过树保姆和LSP实现代码智能 |
| 帽子 | 生态系统的Web仪表板 |
| 丝膜 | 生命周期信号捕获和会话归因 |
| 菌丝 | 持久代理内存 |
| 薄片 | 编码代理的技能、钩子和插件 |
| 菌丝体 | 令牌优化命令输出 |
| 孢子 | 共享传输和编辑器原语 |
| 柄 | 生态系统安装人员和管理人员 |
| 女巫 | 执行主机运行时层 |
边界:rhizome拥有代码智能和结构编辑工具。 它不拥有内存、shell过滤、生命周期捕获或安装。 后端选择保持集中rhizome-core::BackendSelector;rhizome-mcp通过共享策略路由工具,而不是发明 特设LSP分支,以及rhizome-lsp专注于现场协议 客户和翻译。
______________________________________________________________________
快速开始
# Install via ecosystem installer
curl -fsSL https://raw.githubusercontent.com/basidiocarp/stipe/main/install.sh | sh
stipe setup或者从源代码构建:
# Build
cargo build --release
# Recommended: full ecosystem setup
stipe init
# Alternative: rhizome-only config guidance
rhizome init# Inspect status and servers
rhizome status
rhizome lsp status
rhizome lsp install python
# Use directly
rhizome symbols src/main.rs
rhizome structure src/lib.rs______________________________________________________________________
运作原理
MCP client Rhizome Backend
────────── ─────── ───────
tool call ─► backend selector ─► tree-sitter
deeper query ─► capability check ─► LSP if needed
edit or export ─► tool handler ─► project-aware result- 接收MCP请求:导航、诊断、编辑和导出调用通过MCP服务器到达。
- 选择后端:根据工具和语言选择树形图、通用回退或LSP。
- 运行项目感知分析:解析结构、符号、引用或诊断。
- 返回结构化结果:发出紧凑的机器可读数据,而不是原始文件转储。
- 导出知识:在需要时将代码图数据发送给Hyphae。
______________________________________________________________________
支持的语言
| 层级 | 语言 | 工作原理 |
|---|---|---|
| 完整的查询模式 | 10种语言 | 特定语言的树型查询 |
| 通用回退 | 默认构建中有4种语言 | 通用节点类型上的通用AST漫游器 |
| 可选语法包 | 3种小众语言 | lang-all 启用C#、Swift和Haskell树保姆支持 |
| 仅限LSP | 14种或更多语言 | 需要语言服务器 |
所有31种支持的语言都有LSP服务器配置,20种或更多语言有 自动安装食谱。默认二进制将最重的利基语法排除在外 装运的树保姆套装; C#, Swift,以及 Haskell 保持可用 通过LSP,除非您选择加入 rhizome-treesitter/lang-all.
______________________________________________________________________
Rhizome拥有什么
- 符号导航和结构查询
- 树保姆和LSP后端编排
- 安全的结构编辑工具
- 代码图导出到Hyphae
Rhizome不拥有什么
- 长期记忆和检索:由
hyphae - 令牌过滤:由处理
mycelium - 生命周期信号捕获:由
cortina - 安装和主机注册:由
stipe
______________________________________________________________________
主要特点
- 双后端模型:默认情况下使用树保姆,并在任务需要时升级到LSP。
- MCP第一表面:与Claude Code、Codex、Cursor、Continue和其他MCP客户端配合使用。
- 结构编辑:公开有针对性的编辑工具,而不是面向行的shell修补。
- 项目感知导出:可以将代码图数据发送到Hyphae回忆录中。
- 托管LSP支持:包括状态、安装和每种语言的配置界面。
______________________________________________________________________
建筑
rhizome/
├── rhizome-core backend selection, config, installer
├── rhizome-treesitter offline parsing and symbol queries
├── rhizome-lsp LSP client backend
├── rhizome-mcp MCP server and tool handlers
└── rhizome-cli CLI entry pointrhizome serve start MCP server
rhizome symbols list symbols
rhizome structure show symbol tree
rhizome status show backend status
rhizome lsp install install an LSP server
rhizome export export code graph to Hyphae
rhizome export-understanding export bounded repo understanding
rhizome summarize summarize project structure and entry points
rhizome doctor diagnose common installation issues______________________________________________________________________
配置
#
/rhizome/config.toml
[languages.python]
server_binary = "ruff"
server_args = ["server"]
[lsp]
disable_download = false日志记录
Rhizome读取 RHIZOME_LOG 首先,然后回落到 RUST_LOG如果两者都不是 设置,默认为 warn.
# General debugging
RHIZOME_LOG=debug rhizome serve
# Narrow to a noisy module
RHIZOME_LOG=rhizome_mcp::tools=debug rhizome serverhizome serve 为换行符分隔的MCP JSON-RPC保留stdout 交通。日志会转到stderr,这样它们就不会损坏传输。
Repo了解导出状态
rhizome export-understanding --json 以及MCP export_repo_understanding 工具发出两个单独的状态曲面:
update_class:仅显示人类摘要标签export_status:面向机器的编排合同
使用 export_status 为了实现自动化。它揭示了:
outcome:complete_success,partial_success,cached_reuse,no_supported_files,或full_failurerefresh_kind:full_refresh,partial_refresh,cached_reuse,或no_refreshany_exports_succeeded和any_exports_failedsafe_to_consume
编排规则:处理 partial_success 即使在 人工制品存在。只有在以下情况下才能理解自动消费回购 safe_to_consume 是 true.
cached_reuse 意味着Rhizome找到了支持的文件并重用了缓存的导出 而无需对其进行再处理。 no_supported_files 是一个有界的无运算结果 不包含任何可导出内容的路径;不要将其视为等同于缓存 重新使用。
______________________________________________________________________
文档
- docs/README.md:文档索引
- docs/architecture.md:后端和服务器架构
- docs/config.md:配置文件引用
- docs/语言设置.md:语言和LSP设置详细信息
- docs/故障排除.md:诊断和修复
- docs/tooling.md:repo本地测试和分析
- docs/roadmap.md:计划工作
- docs/lsp-guide.md:以LSP为重点的指导
发展
# Fast test loop
cargo nextest run --workspace
# Targeted benchmark for tree-sitter symbol extraction
cargo bench -p rhizome-treesitter --bench parse_symbols
# Opt into every tree-sitter grammar when you need the niche language pack
cargo build --workspace -p rhizome-cli --features rhizome-treesitter/lang-all
# Full build and lint
cargo build --release
cargo clippy
cargo fmt
# Use command timing when you need to inspect a real command path
time cargo run -p rhizome-cli --bin rhizome -- symbols /absolute/path/to/file.rs许可证
看 许可证 了解详情。
