关于
flask-mcp-server is an advanced, Flask-based server designed to implement the Model Context Protocol (MCP) in Python. It can be easily integrated into existing Flask applications or deployed as a standalone service, providing a unified `/mcp` endpoint for both JSON-RPC and SSE communication, targeting the MCP 2025-06-18 specification. This server simplifies the development of AI agents and services by offering a robust registry for tools, resources, prompts, and completion providers, complete with built-in security features like API keys and HMAC authentication, rate limiting, and discovery mechanisms, making it ideal for scalable AI-driven applications.
主要功能
- Modular architecture with Service Providers and automatic discovery
- Built-in security with API keys, HMAC authentication, roles, and ACL
- Integrated rate limiting, session management, and CORS handling
- 2 GitHub stars
- Comprehensive registry for AI tools, resources, prompts, and completion providers
- Unified /mcp endpoint for JSON-RPC requests and SSE streams
使用案例
- Implementing the Model Context Protocol within existing Flask applications
- Deploying standalone MCP servers for AI agent communication
- Building secure and scalable backends for AI-driven applications