Astrail
Back to Marketplace
Executable connectorKnowledgeJul 22, 20260 calls

Google Drive Connector

OAuth-connected Google Drive search, metadata retrieval, and permission management.

Credential setup

oauth2

Create an OAuth client and request Drive read-only scope unless permission changes are enabled.

Setup docs: https://console.cloud.google.com/apis/credentials

After adding this connector, attach the credential on the server page, then run astrail tools list.

Hosted MCP endpoint

/api/mcp/preset-google-drive

Private servers require an Astrail API key in the Authorization header.

MCP client snippets

Connect

Claude Desktop config

{
  "mcpServers": {
    "google-drive-connector": {
      "url": "/api/mcp/preset-google-drive"
    }
  }
}

cURL initialize

curl -sS -X POST "/api/mcp/preset-google-drive" \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'

cURL tools/list

curl -sS -X POST "/api/mcp/preset-google-drive" \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

cURL tools/call

curl -sS -X POST "/api/mcp/preset-google-drive" \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"drive_search_files","arguments":{"q":"example","pageSize":"example","pageToken":"example","fields":"example"}}}'

Runtime behavior

Runtime healthhealthy
Endpoint healthnot_checked
Execution modesafe_rest_execution
Deterministic executionSupported
Generated sourceExport only
Endpoint mapAvailable
Endpoint mappedYes
Auth-required endpointsPresent
Browser runtime endpointsNone detected
Last statusnot recorded
Last execution modenot recorded
Last toolnot recorded
Last latencynot recorded
Upstream statusnot recorded
Trace IDnot recorded
Error codenone
Observabilitystructured fallback
Rate limit modestandard
Missing authauth_required / oauth_required
Missing mappingmapping_required

Astrail does not evaluate generated TypeScript inside Next.js. Hosted calls are routed through stored tool metadata and endpoint maps.

Tools

6
drive_search_files

Search Google Drive files.

drive_get_file

Retrieve Google Drive file metadata.

drive_list_files

List Google Drive files with an optional page token.

drive_share_file

Create a Google Drive permission after approval.

drive_list_permissions

List permissions on a Drive file with pagination.

drive_copy_file

Copy a Drive file after approval.

server.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "Google Drive Connector", version: "1.0.0" });

// Curated Astrail connector for: drive_search_files, drive_get_file, drive_list_files, drive_share_file, drive_list_permissions, drive_copy_file.
// The hosted endpoint executes its verified deterministic endpoint map. Attach a least-privilege provider credential before calling private tools.

server.tool("connector_status", "Confirm this curated connector template is installed.", z.object({}), async () => ({
  content: [{ type: "text", text: "Connector installed. Attach provider credentials to enable hosted API calls." }],
}));

const transport = new StdioServerTransport();
await server.connect(transport);