⚠ 本页部分翻译:安装漏斗(Windows PowerShell / Linux / macOS / Claude Desktop / .mcp.json)以英文为准,中文翻译进行中。技术命令与配置以英文原文呈现,避免歧义。
安装
Silex 是以 Python 包分发的本地 MCP 服务器。它在你的机器上扫描代码库,任何内容都不会外传。需要 Python 3.10+。
# Requires Python 3.10+
pip install silex-archaeology
无需信用卡。无需账号。无遥测。下面的命令会安装到隔离的虚拟环境中——这是我们在实战中的运行方式。
Windows — PowerShell
PowerShell uses $env:USERPROFILE, never %USERPROFILE%. The %VAR% syntax is cmd.exe only — in PowerShell it does not expand and silently creates a literal %USERPROFILE% folder (a 400 MB venv landed inside one in the field). Use $env:USERPROFILE in PowerShell; keep %USERPROFILE% only in classic cmd.exe.
Create an isolated venv and install the wheel into it:
# PowerShell — create the venv and install python -m venv $env:USERPROFILE\silex-mcp\venv & $env:USERPROFILE\silex-mcp\venv\Scripts\pip install silex-archaeology # Sanity check — the server answers outside your client & $env:USERPROFILE\silex-mcp\venv\Scripts\silex-mcp-server.exe --help
Linux / macOS
Same recipe with the POSIX venv layout:
# bash / zsh — create the venv and install python3 -m venv ~/silex-mcp/venv ~/silex-mcp/venv/bin/pip install silex-archaeology # Sanity check ~/silex-mcp/venv/bin/silex-mcp-server --help
Connect your agent
Silex speaks MCP over stdio. Add it to any MCP-aware client — Cursor, Claude Desktop, Claude Code, Windsurf, Cline, Continue, Zed. The VS Code extension is coming soon; MCP is the path today. There are two config surfaces:
Claude Desktop — claude_desktop_config.json
On Windows this file lives at %APPDATA%\Claude\claude_desktop_config.json (open $env:APPDATA\Claude from PowerShell). Five lines are enough — the command plus SILEX_TIER=free:
{
"mcpServers": {
"silex": {
"command": "silex-mcp",
"args": ["serve", "--stdio"],
"env": { "SILEX_TIER": "free" }
}
}
}
Point command at the venv binary above if it isn't on your PATH. Then fully quit and reopen Claude Desktop — the tools icon lists the silex tools.
Claude Code / VS Code — .mcp.json (primary)
Windows drive-case bug. claude mcp add writes the path into ~/.claude.json as C:/… while the VS Code extension reads c:/… — the case mismatch breaks server discovery (it stalled a field run). The robust path on Windows is a .mcp.json at the project root as the primary form; keep claude mcp add for Linux/macOS.
Create .mcp.json in the root of the project you want Silex to see:
// .mcp.json — project root (Claude Code & VS Code) { "mcpServers": { "silex": { "command": "silex-mcp", "args": ["serve", "--stdio"], "env": { "SILEX_TIER": "free" } } } }
On Linux / macOS you can instead run claude mcp add silex -- silex-mcp serve --stdio.
首次扫描
首次使用时,Silex 会扫描工作区并构建本地知识库:架构、依赖、工作流和业务规则——每条论断都锚定到 file:line。随后你的代理通过下方的 MCP 工具查询这些知识。
MCP 工具
所有工具都位于 silex-archaeology 命名空间之下。完整且始终最新的列表——名称、参数和示例——由真实注册表在 MCP 工具参考 页面生成。
证据与置信度
每条论断都带有裁定、置信度百分比和来源锚点。裁定:
置信度以等宽字体显示为取整百分比(96%)。锚点是 file:line 指向源码的链接,例如 Order.cs:99-131。
未知领域
Silex 从不猜测。扫描无法证明的部分会被报告为未知领域,你的代理因此知道地图的边界在哪里。
可分享的报告
每次扫描都会生成可与团队分享的报告——与代理所见相同的证据,人类可读。
← 返回产品页