paddock
面向 agent 的本地文件系统工具集:读 / 写 / 检索 / 目录操作,全部被约束在可配置的「围场」目录内,以 MCP stdio server 形式运行,零运行时依赖,可被 dsh 等插件化 harness 加载
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JohnXu22786/fs-mcp说明文档
阅读完整 README ↗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
| Variable | Description |
|---|---|
PADDOCK_CONFIG | config file path (takes precedence over the default path) |
PADDOCK_ZONES | paddock directories: a JSON array string (["/a","/b"]) or a single path |
PADDOCK_READ_ONLY | 1 / true / yes / on count as enabled |
PADDOCK_VERBOSE | same as above (1 / true / yes / on) |
limits semantics
| Key | Default | Effect |
|---|---|---|
peekBytes | 1 MiB | upper 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) |
readBytes | 16 MiB | upper bound for pdk_read_bytes base64 reads |
sliceBytes | 64 KiB | upper bound for a single pdk_slice slice |
grepBytes | 256 KiB | per-file scan limit for pdk_grep (deep: true can bypass; lines over 1 MiB are skipped wholesale) |
grepHits | 200 | hit-count limit for pdk_grep |
findHits | 1000 | result-count limit for pdk_find |
treeDepth | 6 | default depth limit for pdk_tree |
treeEntries | 20000 | total node limit for pdk_tree (truncated with a truncated marker when exceeded) |