productivity
Google Docs MCP Integration for Codex
Connect Google Docs to Codex through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Google Docs to Codex
Use KosmoKrator as a local MCP proxy for Codex so coding sessions can reach selected integrations with explicit write policy.
Register kosmo mcp:serve as a local stdio server and choose the integration allowlist. The gateway is local, scoped to this integration, and starts with
--write=deny so Codex can inspect read-capable tools without receiving write access by default.
Google Docs MCP Config for Codex
Keep write access denied or ask-based unless the workspace is trusted.
{
"mcpServers": {
"kosmokrator-google_docs": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=google_docs",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=google_docs --write=deny Why Use KosmoKrator Here
Expose only Google Docs instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Google Docs Tools Visible to Codex
Codex sees stable MCP tool names generated from the Google Docs integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__google_docs__google_docs_add_bullets | google_docs.google_docs_add_bullets | Write | Add bullet or numbered list formatting to a range in a Google Docs document. Default preset is BULLET_DISC_CIRCLE_SQUARE. Use NUMBERED_DECIMAL_ALPHA_ROMAN for numbered lists. |
integration__google_docs__google_docs_create | google_docs.google_docs_create | Read | Create a new blank Google Docs document. Returns the document ID and URL. |
integration__google_docs__google_docs_delete_range | google_docs.google_docs_delete_range | Write | Delete content in a Google Docs document by index range. Use google_docs_get_structure first to find the correct indexes. |
integration__google_docs__google_docs_format_text | google_docs.google_docs_format_text | Read | Apply formatting to a text range in a Google Docs document. Supports bold, italic, underline, strikethrough, fontSize (points), fontFamily, foregroundColor (hex like "#FF0000"), and link (URL). |
integration__google_docs__google_docs_get | google_docs.google_docs_get | Read | Get the content of a Google Docs document. Returns plain text by default, or a structured outline with character indexes when format is "structured". The document ID is the long string in the URL: docs.google.com/document/d/{documentId}/edit |
integration__google_docs__google_docs_get_structure | google_docs.google_docs_get_structure | Read | Get a simplified structure of a Google Docs document showing heading hierarchy, paragraph indexes, and table positions. Essential before performing index-based editing operations. The document ID is the long string in the URL: docs.google.com/document/d/{documentId}/edit |
integration__google_docs__google_docs_insert_image | google_docs.google_docs_insert_image | Read | Insert an image from a URL into a Google Docs document. Supports PNG, JPEG, and GIF. Optionally specify width and height in points. |
integration__google_docs__google_docs_insert_page_break | google_docs.google_docs_insert_page_break | Read | Insert a page break into a Google Docs document. Omit index or set to -1 to insert at end. |
integration__google_docs__google_docs_insert_table | google_docs.google_docs_insert_table | Read | Insert a table into a Google Docs document. Specify rows and columns. Omit index or set to -1 to insert at end. |
integration__google_docs__google_docs_insert_text | google_docs.google_docs_insert_text | Read | Insert text into a Google Docs document at a specific position or at the end. Omit index or set to -1 to append at end. |
integration__google_docs__google_docs_remove_bullets | google_docs.google_docs_remove_bullets | Write | Remove bullet or numbered list formatting from a range in a Google Docs document. |
integration__google_docs__google_docs_replace_all | google_docs.google_docs_replace_all | Read | Find and replace all occurrences of text in a Google Docs document. No indexes needed — this is the simplest way to edit text. |
integration__google_docs__google_docs_search_text | google_docs.google_docs_search_text | Read | Find all occurrences of text in a Google Docs document with their start/end indexes. Useful before format_text or delete_range operations. The document ID is the long string in the URL: docs.google.com/document/d/{documentId}/edit |
integration__google_docs__google_docs_set_heading | google_docs.google_docs_set_heading | Read | Set paragraph style (heading level) for a range in a Google Docs document. Valid styles: HEADING_1 through HEADING_6, TITLE, SUBTITLE, NORMAL_TEXT. |