Obsidian & Google Drive MCP Server
Provides tools for searching and reading documents, spreadsheets, text, and Markdown files across a personal Google Drive, including full-drive search and document reading.
Provides tools for listing, reading, creating, overwriting, and appending Markdown notes in an Obsidian vault, and for adopting manually uploaded files into Obsidian-compatible notes.
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., "@Obsidian & Google Drive MCP Serverappend 'Call mom' to my Daily Notes in Obsidian"
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.
Obsidian & Google Drive MCP Server π
An All-in-One remote Model Context Protocol (MCP) server that connects Google Gemini Web, Claude Desktop, Cursor, and other AI clients directly to your Obsidian Vault and personal Google Drive.
Built with dual-transport support (Streamable HTTP + Legacy SSE), RFC 8414 OAuth 2.0 Discovery, and an intelligent Safe File Adoption Engine.
β¨ Features
π Dual Protocol Support:
Streamable HTTP (MCP 2025 Standard): Direct
POST,GET, andDELETErequests with session management for Gemini Web Connected Apps.Legacy SSE: Server-Sent Events with
/messagestransport for Claude Desktop, Cursor, and older MCP clients.
π OAuth 2.0 Discovery (RFC 8414 & OpenID Connect):
Automated discovery endpoints (
/.well-known/oauth-authorization-server,/.well-known/openid-configuration,/oauth/authorize,/oauth/token).Seamless authentication handshake without custom plugin configuration.
π Dual-Token Architecture:
Remotely-Save Token (
drive.filescope): Reads and writes Obsidian Markdown notes cleanly within your vault directory, ensuring zero sync conflicts with the Obsidian Remotely-Save plugin.Personal Google Drive Token (
drivescope): Searches and reads any document, spreadsheet, or file across your entire personal Google Drive.
π‘οΈ Safe File Adoption Engine:
Automatically identifies files uploaded manually to Google Drive and converts them so the Obsidian Remotely-Save plugin recognizes and syncs them to your devices.
Built-in Mutex locks and streaming memory bounds prevent race conditions and out-of-memory errors.
Related MCP server: Obsidian MCP Server
π οΈ MCP Tools Included
Tool Name | Scope | Description |
| Remotely-Save Vault | Recursively lists all markdown notes and directories inside your Obsidian Vault. |
| Remotely-Save Vault | Reads the full Markdown content of a specific note (e.g., |
| Remotely-Save Vault | Creates, overwrites, or appends ( |
| Dual Scope | Scans and safely adopts manually uploaded Drive files into Obsidian-compatible notes. |
| Full Google Drive | Searches files and documents across your entire Google Drive by query or name. |
| Full Google Drive | Reads Google Docs, Sheets, text, or Markdown files from anywhere on Google Drive. |
π Prerequisites: Getting the Obsidian Remotely-Save Token
To enable bidirectional sync between this MCP server and your Obsidian Vault without sync conflicts, this server integrates directly with the remotely-save plugin:
Install Remotely-Save in Obsidian:
Open Obsidian β Settings β Community plugins.
Search for Remotely Save (GitHub repository) and click Install then Enable.
Authenticate with Google Drive:
In Remotely Save settings, select Google Drive as the sync provider.
Click Authenticate and complete the Google login to grant permission to your vault directory.
Run a manual sync once. Remotely Save will save the token in your vault at
.obsidian/plugins/remotely-save/data.json.
Token Usage Modes:
Local Mode (Zero-Config):
If running this server on the same machine as your Obsidian Vault, the server automatically discovers and decodes the token from~/Documents/<VAULT_NAME>/.obsidian/plugins/remotely-save/data.json. You don't need to copy any tokens!Cloud Mode (Render.com / Docker):
If deploying to the cloud, run this helper command on your local machine to extract your credentials:npm run export:remotely-saveThen copy the output (
OBSIDIAN_CLIENT_ID,OBSIDIAN_CLIENT_SECRET,OBSIDIAN_REFRESH_TOKEN) into your Render Environment Variables or.envfile.
π Quick Start
1. Clone & Install Dependencies
git clone https://github.com/hung301203/obsidian-gdrive-mcp.git
cd obsidian-gdrive-mcp
npm install2. Configure Environment Variables
Copy the sample environment file:
cp .env.example .envEdit .env with your settings:
PORT=3000
MCP_API_KEY=your_secret_mcp_api_key_here
VAULT_FOLDER_NAME=your_obsidian_vault_folder_name # e.g. MyVault or Personal_Notes
# Full Google Drive OAuth credentials (optional for full drive search)
FULL_DRIVE_CLIENT_ID=your_client_id
FULL_DRIVE_CLIENT_SECRET=your_client_secret
FULL_DRIVE_REFRESH_TOKEN=your_refresh_tokenTip: If running locally on a machine with Obsidian installed, the server automatically detects and decodes the Remotely-Save OAuth token from:
~/Documents/<VAULT_NAME>/.obsidian/plugins/remotely-save/data.json
3. Build & Run
# Build TypeScript
npm run build
# Start server
npm startβοΈ Cloud Deployment (Render.com)
Deploy free 24/7 on Render:
Fork or push this repository to your GitHub account.
In Render Dashboard, click New + β Blueprint and connect your repository.
Render will read
render.yamlautomatically.Fill in the environment variables when prompted (
MCP_API_KEY,VAULT_FOLDER_NAME, etc.).Once deployed, your public MCP server URL will be:
https://<your-subdomain>.onrender.com/mcp/<MCP_API_KEY>/sse
π Connecting to AI Clients
1. Google Gemini Web (gemini.google.com)
Open Gemini Web β Settings β Connected Apps (or click + Custom).
Under MCP server URL, enter:
https://<your-subdomain>.onrender.com/mcp/<MCP_API_KEY>/sseLeave Client ID and Client secret blank (the API key is already authenticated in the URL).
Click Connect / Next. Gemini will connect via Streamable HTTP and expose all 6 tools.
2. Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"obsidian-gdrive": {
"url": "https://<your-domain>.onrender.com/mcp/<MCP_API_KEY>/sse"
}
}
}3. Cursor & Windsurf
In Cursor/Windsurf MCP Settings:
Type:
sseURL:
https://<your-domain>.onrender.com/mcp/<MCP_API_KEY>/sse
π³ Docker Deployment
Run with Docker Compose:
docker compose up -d --buildπ§ͺ Testing
The test suite covers unit tests, memory limits, SSE heartbeats, and Streamable HTTP protocol compatibility:
npm testπ License
This project is open-source software licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyβ¦
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Personal context for every AI: search, read, and write back to your private Markdown library.
Markdown notes in folders, with files, that your AI assistant can read, write and organise.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants like Claude and Codex to read, write, search, and traverse Markdown notes stored in a self-hosted knowledge base.5 npmMIT
- AlicenseNot gradedqualityDmaintenanceExposes a folder of Markdown notes (Obsidian vault or plain .md files) to LLM clients like Claude and ChatGPT via Streamable HTTP, with tools for searching, reading, writing, and managing notes directly on the filesystem.1,602 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to file notes into a self-hosted Obsidian vault and retrieve them later through structured and semantic search over plain Markdown.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients like Claude, ChatGPT, and Cursor to search, read, and write back to one cross-model Markdown library of saved articles, videos, PDFs, notes, and conversations. Hosted remote server with OAuth 2.1 or Agent-key auth and read_only, edit, or full permission tiers.MIT