{
  "markdown": "# TruePath Office — MCP server (`truepath-office-mcp`)\n\n**Let your AI read and edit Office documents locally. Files never leave your Mac.**\n\nAn [MCP](https://modelcontextprotocol.io) server that lets your AI agent —\n**Claude Desktop, Claude Code, Codex, Cursor, Windsurf**, or any MCP client —\nprocess **Word (DOCX), Excel (XLSX), PowerPoint (PPTX) and PDF** files on your\nmachine: evaluate spreadsheet formulas, read & write workbooks and slide decks,\nextract structured DOCX content, and merge / split / protect PDFs.\n\nBuilt and maintained by [Joy Truepath Pte. Ltd.](https://joytruepath.com/?utm_source=github&utm_medium=referral&utm_campaign=2026-07-office-readme), the\nteam behind the [**TruePath Office**](https://apps.apple.com/app/truepath-office-docs-pdf/id6783243335?mt=12&pt=128906592&ct=2026-07-office-readme)\nMac app (on the Mac App Store). The\nengine here (`TruePathCore`) is the same headless, **Foundation-only, zero-\ndependency** core that ships inside the app — open-sourced for transparency and\nstandalone use.\n\n## Privacy\n\n- 100% local. The server runs on your Mac and makes **no network calls**.\n- No telemetry, no analytics, no phone-home.\n- Works fully offline, forever, with no key or account.\n\n## Requirements\n\n- macOS 13 (Ventura) or newer\n- Swift 6 / Xcode 16 toolchain (to build) — `xcode-select --install` or [swift.org](https://swift.org/install)\n\n## Build\n\n```bash\ngit clone https://github.com/JoyTruepath/truepath-office-mcp.git\ncd truepath-office-mcp\nswift build -c release\n```\n\nThis produces two binaries under `.build/release/`:\n\n- `truepath-office-mcp` — the MCP stdio server\n- `truepath` — a standalone CLI for the same engine\n\nGet the server's absolute path for the config snippets below:\n\n```bash\necho \"$(pwd)/.build/release/truepath-office-mcp\"\n```\n\n## Hook it up\n\nUse the absolute path printed above wherever you see `/path/to/...`.\n\n**Claude Desktop** — `~/Library/Application Support/Claude/claude_desktop_config.json`\n```json\n{ \"mcpServers\": { \"truepath-office\": { \"command\": \"/path/to/truepath-office-mcp/.build/release/truepath-office-mcp\" } } }\n```\n\n**Claude Code**\n```sh\nclaude mcp add truepath-office -- \"/path/to/truepath-office-mcp/.build/release/truepath-office-mcp\"\n```\n\n**Codex** — `~/.codex/config.toml`\n```toml\n[mcp_servers.truepath-office]\ncommand = \"/path/to/truepath-office-mcp/.build/release/truepath-office-mcp\"\n```\n\n**Cursor / Windsurf** — MCP settings (see each IDE's docs for the file location)\n```json\n{ \"mcpServers\": { \"truepath-office\": { \"command\": \"/path/to/truepath-office-mcp/.build/release/truepath-office-mcp\" } } }\n```\n\nRestart the host, then ask your agent something like:\n*\"Use truepath-office to read the body text of ~/Documents/report.docx.\"*\n\n## Tools (20)\n\n| Tool | Description | Key parameters |\n|------|-------------|----------------|\n| `evaluate_formula` | Evaluate a spreadsheet formula | `formula`, `data` (2D array) |\n| `load_workbook` | Load an XLSX file | `path` |\n| `save_workbook` | Save an XLSX file | `path`, `sheets` |\n| `query_spreadsheet` | Query a cell range | `path`, `sheet?`, `range?` |\n| `load_presentation` | Load PPTX slides | `path` |\n| `save_presentation` | Save PPTX slides | `path`, `slides` |\n| `load_word_metadata` | Load DOCX metadata | `path` |\n| `read_word_body` | Read DOCX body text | `path` |\n| `extract_docx_structure` | Parse DOCX into structured JSON (paragraphs / runs / formatting / tables / sections / headers / footers / footnotes) | `path` |\n| `pdf_info` | Page count & text info | `path` |\n| `pdf_merge` | Merge multiple PDFs | `sources`, `output` |\n| `pdf_split` | Split a PDF at a page number | `path`, `page` |\n| `pdf_protect` | Add password protection | `path`, `password` |\n| `detect_document_type` | Detect type from extension | `extension` |\n| `list_word_comments` | List DOCX comments with resolved state + reply threading | `path` |\n| `set_word_comment_resolved` | Resolve / reopen a comment — whole thread by default (Word-compatible `commentsExtended.xml`) | `path`, `comment_id`, `resolved?`, `thread?`, `output_path?` |\n| `reply_word_comment` | Add a threaded reply to a comment | `path`, `comment_id`, `text`, `author?`, `output_path?` |\n| `list_word_revisions` | List tracked changes (insertions / deletions) with author + affected text | `path` |\n| `resolve_word_revisions` | Accept or reject tracked changes — all, or one by id | `path`, `mode`, `revision_id?`, `output_path?` |\n| `open_in_office` | Open a document in the TruePath Office Mac app for visual editing (GUI hand-off) † | `path` |\n\n**†** `open_in_office` hands the file to the **[TruePath Office](https://joytruepath.com/truepath-office) Mac app** over its `truepath-office://` URL scheme, so after reading or editing a document headlessly here you can finish it in the GUI. It **requires the TruePath Office app v1.0.6 or newer** (the version that registers the scheme). If the app isn't installed, the tool returns a link to get it rather than opening anything. macOS only. Every other tool is fully local and needs no app.\n\n## CLI\n\nThe same engine is available as a command-line tool:\n\n```bash\n.build/release/truepath detect xlsx                 # → Spreadsheet (spreadsheet)\n.build/release/truepath formula \"=SUM(A1:A3)\" ...   # evaluate a formula\n.build/release/truepath word --extract report.docx  # structured DOCX JSON\n.build/release/truepath comments report.docx        # list comments (threaded)\n.build/release/truepath comments report.docx --resolve 3    # resolve a thread\n.build/release/truepath revisions report.docx --accept-all  # accept tracked changes\n```\n\nRun `truepath` with no arguments for the full command list.\n\n## Quick test\n\n```bash\nprintf '%s\\n%s\\n' \\\n  '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"t\",\"version\":\"1\"}}}' \\\n  '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{}}' \\\n  | .build/release/truepath-office-mcp 2>/dev/null\n```\n\n## Architecture\n\n```\ntruepath-office-mcp (executable)\n  └─ TruePathMCPLib  (JSON-RPC 2.0 + tool handlers)\n       └─ TruePathCore  (Foundation-only document engine)\n\ntruepath (CLI) ──────────────────────────────────────┘\n\nstdin → JSON-RPC 2.0 → MCPServer → ToolHandlers → TruePathCore → result → stdout\nstderr → diagnostic logs\n```\n\nEach sub-package (`TruePathCore/`, `TruePathMCP/`, `TruePathCLI/`) keeps its own\n`Package.swift` and test suite; `cd <pkg> && swift test` runs them in isolation.\n\n## License\n\n[MIT](LICENSE) © Joy Truepath Pte. Ltd.\n",
  "bytes": 6504,
  "sha": "68fc6fb845bdb8518ce77bab6c23a7f6e5c7deedcc1b3e80fcf28d89754047ba",
  "repo_slug": "joytruepath/truepath-office-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_joytruepath_truepath_office_mc_1e1e0f07/readme"
}