MDZip MCP Server
OfficialThis 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.
MDZip MCP Server
A standalone MCP server that lets AI tools read, search and edit MDZip (.mdz) documents: Markdown plus its images in one file. It runs locally over stdio and needs only Node.js 20 or later. You don't need VS Code, Obsidian or MDZip Studio.
It offers the same tools as the MCP server bundled with the MDZip VS Code extension, plus a tool to find archives, folder limits, a read-only mode and size limits.
Set up a client
Most clients take this configuration:
{
"mcpServers": {
"MDZip": {
"command": "npx",
"args": ["-y", "@mdzip/mcp-server"]
}
}
}To run a build from source instead (npm install, then npm run build), use "command": "node" with "args": ["<path to>/dist/mdzip-mcp-server.js"].
Limit it to folders
Add --root <folder> to restrict the server to files inside that folder. Repeat it for more folders:
"args": ["-y", "@mdzip/mcp-server", "--root", "/Users/me/Documents/notes", "--root", "/Users/me/projects"]With --root:
every archive, and every file copied in with
sourcePath, must be inside one of the folders, or the call fails withPATH_OUTSIDE_ROOTS;relative paths resolve against the first folder;
links are followed before the check, so a link inside a folder can't reach a file outside it;
the server tells the AI tool which folders it may use when it connects.
Without --root, the server can use any file the user running it can reach, and relative paths resolve against the folder the client starts it in.
Read-only
Add --read-only to offer only the tools that read. The four write tools aren't listed, and a call to one fails with READ_ONLY without changing anything.
Size limits
The server loads whole archives into memory, so it refuses, with TOO_LARGE:
an archive larger than 100 MB, or one that unpacks to more than 10 times that (1 GB);
a file copied in with
sourcePath, or content passed inline, larger than 100 MB;a write whose resulting archive would be larger than 100 MB (the archive is left as it was).
Change the limit with --max-file-mb <n>; the unpacked limit stays 10 times it.
Other options: --help, --version.
Related MCP server: wyrd-mcp
Tools
Tool | What it does |
| Find |
| Best first call: the main Markdown document, its images, and a content hash for safe writes |
| Every file in the archive, optionally with hashes |
| Search text files in the archive (plain text or regex) |
| Read one text file |
| Read one image |
| Markdown with its images inlined as data URLs |
| Replace the main document; refused if it changed since it was read |
| Create a new, validated |
| Add or replace any file in an archive |
| Remove a file from an archive |
Write tools check a hash from your last read and refuse to overwrite changes made elsewhere. Archives are written to a temporary file beside them and then swapped in, so a crash or full disk mid-write leaves the old archive whole. Writing through a link updates the file it points to, and on macOS and Linux the archive keeps its permissions. Each tool is marked read or write (readOnlyHint, destructiveHint), so clients can ask before writes.
mdz_find_archives skips hidden folders and node_modules, doesn't follow links, searches 6 levels deep by default, and returns at most 100 archives by default. Without --root it needs a folder.
Development
npm install
npm run typecheck
npm test # builds dist/mdzip-mcp-server.js, then runs the stdio smoke test and the mdzip-mcp-only testsCode shared with mdzip-vscode
src/mdzToolHandlers.ts, src/mdzMcpServer.ts, tests/mcp-smoke.cjs and media/templates/embedded-agent-guide.md are copies of the same files in mdzip-vscode, taken from commit a9081c4 (files last changed in da62294). Until a later refactor makes the extension use this package, a fix to the tools has to be made in both repos. Lines that differ on purpose are marked [mdzip-mcp]. Code that exists only here sits in its own files (src/cli.ts, src/roots.ts, src/discovery.ts, src/limits.ts, src/atomicWrite.ts, src/serverTools.ts and tests/*.test.cjs), and mdzToolHandlers.ts stays as close to the original as possible: serverTools.ts adds mdz_find_archives, --root, --read-only and the size limits around the copied handlers. The one change inside them: the four fs.writeFile calls that save an archive call writeFileAtomic instead. To check for drift:
git -C ../mdzip-vscode diff a9081c4 origin/main -- src/mdzToolHandlers.ts src/mdzMcpServer.ts tests/mcp-smoke.cjs media/templates/embedded-agent-guide.mdSee docs/phase-0-inventory.md for the plan.
License
Apache-2.0. The published server bundles its dependencies; their licenses are in dist/THIRD_PARTY_NOTICES.md.
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
Markdown workspace for AI agents: read, write, organize, and share markdown documents.
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Personal context for every AI: search, read, and write back to your private Markdown library.
Markdown notes in folders, with files, that your AI assistant can read, write and organise.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with a local folder of Markdown notes, supporting listing, reading, searching, creating, and appending to notes with strict security boundaries.5MIT
- AlicenseAqualityCmaintenanceEnables AI clients to read Markdown notes from a single explicitly granted local folder, read-only, with strict containment against access outside that folder.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to read, create, update, delete, and search markdown notes stored locally.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search and read local Markdown notes through MCP tools for file listing, keyword matching, summaries, and section extraction, without uploading files to third-party services. It supports stdio and Streamable HTTP access with API key authentication and SQLite call monitoring.MIT