Convert_FastAPI_MCPTool
Verified Safeby barwalgayatri02
Overview
Integrates a MCP server to expose selected FastAPI application routes as MCP tools.
Installation
uvicorn mcp_fast:app --host 0.0.0.0 --port 8000Security Notes
The application uses `CORSMiddleware` with `allow_origins=["*"]`, `allow_methods=["*"]`, and `allow_headers=["*"]`. This is a critical security risk for any production application, as it permits cross-origin requests from any domain, making it highly vulnerable to Cross-Site Request Forgery (CSRF) and other attacks if not properly restricted to specific origins. While the current exposed routes are simple math operations, this configuration promotes insecure practices.
Similar Servers
fastapi_mcp
Automatically converts FastAPI endpoints into Model Context Protocol (MCP) tools for seamless integration with LLM agents.
fluidmcp
Orchestrate multiple vLLM-backed LLM models and Model Context Protocol (MCP) servers through a unified OpenAI-compatible API gateway.
enterprise_mcp_server
Provides a robust, multi-component Model Context Protocol (MCP) solution with an API Gateway for routing and management, an Enterprise MCP Server for core services like authentication and tool administration, and a Tool Server for operational tool execution, designed for integration with clients like Cursor and Claude Code.
zego-ai-platform-mcp-server
A lightweight FastAPI server acting as a central control plane (MCP) to define, list, and mock calls to various tools and resources, configured via environment variables.