Skip to main content
Glama
ashrafur02-sys

drive-file-browser-mcp

Drive File Browser MCP

A Model Context Protocol (MCP) server that lets AI assistants — Claude Desktop, Claude Code, Cursor, opencode, or any MCP client — browse, search, and read files from a Google Drive folder.

Runs in two modes:

Tools Provided

Tool

Description

list_files

List files and subfolders in a Drive folder

search_files

Search files by name (case-insensitive substring)

get_file_info

Get metadata for a specific file (name, type, size, timestamps)

read_file

Read file content — Google Docs export as markdown, Sheets as CSV, Slides as plain text; plain text files returned directly; binary files return a link

Related MCP server: mcp-google-gdrive

Remote Deployment (Vercel)

The server is live at:

https://drive-file-browser-mcp.vercel.app/api/mcp

It uses the stateless Streamable HTTP transport, so it works with any MCP client that supports remote HTTP servers. The endpoint is protected with a Bearer API key.

Connect a client

Claude Desktop / Claude Code (claude_desktop_config.json or .mcp.json):

{
  "mcpServers": {
    "drive-browser": {
      "type": "http",
      "url": "https://drive-file-browser-mcp.vercel.app/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}

Any HTTP client — send JSON-RPC over POST with headers Content-Type: application/json, Accept: application/json, text/event-stream, Authorization: Bearer <YOUR_API_KEY>:

curl -X POST https://drive-file-browser-mcp.vercel.app/api/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'

Health check (no auth): GET https://drive-file-browser-mcp.vercel.app/api/health

Deploy your own instance

  1. Fork/clone this repo, then:

npm install
npm i -g vercel
vercel login
vercel link --yes
# env vars:
echo "<your-api-key>" | vercel env add MCP_API_KEY production
echo "<your-drive-folder-id>" | vercel env add DRIVE_ROOT_FOLDER_ID production
echo "<service-account-json-contents>" | vercel env add GOOGLE_SERVICE_ACCOUNT_JSON production
vercel deploy --prod --yes
  1. Get a Google service account JSON (see below) and share your Drive folder with its client_email.

Environment Variables (Vercel)

Variable

Description

GOOGLE_SERVICE_ACCOUNT_JSON

The full service account JSON key (inline string) — required for Drive access

DRIVE_ROOT_FOLDER_ID

Default folder ID the server browses

MCP_API_KEY

Bearer token required on /api/mcp — leave unset to disable auth (not recommended)

Manage them in the Vercel dashboard: Project → Settings → Environment Variables.

Local Setup (stdio mode)

1. Create a Google service account

  1. Go to the Google Cloud Console and create (or select) a project.

  2. Enable the Google Drive API (APIs & Services → Library → search "Google Drive API" → Enable).

  3. Go to APIs & Services → Credentials → Create Credentials → Service account.

  4. Open the service account → Keys tab → Add key → Create new key → JSON. A .json key file downloads.

  5. Share the Drive folder with the service account's email (found in the JSON file as client_email, looks like xxx@xxx.iam.gserviceaccount.com) — right-click the folder in Drive → Share → enter that email → Viewer.

2. Install and build

git clone https://github.com/ashrafur02-sys/drive-file-browser-mcp.git
cd drive-file-browser-mcp
npm install
npm run build

3. Configure

Set environment variables (or copy .env.example to .env — note: .env files are NOT auto-loaded; set real env vars in your MCP client config, or point GOOGLE_SERVICE_ACCOUNT_JSON at a file path):

Variable

Description

GOOGLE_SERVICE_ACCOUNT_JSON

Inline service account JSON or a path to the JSON key file

DRIVE_ROOT_FOLDER_ID

Default folder ID (or full URL) the server browses

Usage with MCP Clients

Add to your client's MCP configuration:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "drive-browser": {
      "command": "node",
      "args": ["/absolute/path/to/drive-file-browser-mcp/dist/src/index.js"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_JSON": "/absolute/path/to/service-account.json",
        "DRIVE_ROOT_FOLDER_ID": "1TG4ssc_z0FgG2snDapoR_SRu3y16Wxm5"
      }
    }
  }
}

Claude Code / opencode:

{
  "mcpServers": {
    "drive-browser": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/drive-file-browser-mcp/dist/src/index.js"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_JSON": "/absolute/path/to/service-account.json",
        "DRIVE_ROOT_FOLDER_ID": "1TG4ssc_z0FgG2snDapoR_SRu3y16Wxm5"
      }
    }
  }
}

Once connected, ask your assistant things like:

  • "List the files in the Drive folder"

  • "Search for the press meet presentation"

  • "Read the corporate communication file"

  • "Get info about the file with ID ..."

Security Notes

  • The server uses read-only Drive scope (drive.readonly).

  • Never commit your service account key. It is gitignored by default.

  • Anyone you give the key file to gets read access to everything the service account can see — share the repo, not your key.

License

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI assistants to list, read, create, and manage files in Google Drive. It features automatic conversion of Google Workspace formats into Markdown, CSV, and plain text for seamless integration with AI workflows.
    35
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A local MCP server that enables LLMs to securely search and read files within designated Google Drive folders. Supports Google Docs, Google Sheets, PDFs, and plain text with strict folder-scoping via service account authentication.
    4
    MIT

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashrafur02-sys/drive-file-browser-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server