Spring Boot app with Google Drive API integration for file management and PDF downloads
McpGoogleDrive is a Spring Boot application designed to integrate seamlessly with Model Context Protocol (MCP) clients, providing advanced functionalities to interact with Google Drive as a data source or tool. This server acts as an intermediary between the MCP client and the Google Drive API, enabling AI applications like Claude Desktop, Continue, and Cursor to utilize file operations through a standardized protocol. By leveraging MCP, McpGoogleDrive enhances the capabilities of these AI tools by offering robust access control, seamless file management, and efficient integration workflows.
McpGoogleDrive features a rich set of RESTful API endpoints that are directly aligned with Model Context Protocol (MCP) for enhanced integration with AI applications. These APIs enable MCP clients to list files, retrieve details, search files by name, create folders, and download files as PDFs. This comprehensive feature set ensures that AI applications can perform precise and versatile operations within the Google Drive environment.
GET /api/drive/files
endpoint, MCP clients can easily list all or a subset of files on Google Drive.GET /api/drive/files/{fileId}
endpoint.GET /api/drive/search
endpoint to search for files by name, enhancing data retrieval accuracy.POST /api/drive/folders
endpoint to dynamically create folders within Google Drive.GET /api/drive/files/{fileId}/pdf
, streamlining document management processes.McpGoogleDrive leverages Model Context Protocol (MCP) by implementing a rigorous backend structure that adheres to MCP standards. This ensures seamless communication between the AI application and McpGoogleDrive, allowing for efficient data access and manipulation. The protocol flow diagram illustrates this interaction clearly:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[McpGoogleDrive Server]
C --> D[Data Source/Google Drive]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The McpGoogleDrive server is compatible with MCP clients such as Claude Desktop, Continue, and Cursor, providing a unified protocol for various AI tools. The compatibility matrix outlines the support status for each client:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The architecture of McpGoogleDrive is designed to support Model Context Protocol (MCP) endpoints, ensuring robust and secure interaction between the AI application and Google Drive. The server leverages Spring Boot for backend development, making it easy to integrate with existing systems.
To set up McpGoogleDrive, follow these steps:
git clone https://github.com/achrafhardizi/McpGoogleDrive.git
cd McpGoogleDrive
./gradlew build
AI applications can use McpGoogleDrive to retrieve data for training purposes, ensuring that models are fed with the latest and most relevant information. For example, a machine learning model might need to periodically update its dataset by accessing files on Google Drive.
curl -X GET "http://localhost:8080/api/drive/files?pageSize=5"
This retrieves five recent files from Google Drive, which can then be used for training the machine learning model.
Conversational agents can utilize McpGoogleDrive to manage documents and share information with users. For instance, a conversational agent might need to create folders for different topics or download specific PDFs as response attachments.
curl -X POST "http://localhost:8080/api/drive/folders?folderName=NewFolder"
This creates a folder named NewFolder
on Google Drive, which can be used to organize documents and share them with users.
Integration between McpGoogleDrive and MCP clients is straightforward. MCP clients can easily connect through the provided API endpoints, leveraging the standardized protocol for seamless data exchange.
For instance, a user interface (UI) developed using Cursor can integrate with McpGoogleDrive to perform file operations such as listing files, creating folders, or downloading documents:
curl -X GET "http://localhost:8080/api/drive/files?pageSize=5"
The performance and compatibility of McpGoogleDrive with different MCP clients are outlined below. This ensures that developers can expect consistent performance across various AI applications.
Client | Performance (1-10) | Stability (1-10) | API Documentation |
---|---|---|---|
Claude Desktop | 9 | 9 | Excellent |
Continue | 8 | 8 | Good |
Cursor | 7 | 6 | Average |
McpGoogleDrive requires configuration to securely connect with the Google Drive API. The application.properties
file contains relevant settings for establishing this connection.
google.service.account.key=credentials/service-account-key.json
This property needs to direct to the service account credentials JSON file, ensuring secure access.
Yes, McpGoogleDrive can be deployed on various environments such as production, development, or test. Proper configuration adjustments are required for each environment to ensure stability and performance.
While the current implementation focuses on Google Drive, McpGoogleDrive can be extended to support other cloud storage services. Additional adapters or plugins would need to be developed for seamless integration.
McpGoogleDrive honors Google Drive's permission settings when performing operations. Administrators must configure the necessary access controls within Google Drive to ensure data security and privacy.
Currently, McpGoogleDrive relies on manual API calls or scheduled jobs for updating files. Automating this process would require additional development to monitor and synchronize files with external sources.
McpGoogleDrive supports downloading various file formats as PDFs. The specific formats include but are not limited to Word documents, Excel spreadsheets, text files, etc. Supported file types depend on Google Drive's capabilities and may expand in future updates.
Developers interested in contributing to McpGoogleDrive can leverage the existing codebase for expansion or improvement. Key steps include:
For more information about Model Context Protocol (MCP) and related resources, visit the official MCP documentation and community forums:
McpGoogleDrive is part of a growing ecosystem that aims to standardize AI application integrations, making data access and manipulation more accessible for developers building advanced AI tools.
By integrating McpGoogleDrive into your project, you can enhance the capabilities of your AI applications through seamless interactions with Google Drive.
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants
Analyze search intent with MCP API for SEO insights and keyword categorization
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Connects n8n workflows to MCP servers for AI tool integration and data access
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases