qs-docs MCP
Provides tools for reading and writing Google Docs documents via the Docs API, including retrieving structure/outline/text, exporting to markdown, deleting sections/ranges/table columns, replacing or inserting text, creating documents from markdown, and sending arbitrary batch update requests.
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.
qs-docs MCP
Google Docs をAPIで読み書きする自作stdio MCP。Docs API v1 直叩き(documents.get / batchUpdate)。 claude.ai の Google Drive コネクタは読み取り+メタデータ更新しかできないので、本文の編集口はこちら。
場所
実体:
~/.claude/mcp/qs-docs/(index.js / src/auth.js,docs.js / authorize.js)認証情報:
~/.gmail-mcp-credentials.jsonを流用(GCloud project qs-gmail-mcp・Internal)トークン:
~/.docs-mcp-tokens.db(node:sqlite・account="default")スコープ: documents + drive
Related MCP server: gdocs-mcp-server
セットアップ
GCloud project qs-gmail-mcp で Docs API を有効化(Drive APIは qs-slides で有効化済み)
cd ~/.claude/mcp/qs-docs && node authorize.js→ ブラウザで kazuki.ishizuka@ 承認~/.claude.jsonの mcpServers に qs-docs 登録 → /mcp で reconnect
ツール
読み取り
get_structure(documentId) … ブロックの並び(見出し/段落/表・startIndex/endIndex付き)。編集indexの取得元
get_outline(documentId) … 見出しだけ階層付き
read_text(documentId) … 全文プレーンテキスト(表はタブ区切り)
export_markdown(documentId, outPath?) … markdownで書き出し
書き込み
delete_section(documentId, heading, includeHeading?, dryRun?) … 見出しで節を丸ごと削除
delete_ranges(documentId, ranges[], dryRun?) … index範囲削除(内部で降順整列)
delete_table_column(documentId, tableIndex, columnIndex, dryRun?) … 表の列削除
replace_text(documentId, replacements[]) … 一括置換(replace省略で削除)
insert_text(documentId, index, text)
create_document(title, markdown?, folderId?) … markdown渡しで見出し・表つき新規作成
raw_batch_update(documentId, requests[]) … 任意のDocs APIリクエスト
設計メモ / ハマりどころ
index は編集のたびにズレる。1回の batchUpdate に複数の編集を積むときは必ず後ろ(endIndex大)から当てる。delete_ranges は内部で降順ソート済み
破壊的操作は dryRun を先に通す。消える実テキストが返るので、それを見てから実行する
節の範囲=「その見出し〜次の同レベル以上の見出しの直前」。最後の節は本文末尾-1まで(Docsは最終セグメントの改行を消せない)
API未有効・スコープ不足のエラーは対処法込みに包んである(有効化URLがそのまま出る)
表の列削除は tableCellLocation.tableStartLocation.index を要求する。get_structure が返す表の startIndex がそれ
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth. Reuses the google_sheets…
Provides tools for searching Google Workspace documentation and much more.
Search, read and cite documents. Add, replace and delete files with write access. OAuth required.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables reading and editing Google Docs documents, including creating documents, inserting and deleting content, formatting text, and performing find-and-replace operations through natural language.83 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables reading, editing, and rewriting Google Docs documents with tools that support full content replacement, appending, heading-based insertion, and style-preserving rewrites.-
- AlicenseNot gradedqualityCmaintenanceEnables reading, creating, and editing Google Docs via OAuth. Supports tools for retrieving, inserting, appending, and replacing text in documents.91 npmMIT
- AlicenseAqualityBmaintenanceLets AI apps read and edit Google Docs in plain language, including reading as text or Markdown, making precise range-based edits, styling, working with comments, and exporting to PDF, DOCX, and other formats.27133 npmMIT