Docswrite MCP Server
Docswrite created the first in the world MCP to write to Google Docs and turn the google docs into a perfectly formatted post on WordPress.
This server provides tools for working with Google Docs, Google Drive, and WordPress through Docswrite.
Tools
1. Google Docs & Drive Tools
google-docs-create
Creates a new Google Docs document.
title
: The title of the new documentcontent
: The content to write to the document
google-docs-update
Updates an existing Google Docs document.
documentId
: The ID of the document to updatecontent
: The content to write to the documentreplaceAll
(optional): Whether to replace all content (true) or append (false)
google-docs-search
Searches for Google Docs documents using Google Drive API.
query
: The search query to find documents- Returns: List of documents with ID, name, creation time, and last modified time
google-docs-delete
Deletes a Google Docs document using Google Drive API.
documentId
: The ID of the document to delete
2. Docswrite Tools
docswrite-publish
Publishes content from Google Docs to WordPress.
google_docs_url
(required): URL of the Google Docs documenttitle
(optional): Title of the blog postslug
(optional): URL slug for the posttags
(optional): Comma-separated list of tagscategories
(optional): Comma-separated list of categoriesstate
(optional): Post state (draft/publish)author
(optional): Author namedate
(optional): Publication dateexcerpt
(optional): Post excerptpost_type
(optional): Post type (post/page)featured_image_url
(optional): URL of the featured imagefeatured_image_alt_text
(optional): Alt text for featured imagefeatured_image_caption
(optional): Caption for featured imageexport_settings
(optional): Object containing:compress_images
: Booleandemote_headings
: Booleanconvert_to_webp
: Booleanfirst_image_as_featured_image
: Booleanadd_no_follow_to_external_links
: Booleanbold_as_strong
: Booleanwp_content_editor
: String
newspack_settings
(optional): Object containing:newspack_article_summary
: Stringnewspack_article_summary_title
: Stringnewspack_post_subtitle
: String
yoast_settings
(optional): Object containing:yoast_focuskw
: Stringyoast_metadesc
: Stringyoast_title
: String
rankmath_settings
(optional): Object containing:rank_math_focus_keyword
: String
docswrite-job-status
Checks the status of a Docswrite publishing job.
jobId
: The ID of the job to checkqueueType
(optional): The type of queue (default: "post")
Project Structure
Source Files
src/index.ts
: Main server implementation and tool definitions- Initializes MCP server
- Defines and registers all available tools
- Handles command-line arguments and environment variables
src/auth.ts
: Google OAuth2 authentication handling- Manages OAuth2 flow for Google APIs
- Handles token storage and refresh
- Provides authorization for Google Docs and Drive APIs
src/google-docs.ts
: Google Docs and Drive API operations- Document creation and manipulation
- Content updating and formatting
- Document search and deletion
- Error handling and response formatting
src/docswrite-request.ts
: Docswrite API integration- Handles requests to Docswrite service
- Manages WordPress publishing queue
- Job status checking and monitoring
src/oauth-server.ts
: OAuth callback server implementation- Handles OAuth2 callback from Google
- Manages token exchange
- Provides success/failure responses
src/config.ts
: Configuration management- Environment variables
- API endpoints
- Default settings
src/utils.ts
: Utility functions- Helper methods
- Common operations
- Shared types and interfaces
Setup
- Create a Google Cloud Project and enable:
- Google Docs API
- Google Drive API
- Configure OAuth2 credentials:
- Create OAuth2 credentials in Google Cloud Console
- Download and save as
credentials.json
in project root - Set redirect URI to
http://localhost:3000/oauth2callback
- Install dependencies:
- Build the project:
Usage
Run the server with your Docswrite token:
Example Flows
1. Create and Publish Flow
2. Search and Update Flow
3. Document Management Flow
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Generated content to Google Docs to WordPress while preserving formatting and structure for a streamlined content workflow.
Related MCP Servers
- AsecurityAlicenseAqualityMCP server for seamless document format conversion using Pandoc, supporting Markdown, HTML, PDF, DOCX (.docx), csv and more.Last updated -1212PythonMIT License
- AsecurityAlicenseAqualityProvides comprehensive document processing, including reading, converting, and manipulating various document formats with advanced text and HTML processing capabilities.Last updated -164611TypeScriptMIT License
- -securityFlicense-qualityA powerful Word document processing service based on FastMCP, enabling AI assistants to create, edit, and manage docx files with full formatting support. Preserves original styles when editing content.Last updated -12Python
- -security-license-qualityIntegrates with Google Drive to enable listing, reading, and searching over files, with automatic export of Google Workspace documents to appropriate formats.Last updated -1,971JavaScript