FoldRun MCP Server

FoldRun MCP Server

A mock MCP server that exposes protein structure prediction tools (submit, status, results) for integration with Gemini Enterprise, demonstrating the bring-your-own-MCP capability.

Category
Visit Server

README

Bring your own MCP to Gemini Enterprise with the (Mock) FoldRun MCP Server

This repository demonstrates the "Bring Your Own MCP" capability in Gemini Enterprise.

The original FoldRun architecture is available in the Google Cloud Life Sciences repository. FoldRun is an open-source accelerator designed to automate the end-to-end scientific workflow for protein structure prediction. It runs models such as Boltz2, OpenFold3, and AlphaFold 2. It is an intelligent orchestration layer that uses multi-agent collaboration to manage the entire lifecycle from hypothesis generation to structural validation.

Spinning up the entire FoldRun agent requires costly infrastructure. To make testing accessible, this repository provides a lightweight, mock FoldRun MCP server. It exposes three core tools built in Python (using FastMCP) to demonstrate how easily you can integrate custom external agents and harvest their capabilities directly within Gemini Enterprise.

What is in this repository?

  • foldrun_mcp_demo.py: The core FastMCP server that exposes three mock AI tools (submit_protein_prediction, get_job_status, get_prediction_results).
  • Dockerfile & .dockerignore: For containerizing the server for later deployment to Cloud Run.
  • requirements.txt: Python dependencies (mcp and uvicorn).

Architecture

  1. Transport: Uses the StreamableHTTP protocol (via Server-Sent Events / /mcp) which is natively compatible with Gemini Enterprise.
  2. State: Uses an in-memory Python dictionary to simulate a remote supercomputer cluster tracking jobs.
  3. Deployment: Serverless on Google Cloud Run listening on port 8080.

Deployment Guide

Follow these steps to deploy the server to Google Cloud Run and connect it to Gemini Enterprise.

Step 1: Deploy to Google Cloud Run

  1. Clone this repository to your local machine or open it directly in Google Cloud Shell.
  2. Ensure you have the gcloud CLI installed and authenticated to your GCP project.
  3. Run the following command from the root of the repository to deploy the container:
    gcloud run deploy foldrun-mcp-demo \
      --source . \
      --region us-central1 \
      --allow-unauthenticated \
      --port 8080
    
  4. Copy the Service URL provided at the end of the deployment (e.g., https://foldrun-mcp-demo-xxxxx.us-central1.run.app).

Step 2: (Optional) Local Testing

You can easily test your MCP tools locally before connecting them to Gemini.

  1. Install the dependencies in a virtual environment:
    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
    
  2. Use the official MCP CLI Inspector to interact with your tools via a local web UI:
    mcp dev foldrun_mcp_demo.py
    
  3. Open the provided localhost URL in your browser to test the submit_protein_prediction and get_job_status tools visually.

Step 3: Configure Gemini Enterprise

Gemini Enterprise requires an OAuth authentication layer, even if your Cloud Run service is set to --allow-unauthenticated. We will use Google's native OAuth endpoints as a passthrough.

  1. Go to the Google Cloud Console -> APIs & Services -> Credentials.
  2. Click Create Credentials -> OAuth client ID.
  3. Select Web application as the application type.
  4. Set the Authorized redirect URIs to https://extensions.googleapis.com/auth.
  5. Click Create and save your Client ID and Client Secret.

Step 4: Create the Data Store in Gemini Enterprise

  1. Open Gemini Enterprise
  2. Go to Apps -> Data stores -> Create data store -> Custom MCP Server.
  3. Fill out the configuration form:
    • Data connector name: foldrun-mcp
    • MCP Server URL: Your Cloud Run Service URL from Step 1, with /mcp appended to the end. (e.g., https://foldrun-mcp-demo-xxxxx.us-central1.run.app/mcp)
    • Authentication mechanism: OAUTH
    • Authorization URL: https://accounts.google.com/o/oauth2/auth
    • Token URL: https://oauth2.googleapis.com/token
    • OAuth client ID: The Client ID from Step 3.
    • OAuth client secret: The Client Secret from Step 3.
    • OAuth scopes: email profile
  4. Click Create and follow the Google Sign-in prompt.
  5. Your connection status should turn Green (Active).

Step 5: Verify and Enable Actions

By default, newly connected MCP tools are turned off. To enable them:

  1. Click on your newly created data store and ensure the status has changed from Creating to Active.
  2. Go to the Actions tab and click Reload custom actions to fetch the available tools from your Cloud Run server.
  3. Select the checkboxes next to the retrieved tools (submit_protein_prediction, get_job_status, get_prediction_results).
  4. Click Enable actions.

Refer to this link for more details on connecting your MCP to Gemini Enterprise.

Testing Your Agent

Once your Data Store is connected to a Chat App/Agent in Gemini Enterprise, try the following prompts to verify each tool is working.

Tool 1 — submit_protein_prediction

"Submit a new AlphaFold2 prediction for the sequence MKALIVLGLVLLSVTV. Name the job my-first-test."

↳ Expected: Gemini calls the tool and returns a new job_id (e.g., foldrun-af2-a1b2c3) and an estimated runtime.

Tool 2 — get_job_status

"Check the status of the protein prediction job foldrun-af2-demo01."

↳ Expected: Gemini calls the tool and returns the current stage, progress percentage, and a status message (e.g., 35% — running MSA search).

Tool 3 — get_prediction_results

"Get the final structure results and expert analysis for the AlphaFold job foldrun-af2-demo01."

↳ Expected: Gemini calls the tool and returns quality metrics (pLDDT, pTM score), output file paths, and a detailed structural analysis paragraph.


Going to Production with Real FoldRun

To move beyond mock data and connect to the actual FoldRun agent, follow these high-level steps:

  1. Deploy the actual FoldRun agent in your GCP project.
  2. Grab the FoldRun A2A proxy URL from the deploy output.
  3. Write an MCP-to-A2A adapter that translates each MCP tool call into an A2A message to the FoldRun agent.
  4. Replace mock logic in your MCP server with real A2A calls using the adapter.
  5. Add Google ID-token auth to A2A calls.
  6. Grant your MCP service account permission to invoke A2A.
  7. Set FoldRun A2A URL as an environment variable on your MCP Cloud Run service.
  8. Redeploy the MCP server.
  9. Test end-to-end in Gemini Enterprise with a real protein prediction.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured