MCP is an open protocol that standardizes how applications provide context to LLMs.

MCP helps you build agents and complex workflows on top of LLMs. LLMs frequently need to integrate with data and tools, and MCP provides:

  • A growing list of pre-built integrations that your LLM can directly plug into
  • The flexibility to switch between LLM providers and vendors
  • Best practices for securing your data within your infrastructure

There’s an important distinct you need to understand between MCP Client and MCP Servers. You can develop for either.

  • MCP Servers consist of programs that expose specific capabilities through the standardized Model Context Protocol for MCP clients to access. There are many popular existing filesystems/programs/APIs that have opened up MCP servers e.g. default filesystem, PostgresSQL, Google Drive, Git, Brave, Puppeteer, Slack, Google Maps, etc.
  • MCP Clients are applications that support MCP integrations

I only really care about MCP Servers so that’s all I will focus on for now.

I forked the entire repo and going to use it for running various servers! It’s so easy and extends Claude capabilities so much!

Google Drive Integration

Following the instruction here I successfully connected Claude desktop to Google Drive via MCP.

I followed the instructions exactly on the page except at the last step.

Here I used NPX (instead of Docker) on the Claude config file but used an env variable to pass in the server credentials.

 cat claude_desktop_config.json
{
  "mcpServers": {
      "weather-ts": {
          "command": "node",
          "args": [
              "/Users/malin/code/fractalbootcamp/hackathons/anthropic-mcp/weather-ts/build/index.js"
          ]
      },
        "gdrive": {
          "command": "npx",
          "args": [
              "-y",
              "@modelcontextprotocol/server-gdrive"
          ],
          "env": {
              "GDRIVE_CREDENTIALS_PATH": "/Users/malin/code/mcp-servers/.gdrive-server-credentials.json"
          }
      }
  }
}

It turns out the default gdrive MCP server repo is kind of useless for doing anything except searching through files on Google Drive. I ended up finding another project on GitHub by someone who had extended the capabilities beyond that to be able to modify spreadsheets and read files. https://github.com/isaacphi/mcp-gdrive (Note to self: fork this repo, update README and index.ts file and do a PR. Also mention that the user needs to specifically enable the Google Sheets API in their Enabled API and Services) I ended up making the following changes to the index.js file to force authentication when the server runs

async function startServer() {
  try {
    console.log("Starting server");
    
    // Add this line to force authentication at startup
    await ensureAuth(); // This will trigger the auth flow if no valid credentials exist
    
    const transport = new StdioServerTransport();
    await server.connect(transport);
 
    // Set up periodic token refresh that never prompts for auth
    setupTokenRefresh();
  } catch (error) {
    console.error("Error starting server:", error);
    process.exit(1);
  }
}

Anyway I decided to implement that, and it took a bunch of time because the documentation wasn’t exactly correct, but in the end I managed to do it! Huge!