medium_gcp_mcp_fastapi
Verified Safeby 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
uvicorn api_mcp_fastapi_server:app --reloadEnvironment 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
fastapi_mcp
Automatically converts FastAPI endpoints into Model Context Protocol (MCP) tools for seamless integration with LLM agents.
mcp-python-starter
A feature-complete Model Context Protocol (MCP) server template in Python for developing AI applications and agents.
mcp_server
This server template provides a foundation for building Model Context Protocol (MCP) servers to integrate with AI assistants and other MCP clients, offering tools for GitHub, Microsoft Graph, weather data, and JWT decoding.
MCP-On-Cloud-Run
Deploys a secure Model Context Protocol (MCP) server on Google Cloud Run to provide external tools for Large Language Models (LLMs) like Gemini.