filesystem vs swiftlens
并排对比,帮你在这两个 MCP server 之间做选择。
filesystem by modelcontextprotocol | swiftlens by swiftlens | |
|---|---|---|
| Stars | ★ 85,748 | ★ 124 |
| 30天用量 | — | — |
| 综合分 | 77 | 44 |
| 官方 | ✓ | — |
| 分类 | 本地文件系统开发者工具效率工具 | 开发者工具AI / LLM 工具其它 |
| 实现语言 | TypeScript | Python |
| 最近提交 | 本月 | 10 个月前 |
filesystem · 概述
功能丰富的文件系统操作 MCP 服务器,具有动态目录访问控制功能。
swiftlens · 概述
SwiftLens MCP 服务器通过 SourceKit-LSP 集成,让 AI 模型能以编译器级精度理解 Swift 代码库。
filesystem · 使用场景
- 使 AI 模型能够读取和写入项目文件进行开发
- 允许 Claude 或其他 MCP 客户端浏览和分析代码库
- 为内容生成提供对特定目录的安全沙盒访问
swiftlens · 使用场景
- AI 辅助的 Swift 应用代码重构和现代化
- Swift 项目的深度代码分析和文档生成
- 代码变更过程中的跨引用和影响分析
filesystem · 安装
安装
使用 NPX
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/directory"
]
}
}
}使用 Docker
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount", "type=bind,src=/path/to/allowed/dir,dst=/projects/allowed/dir",
"mcp/filesystem",
"/projects"
]
}
}
}VS Code 扩展
点击 README 中的安装按钮直接在 VS Code 中安装。
swiftlens · 安装
安装
前置条件
- macOS(SourceKit-LSP 需要)
- Python 3.10+
- Xcode(从 App Store 完整安装)
快速开始
为 Claude Code / Gemini CLI 配置
添加到您的 JSON 配置文件的 mcpServers 部分:
{
"mcpServers": {
"swiftlens": {
"command": "uvx",
"args": ["swiftlens"]
}
}
}构建 SourceKit LSP 索引
SwiftLens 需要索引存储进行跨文件分析。使用以下命令构建:
# 导航到您的 Swift 项目
cd /path/to/your/swift/project
# 使用索引构建
swift build -Xswiftc -index-store-path -Xswiftc .build/index/store**重要**:当您添加新的 Swift 文件、更改公共接口或发现缺少符号引用时,需要重新构建索引。