doc77
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@doc77suggest a folder structure for my documents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Doc77 — Local Document Preview & Management · Markdown · PDF · MCP Server · LAN Sharing
Document viewer | Document manager | Markdown reader | PDF viewer | Code viewer | Knowledge base | Local document server
Open-source · Free · Cross-platform · Mobile-ready · Zero-config · 📦 Desktop app
Doc77 is a lightweight local document previewer, MCP file-operation bridge, and AI conversation-driven document management agent. Your browser is the workbench — supports Windows / macOS / Linux / WSL. Also available as an Electron desktop app for non-technical users, double-click to use. Can be safely exposed to the internet with password protection.
In read-only mode it's a multi-project showcase; in write mode it's an intelligent steward that asks for your approval — every file operation is confirmed by you before execution, backed by built-in security review, atomic transaction rollback, and cross-drive fault tolerance.
Preview
Dashboard | Document Preview |
|
|
Login | Mobile |
|
|
Related MCP server: en-quire
Use Cases
Scenario | Description |
📚 Personal Knowledge Base | Point to a local folder and browse it like a knowledge base. A lightweight alternative to Obsidian / Notion, with your files always under your control |
📝 Technical Writing | Write Markdown with instant preview. TTS read-back for proofing. MDX and Mermaid diagram support — a documentation engineer's tool |
🎓 Academic Research | Manage papers (PDF) + notes (MD) + experimental code in one project directory. AI summarization for quick literature scanning |
🏠 NAS / Home Server | Run doc77 on your NAS, access your document library from any device in the house. Password-protected. Unified entry for photos, docs, e-books |
💼 Remote Work | VPN into your office computer and browse documents from a browser — no remote desktop needed. Bandwidth-efficient, memory-light |
🔧 Ops Troubleshooting | View logs and config files on a server. With MCP, let AI assist in diagnostics. The approval mechanism ensures no accidental damage |
🎤 Technical Interviews | Share a code or design doc link with candidates in one click. Their browser renders it directly — no screen sharing required |
🐳 Docker Deployment | Mount a document volume and start the container. CI/CD artifact docs become instantly previewable |
📡 LAN Meeting Sharing | One person runs |
📱 Mobile Access | Phone/tablet adaptive UI — browse project docs during commutes or at client sites. Responsive design, consistent experience across desktop and mobile |
🔄 Win+WSL Hybrid | Write code in WSL, work in Windows. Skip SSH or terminal |
🤖 Agent / MCP Development | Built-in MCP Server (stdio + HTTP) with 8 tools exposing filesystem capabilities. Debug agents while watching file changes and approving write operations from the Web UI |
🪟 Windows Productivity | Completely free document preview tool. Markdown, PDF, Office, code highlighting all in one place |
🗄️ Multi-project Management | Register once, remember forever. Dashboard for unified switching. Favorites, recent files, global search, directory tree — browse local docs like an IDE |
🔒 Secure Team Sharing | One-click LAN sharing + password protection. Documents stay on your device, never land on anyone else's. Approval workflow keeps write operations under control |
⚡ Zero-config Document Portal |
|
Current Focus
Doc77 prioritizes preview experience, complemented by lightweight editing. Text files can be quickly edited and saved in-page (with external change conflict detection); heavy editing launches VS Code or your system editor with one click. Current focus:
🚀 Performance — Instant startup, smooth with large files
🐛 Stability — Multi-platform compatibility, eliminate experience bugs
✨ Preview Quality — Format support, reading tools, AI assistance pushed to the limit
Capabilities
Module | Details |
Multi-format Preview | Markdown (GFM/KaTeX/Mermaid/PlantUML/Footnotes/Admonitions), PDF, Word/Excel, 44+ code languages with syntax highlighting, image Lightbox, JS/Python sandbox execution |
Reading Tools | TTS read-aloud, auto-scroll, reading progress, in-doc search (Ctrl+F), global search, outline panel, bookmarks, recent files |
Multi-tab & Editing | Multiple document tabs (LRU render cache), drag-and-drop temp file preview, lightweight text editing (external change conflict detection), one-click VS Code launch |
AI Assistant | Natural language conversation (SSE streaming), doc summarization, smart categorization, batch operation planning. Supports DeepSeek/OpenAI/Qwen/Kimi/Doubao/GLM and custom endpoints |
MCP & Approval | MCP Server (stdio + HTTP) with 8 tools exposing filesystem; all write operations queued for approval, CLI and Web dual-channel |
Transaction Rollback | Pre-flight check + Shadow backup + reverse-order rollback. Failed batch operations auto-recover, orphaned shadow GC |
Export & Share | Self-contained HTML export (inline styles and images, preserves light/dark theme), LAN read-only sharing links (with TTL, QR code, one-click revoke) |
Offline Translation | Opus-MT ONNX models fully local (en↔zh), auto-language detection, translate-on-select + long-doc segment translation, no data leaves your machine |
Multilingual UI | English / 简体中文 built-in, auto-detects browser and system language, extensible via |
Project Import | Obsidian vault ( |
Mobile Companion | Scan QR code from Dashboard to open mobile view, mDNS LAN discovery, adaptive mobile UI |
Electron Desktop | Windows / macOS / Linux one-click install, native file dialogs, system tray, vendor resources built-in (default port 28888) |
Modular Plugins | AI / MCP / Translation optional installation ( |
Security | Path sandboxing, sensitive file filtering, envelope encryption (DEK), 10 one-time recovery codes, brute-force protection, session management, audit logging, password-protected external exposure |
Offline-ready |
|
Installation
Desktop (Recommended for non-technical users)
Platform | Download |
Windows | |
macOS | |
Linux |
Double-click to install, desktop shortcut launches the app. Native file dialog to select folders, ready out of the box.
CLI (Recommended for developers)
npm install -g idoc77 # Install
doc77 register ./my-docs --name "My Docs" # Register a project
doc77 start # Start (127.0.0.1:27777)
doc77 start --bind 0.0.0.0 # Or allow LAN accessCommand Reference
Core Commands
Command | Description |
| Start Web Dashboard (default port 27777; desktop 28888) |
| Register a project directory |
| List all registered projects |
| Remove a project by ID (does not delete source files) |
| Update project name or path |
| Check service status |
Configuration
Command | Description |
| Set a config value |
| Get a config value |
| List all config |
| Set an access password (first time) |
| Change access password |
| Reset password using recovery code |
| Force reset (clears encrypted config) |
| Regenerate recovery codes |
Common config keys:
Key | Description | Default |
| Enable AI assistant |
|
| AI API token | — |
| AI API base URL |
|
| Model name |
|
| Default editor |
|
| UI/AI/CLI global language (empty = auto-detect) | — |
| Enable offline translation |
|
| Mirror download for models (hf-mirror.com) |
|
| Share link TTL (hours) |
|
MCP Service
Command | Description |
| Start MCP service (stdio or HTTP transport) |
Task Approval
Command | Description |
| List pending approval tasks |
| Approve a task |
| Reject a task |
| Batch approve all |
| Batch reject all |
Lock Management
Command | Description |
| View active project locks |
| Manually release a project lock |
Sync (Git / WebDAV / S3 / Local)
Doc77 can sync a project folder with a remote source: Git remote, WebDAV (NAS), S3-compatible object storage (MinIO / R2 / B2), or another local directory. Sync is bidirectional, supports automatic scheduling, conflict detection with three-way merge + AI assistance, and optional end-to-end encryption.
CLI
# Add a sync configuration (config JSON depends on adapter type)
doc77 sync add <project> <adapter-type> <config-json>
# List / run / remove / inspect configurations
doc77 sync list
doc77 sync run <project>
doc77 sync remove <project>
doc77 sync status <project>Adapter config examples:
// Git — remoteUrl + auth method
{ "type": "git", "remoteUrl": "git@github.com:user/docs.git",
"branch": "main", "remoteName": "origin", "authMethod": "ssh",
"commitPrefix": "[doc77-sync]", "autoCommit": true, "pullStrategy": "merge" }
// WebDAV (NAS)
{ "type": "webdav", "endpoint": "https://nas.example.com/dav",
"username": "user", "password": "secret", "remotePath": "/doc77",
"ignorePatterns": ["*.tmp"] }
// S3-compatible (MinIO / R2 / B2)
{ "type": "s3", "endpoint": "https://s3.example.com", "region": "auto",
"bucket": "my-docs", "prefix": "notes", "accessKeyId": "AKIA...",
"secretAccessKey": "...", "ignorePatterns": [] }
// Local mirror directory
{ "type": "local", "targetPath": "/mnt/backup/docs" }For HTTPS / token auth use "authMethod": "https" (or "token") and pass the
token in "token". SSH auth relies on your local ~/.ssh keys.
Web UI
Open Settings → Sync for a project: pick the adapter type, paste the config JSON, choose direction and sync interval, then Test Connection before saving. The panel shows sync state, history and conflicts; conflicts open a three-way merge view with optional AI-suggested resolution.
Note: changes synced in from Git / WebDAV are detected by the built-in file watcher, so the file tree refreshes automatically without a manual reload.
Offline Support
# Download all CDN resources locally (~16MB)
doc77 vendor-install
# Skip Pyodide (Python runtime), save ~12MB
doc77 vendor-install --no-pyodide
# Download offline translation models (en↔zh, ~80MB each)
doc77 vendor-install --translate en-zh
doc77 vendor-install --translate zh-enResources are cached in ~/.doc77/vendor/ and auto-detected on restart. Re-running skips already-downloaded files.
Supported Formats
Format | Extensions | Read Mode |
Markdown |
| ✅ TTS/Search/Outline/Progress |
Mermaid |
| ✅ |
Code (~44 langs) |
| ✅ Syntax highlighting |
| ✅ Browser-native + fullscreen | |
Images (9 types) |
| ✅ Lightbox zoom/nav |
Word |
| ✅ mammoth.js rendering |
Excel |
| ✅ SheetJS + tab switching |
JavaScript |
| ✅ Sandbox execution |
Python |
| ✅ Pyodide WASM execution |
Unsupported |
| ❌ File info card + show in folder |
Markdown Features
Feature | Example | Status |
Headers / Bold / Italic / Strikethrough |
| ✅ GFM |
Lists (nested / ordered / unordered) |
| ✅ GFM |
Task lists |
| ✅ GFM |
Tables (with alignment) | ` | :--- |
Blockquotes / Horizontal rules |
| ✅ GFM |
Images / Links / Image links |
| ✅ Local paths auto-rewrite to API |
Code blocks + syntax highlighting |
| ✅ highlight.js (44+ languages) |
Copy-to-clipboard button | hover top-right | ✅ |
Math (inline / block) |
| ✅ KaTeX |
Mermaid diagrams |
| ✅ Flow / Sequence / Gantt / Class / State / Pie |
PlantUML diagrams |
| ✅ kroki.io (offline falls back to source) |
Emoji shortcuts |
| ✅ |
Highlight marks |
| ✅ |
Footnotes |
| ✅ |
GitHub admonitions |
| ✅ |
Collapsible sections |
| ✅ Native HTML |
Heading anchors |
| ✅ |
Raw HTML |
| ✅ Browser-native |
Definition lists |
| ❌ |
Auto TOC |
| ⚠️ Outline panel replaces this |
Offline Availability
Doc77 uses a vendor system for CDN → local fallback. doc77 vendor-install downloads resources to ~/.doc77/vendor/. The Electron desktop build bundles vendor resources at build time (extraResources).
Feature | Library | CLI | Electron Built-in | Offline Fallback |
Tailwind CSS |
| ✅ | ✅ | 3s timeout → unstyled |
highlight.js |
| ✅ | ✅ | Code blocks lose highlighting |
Mermaid |
| ✅ | ✅ | Shows source |
KaTeX |
| ✅ | ✅ | Shows LaTeX source |
XLSX |
| ✅ | ✅ | .xlsx not previewable |
DOCX |
| ✅ | ✅ | .docx not previewable |
Python |
| ⚠️ ~12MB extra | ❌ Not bundled | .py not executable |
PlantUML | kroki.io | ❌ Needs internet | ❌ Needs internet | Shows source |
One-Command Restart
./scripts/restart.sh # Default port 27777
./scripts/restart.sh --port 8080 # Custom portTo bind
0.0.0.0for external access, usedoc77 start --bind 0.0.0.0(a password will be required).
Design Philosophy
Documents stay where they are — never copy or upload user files, read-only access to local paths
Preview ≠ Edit — let professional tools (VS Code / Typora) handle editing, let Doc77 handle preview
Register once, manage forever — register a project directory once, it's remembered permanently
Lightweight first — single process, SQLite, zero-config, out of the box
Conversation-driven — natural language interaction, AI-assisted planning, human final decision
Documentation
Document | Description |
Complete design document | |
Tech stack verification & architecture review | |
40 tasks, 9 phases detailed plan | |
Real-time development progress | |
Version history |
Tech Stack
Component | Choice |
Runtime | Node.js >= 22.x |
Language | TypeScript ^5.8 |
Web Framework | Express 5.x |
Database | SQLite (sql.js) |
MCP Protocol | @modelcontextprotocol/sdk |
Frontend | Vanilla HTML + CSS + JS (marked, Mermaid, highlight.js) + browser-native PDF / HTML preview |
Build | tsup + pnpm workspaces |
Test | Vitest |
Project Structure
doc77/
├── packages/
│ ├── core/ # @doc77/core Preview engine + FS abstraction + Express Server
│ ├── mcp/ # @doc77/mcp MCP service layer + security guard + transaction system
│ ├── ai/ # @doc77/ai AI provider + Agent core + Chat API
│ ├── cli/ # doc77 CLI Command-line entry
│ ├── electron/ # Desktop shell (tray / native dialogs / port 28888)
│ └── doc77/ # idoc77 meta-package for npm publishing
├── docs/
│ ├── design/ # Design docs
│ ├── analysis/ # Analysis reports
│ └── planning/ # Implementation planning
├── scripts/ # Tool scripts
├── CLAUDE.md # Project conventions
└── README.md # This fileContributing
Contributions are welcome! Here is the full local setup and submission flow.
Prerequisites
Tool | Version |
Node.js | >= 22.x |
pnpm | >= 9.x (install with |
Git | any recent version |
Local Setup
git clone https://github.com/xyy277/doc77.git
cd doc77
pnpm install # install dependencies (builds each package's dist on first run)
pnpm build # build all packagesCommon Scripts
Command | Description |
| Start the |
| Build the CLI and its deps, then start the full app ( |
| Same as |
| Start Electron desktop dev mode |
| Build all packages and sync version numbers |
| Run the Vitest test suite |
| ESLint check |
| Prettier format check |
| Verify zh-CN / en-US i18n key consistency |
Branching & Submission Flow
The main branch is protected by GitHub Rulesets:
❌ Direct push to
mainis forbidden❌ Force push / deletion of
mainis forbidden✅ Changes must be merged via Pull Request
✅ Before merge, the following CI checks must all pass:
Lint & Format Check,Build,Test (Node 22 on ubuntu/macos/windows-latest)✅ Squash merge is recommended to keep history linear
Recommended workflow:
Branch off
main:git checkout -b feat/your-featureSelf-test locally:
pnpm lint && pnpm format:check && pnpm testCommit (Conventional Commits recommended, e.g.
fix(web): ...,feat(core): ...)Push the branch:
git push -u origin feat/your-featureOpen a PR into
mainon GitHub, wait for CI to go green, then merge
Code Conventions
See CLAUDE.md for detailed conventions
TypeScript strict mode; ensure
pnpm buildpasses before committingi18n strings must be updated in both
zh-CN.jsonanden-US.json; runpnpm check:i18nbefore committing
Privacy & Security
All data stored locally in
~/.doc77/AI tokens encrypted in SQLite
No file content sent to external servers (unless you manually enable AI features)
Password-protected access supported
License
Doc77 is released under the MIT License — free to use, modify, and distribute. See the LICENSE file for the full text.
This server cannot be deployed
Maintenance
Related MCP Connectors
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
AI document editing for agents: draft, edit, export .docx/PDF. 37 MCP tools; agent self-signup.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Egnyte's remote MCP server for secure AI access, search, upload and file management in your account.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server that enables AI agents to read, edit, and manage SharePoint documents with proper checkout, check-in, version history, and audit trails.21MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for structured document management of markdown and YAML files, with RBAC, git-based approval workflows, and semantic search, enabling agents to read, edit, and maintain documents under governance.MIT
- FlicenseNot gradedqualityBmaintenanceA local MCP server providing read-only access to documents like Word, PDF, Excel, and images, with file listing, reading, and metadata extraction.1-
- AlicenseNot gradedqualityBmaintenanceMCP server that allows AI agents to read, search, summarize, and answer questions about local PDF, DOCX, XLSX, and TXT files through five tools.MIT



