Back to Home
markwkiehl icon

medium_gcp_mcp_fastapi

Verified Safe

by markwkiehl

Overview

Provides a template for deploying a Model Context Protocol (MCP) Server using FastAPI on Google Cloud Run, demonstrating server deployment, client interaction, and GCS FUSE integration.

Installation

Run Command
uvicorn api_mcp_fastapi_server:app --reload

Environment Variables

  • OPENAI_API_KEY
  • MOUNT_PATH

Security Notes

Secrets (like `OPENAI_API_KEY`) are correctly handled via environment variables, loaded from a `.env` file or Cloud Run environment. The code explicitly avoids logging full API keys. It demonstrates good practice by separating database storage (ephemeral `/tmp` directory) from GCS FUSE mounts due to the latter's characteristics. No `eval` or obvious malicious patterns were found in the provided source code.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Stars0
Forks0
Last Update2025-12-11

Tags

FastAPIGCP Cloud RunMCP ServerGoogle Cloud StoragePython