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.
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 (mcpanduvicorn).
Architecture
- Transport: Uses the
StreamableHTTPprotocol (via Server-Sent Events //mcp) which is natively compatible with Gemini Enterprise. - State: Uses an in-memory Python dictionary to simulate a remote supercomputer cluster tracking jobs.
- 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
- Clone this repository to your local machine or open it directly in Google Cloud Shell.
- Ensure you have the
gcloudCLI installed and authenticated to your GCP project. - 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 - 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.
- Install the dependencies in a virtual environment:
python -m venv venv source venv/bin/activate pip install -r requirements.txt - Use the official MCP CLI Inspector to interact with your tools via a local web UI:
mcp dev foldrun_mcp_demo.py - Open the provided
localhostURL in your browser to test thesubmit_protein_predictionandget_job_statustools 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.
- Go to the Google Cloud Console -> APIs & Services -> Credentials.
- Click Create Credentials -> OAuth client ID.
- Select Web application as the application type.
- Set the Authorized redirect URIs to
https://extensions.googleapis.com/auth. - Click Create and save your
Client IDandClient Secret.
Step 4: Create the Data Store in Gemini Enterprise
- Open Gemini Enterprise
- Go to Apps -> Data stores -> Create data store -> Custom MCP Server.
- Fill out the configuration form:
- Data connector name:
foldrun-mcp - MCP Server URL: Your Cloud Run Service URL from Step 1, with
/mcpappended 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
- Data connector name:
- Click Create and follow the Google Sign-in prompt.
- 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:
- Click on your newly created data store and ensure the status has changed from
CreatingtoActive. - Go to the Actions tab and click Reload custom actions to fetch the available tools from your Cloud Run server.
- Select the checkboxes next to the retrieved tools (
submit_protein_prediction,get_job_status,get_prediction_results). - 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 jobmy-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:
- Deploy the actual FoldRun agent in your GCP project.
- Grab the FoldRun A2A proxy URL from the deploy output.
- Write an MCP-to-A2A adapter that translates each MCP tool call into an A2A message to the FoldRun agent.
- Replace mock logic in your MCP server with real A2A calls using the adapter.
- Add Google ID-token auth to A2A calls.
- Grant your MCP service account permission to invoke A2A.
- Set FoldRun A2A URL as an environment variable on your MCP Cloud Run service.
- Redeploy the MCP server.
- Test end-to-end in Gemini Enterprise with a real protein prediction.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。