MCP Catalogs
首页

context-mode vs filesystem

并排对比,帮你在这两个 MCP server 之间做选择。

context-mode
by mksglu
filesystem
by modelcontextprotocol
Stars★ 14,865★ 85,748
30天用量
综合分6277
官方
分类
AI / LLM 工具开发者工具效率工具
本地文件系统开发者工具效率工具
实现语言TypeScriptTypeScript
最近提交本月本月

context-mode · 概述

一个 MCP server,通过沙箱化工具输出,为 AI 代理优化上下文窗口,减少 98%。

filesystem · 概述

功能丰富的文件系统操作 MCP 服务器,具有动态目录访问控制功能。

context-mode · 使用场景

  • 处理大文件或多个文档时优化上下文使用
  • 跨 AI 编码会话保持会话连续性而不丢失编辑
  • 通过执行代码而非读取文件内容来减少令牌消耗
  • 通过最小化上下文溢出提高 AI 代理性能

filesystem · 使用场景

  • 使 AI 模型能够读取和写入项目文件进行开发
  • 允许 Claude 或其他 MCP 客户端浏览和分析代码库
  • 为内容生成提供对特定目录的安全沙盒访问

context-mode · 安装

安装

Claude Code

/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode

Gemini CLI

npm install -g context-mode

添加到 ~/.gemini/settings.json

{
  "mcpServers": {
    "context-mode": {
      "command": "context-mode"
    }
  },
  "hooks": {
    "BeforeTool": [{
      "matcher": "run_shell_command|read_file|read_many_files|grep_search|search_file_content|web_fetch|activate_skill",
      "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli beforetool" }]
    }],
    "AfterTool": [{
      "matcher": "",
      "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli aftertool" }]
    }],
    "PreCompress": [{
      "matcher": "",
      "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli precompress" }]
    }],
    "SessionStart": [{
      "matcher": "",
      "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli sessionstart" }]
    }]
  }
}

手动 MCP(适用于 Claude Desktop)

{
  "mcpServers": {
    "context-mode": {
      "command": "npx",
      "args": ["-y", "context-mode"]
    }
  }
}

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 中安装。

对比内容由 README + GitHub 公开数据自动生成,定期更新。