mcpdisk
Reads SQLite database files, exposing schema information or rows from a selected table through read_document.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcpdisk
Read-only filesystem search for MCP. Find files by name, search their contents, and read text, PDF, Office, notebook, mail, HTML, SQLite and archive content — without giving the model write access.
Built with Python 3.13, uv and the official
mcp SDK v2. Works over stdio locally and
Streamable HTTP in Docker.
Tools
Tool | Purpose |
| list entries below a path, depth-limited, dirs first |
| find files/directories by glob, with ignore rules |
| search text contents by literal or regex, with context |
| read text with line ranges and encoding fallback |
| read PDF, DOCX, PPTX, XLSX, IPYNB, EML, SRT/VTT, HTML, SQLite, ZIP/TAR |
| metadata plus text/binary/document classification |
Every tool validates paths against the configured roots. There are no write tools; archives are inspected, never extracted to disk.
Related MCP server: paddock
Quick start (Docker)
cp .env.example .env
$EDITOR .env # set MCPDISK_TOKEN and MCPDISK_HOST_PATH
docker compose up -d --build
curl http://127.0.0.1:8000/healthzThe host directory in MCPDISK_HOST_PATH is mounted read-only at /data and
is the only readable root. The endpoint is http://127.0.0.1:8000/mcp and
requires Authorization: Bearer $MCPDISK_TOKEN.
Smoke test (builds, starts, checks health, auth and the MCP handshake):
./scripts/smoke.shQuick start (local, stdio)
uv sync
MCPDISK_ROOTS=/home/panos/prj uv run python -m mcpdiskstdio is the default transport. The process speaks MCP on stdin/stdout.
Local over HTTP
MCPDISK_ROOTS=/home/panos/prj \
MCP_TRANSPORT=http MCP_AUTH_TOKEN=change-me MCP_HTTP_PORT=8000 \
uv run python -m mcpdiskWithout MCP_AUTH_TOKEN, binding to a non-loopback address is refused at
startup.
Configuration
Variable | Default | Meaning |
| current directory |
|
|
|
|
|
| HTTP bind address |
|
| HTTP port |
| – | bearer token; required for non-loopback binds |
| – | public URL, added to the Host/Origin allowlist |
|
| default result limit |
|
| per-file limit for text search |
|
| default character budget per document call |
|
| per-tool timeout |
|
| LRU size for PDF/Office extraction |
Security model
Allowlist only. Every path is resolved with
realpathand must stay insideMCPDISK_ROOTS..., absolute paths outside and symlinked directories cannot escape.No write operations. The server never creates, modifies or deletes files.
Symlinks are reported, not followed. Reading a symlink that points outside the roots is rejected.
Read-only containers. Compose mounts the host directory
:ro, runs the container as UID 10001, uses a read-only root filesystem and drops privilege escalation.HTTP auth.
/mcprequires a bearer token compared in constant time;/healthzis open for health checks. DNS-rebinding protection validates Host and Origin.Archives. Entry names are checked for zip-slip, entries are capped at 10 MB and compression ratios above 100:1 are refused. Nothing is extracted to disk.
Bounded work. Depth, entry counts, match counts, file sizes and run time are all capped; regexes have a per-line timeout.
Client setup
OpenCode (V2)
{
"mcp": {
"servers": {
"mcpdisk": {
"type": "remote",
"url": "http://127.0.0.1:8000/mcp",
"oauth": false,
"headers": { "Authorization": "Bearer {env:MCPDISK_TOKEN}" }
}
}
}
}Claude Desktop (stdio)
{
"mcpServers": {
"mcpdisk": {
"command": "/home/panos/prj/mcpdisk/.venv/bin/python",
"args": ["-m", "mcpdisk"],
"env": { "MCPDISK_ROOTS": "/home/panos/prj" }
}
}
}Tool reference
list_directory
{"path": "src", "depth": 2, "include_hidden": false, "limit": 500}depth 1–3; directories sort first. Symlinks appear with symlink_target.
search_files
{"pattern": "*.py", "max_depth": 8, "limit": 200, "sort": "name"}Gitignore-style patterns relative to the search root: *.py matches at any
depth, /main.py only at the top, src/**/*.toml below src. VCS metadata,
caches, virtualenvs and build output are always pruned. Extra ignore
patterns are supported.
search_content
{"pattern": "TODO", "file_glob": "*.py", "context_lines": 1, "max_results": 100}Literal by default; set is_regex for a regular expression. Binary and
oversized files are skipped and counted. With include_documents: true PDFs
and Office files are searched too; those matches carry a page and a section
label.
read_file
{"path": "README.md", "start_line": 1, "end_line": 40}Returns numbered lines. Binary files and PDFs are rejected with a pointer to
read_document. Non-UTF-8 files fall back to cp1252.
read_document
{"path": "report.pdf", "sections": "1-5"}
{"path": "deck.pptx", "include_notes": true}
{"path": "book.xlsx", "sheet": "Sales", "rows": "1-100"}
{"path": "notebook.ipynb", "include_outputs": true}
{"path": "store.db", "table": "items"}
{"path": "bundle.zip", "entry": "notes.txt"}Format | Sections |
pages, | |
DOCX | blocks of 40 paragraphs/tables |
PPTX | slides, optional speaker notes |
XLSX | sheets; without |
IPYNB | cells, optional outputs |
EML | headers, body parts, attachment list |
SRT/VTT | subtitle blocks of 100 cues |
HTML | text lines in chunks of 200 |
SQLite | schema or one table ( |
ZIP/TAR | entry listing or a single text entry |
Scanned PDFs without a text layer are reported instead of returning garbage; OCR is not supported.
stat_path
{"path": "data.bin"}Returns kind, size, mtime, mode, symlink target, content
(text/binary/empty), a format subkind and readable. Run it before
read_file when unsure.
Limits
max. 500 directory entries per listing, 2000 matches per file search
max. 20 matches per file, 1000 matches per content search
max. 10 MB per file for content search, 50 MB hard cap for reads
max. 200 pages/blocks per document call, 500 rows × 40 columns per sheet
max. 50 documents per search call, 100 000 characters per extraction
15 s default timeout per tool call
50 ms regex timeout per line
Development
uv sync
uv run pytest
uv run ruff check .
uv run ruff format --check .Inspect the server interactively with the MCP Inspector:
MCPDISK_ROOTS=/home/panos/prj npx @modelcontextprotocol/inspector uv run python -m mcpdiskTroubleshooting
Symptom | Cause / fix |
| missing or wrong |
| Host/Origin not in the allowlist; set |
| path is not below |
| scanned PDF; OCR is not supported |
search returns nothing | check ignore rules, hidden files and |
| narrow the path/pattern or raise |
| only tar archives (including |
permission denied on | UID 10001 needs read access to the mounted files |
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
- ORANO MCP ServerDeprecatedio.github.infotik
Read-only MCP server exposing a user ORANO library to their own AI agent.
Political Comms documentation MCP server: search docs, query the docs filesystem. No auth.
Read-only MCP server over the developer docs for the portfolio's JSON API, MCP, A2A and NLWeb.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables safe, read-only browsing of allowlisted local directories through MCP, providing tools to list roots, read files, and search text.MIT
- AlicenseNot gradedqualityBmaintenanceA local filesystem MCP server providing constrained file operations (read/write, directory management, search, metadata) within configurable directories, with read-only mode and zero runtime dependencies.4 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients to browse and read files, folders, photo albums, and metadata in the user's cloud drive through a read-only stdio server, including folder listing, full-text search, glob-based finding, file reading, item stats, and storage quota reporting.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to search local files by name, path, metadata, and literal text over MCP on Windows, Linux, and macOS, while keeping searches within explicitly configured directories and running locally over stdio.71MIT