JohnXu22786/fs-mcp0

paddock

面向 agent 的本地文件系统工具集:读 / 写 / 检索 / 目录操作,全部被约束在可配置的「围场」目录内,以 MCP stdio server 形式运行,零运行时依赖,可被 dsh 等插件化 harness 加载

包名
paddock
版本
1.0.0
许可证
MIT
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JohnXu22786/fs-mcp

Configuration

Configuration is merged as "defaults < config file < environment variables < command-line arguments"; paddock directories are unioned across all three sources.

Command line

node src/entry.js [options] [paddock dirs…]

  --config 
   config file (defaults to paddock.config.json in the working directory, loaded only if present)
  --read-only       read-only mode: blocks all write operations
  --zones 
    additional paddock directories (repeatable)
  --verbose         debug logging (stderr)
  --version / --help

Positional arguments are treated as paddock directories. At least one paddock is required, otherwise startup fails (exit code 2).

Config file (paddock.config.json)

{
  "zones": ["C:/Users/me/projects", "C:/Users/me/data"],
  "readOnly": false,
  "limits": {
    "peekBytes": 1048576,
    "readBytes": 16777216,
    "sliceBytes": 65536,
    "grepBytes": 262144,
    "grepHits": 200,
    "findHits": 1000,
    "treeDepth": 6
  },
  "behavior": {
    "includeHidden": false
  }
}

A full example is in examples/paddock.config.example.json.

Environment variables

VariableDescription
PADDOCK_CONFIGconfig file path (takes precedence over the default path)
PADDOCK_ZONESpaddock directories: a JSON array string (["/a","/b"]) or a single path
PADDOCK_READ_ONLY1 / true / yes / on count as enabled
PADDOCK_VERBOSEsame as above (1 / true / yes / on)

limits semantics

KeyDefaultEffect
peekBytes1 MiBupper bound for pdk_peek full reads (head/tail are not limited by this, but an over-long single line is capped by the internal 8 MiB line-buffer limit)
readBytes16 MiBupper bound for pdk_read_bytes base64 reads
sliceBytes64 KiBupper bound for a single pdk_slice slice
grepBytes256 KiBper-file scan limit for pdk_grep (deep: true can bypass; lines over 1 MiB are skipped wholesale)
grepHits200hit-count limit for pdk_grep
findHits1000result-count limit for pdk_find
treeDepth6default depth limit for pdk_tree
treeEntries20000total node limit for pdk_tree (truncated with a truncated marker when exceeded)