☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes
@jackwotherspoon
☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes について
Deploy and host a remote MCP server on Cloud Run
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mcp-on-cloudrun": {
"command": "uv",
"args": [
"run",
"test_server.py"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is ☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes?
This project provides a quick-start template and guide to build a remote MCP server using FastMCP and deploy it to Google Cloud Run. It demonstrates how to run a Model Context Protocol server over the streamable-http (or sse) transport, making it centrally accessible, scalable, and secured with authentication. It is aimed at developers who want to move from local MCP servers to a remote, shareable infrastructure.
How to use ☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes?
Clone the repository, set your Google Cloud project, and deploy the server with gcloud run deploy mcp-server --no-allow-unauthenticated --region=us-central1 --source .. After deployment, run gcloud run services proxy mcp-server --region=us-central1 to create an authenticated local tunnel. Test the connection using uv run test_server.py, which exercises the add and subtract tools.
Key features of ☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes
- Deploys a remote MCP server on Cloud Run with automatic scaling.
- Enforces authentication via the
--no-allow-unauthenticatedflag and IAM roles. - Uses FastMCP for a fast, Pythonic server implementation.
- Supports
streamable-httptransport (default) withsseas an option. - Includes two example math tools:
addandsubtract. - Provides a local proxy tunnel for secure client connections.
Use cases of ☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes
- Share a centralized MCP server across a team so everyone uses the same tools.
- Run an MCP server remotely to eliminate local setup and maintenance for each developer.
- Leverage Cloud Run’s scalability to handle variable request loads from AI assistants.
- Secure an MCP server with authenticated requests to prevent public access.
FAQ from ☁️ 🚀 Build and Deploy a remote MCP server to Cloud Run in 5 minutes
What transports does this MCP server support?
It uses streamable-http by default, but you can switch to sse by changing the transport parameter in server.py to transport="sse".
How do I deploy the MCP server to Cloud Run?
You can deploy from source with gcloud run deploy mcp-server --no-allow-unauthenticated --region=us-central1 --source . or from a container image built via Cloud Build. Both options require the --no-allow-unauthenticated flag.
How do I authenticate MCP clients?
Use the Cloud Run proxy by running gcloud run services proxy mcp-server --region=us-central1. This creates an authenticated tunnel to your service. You must also ensure that the caller (or the proxy) has the roles/run.invoker IAM role.
What are the prerequisites to get started?
You need Python 3.10+ (required by FastMCP), the Google Cloud SDK (gcloud), and Git for cloning the repository.
What tools are included in the example server?
The example Math MCP server provides two tools: add (returns the sum of two numbers) and subtract (returns the difference).
「開発者ツール」の他のコンテンツ
DevDocs by CyberAGI 🚀
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
Grafana MCP server
grafanaMCP server for Grafana
OpenSumi
opensumiA framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
Smithery CLI
smithery-aiInstall, manage and develop MCP servers and skills for agents
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
コメント