aduib-mcp-server-template
Verified Safeby chaorenex1
Overview
A FastAPI-based MCP (Model Context Protocol) server template designed for hosting AI/ML tools, resources, and prompts, featuring API key authentication, Redis caching, database integration (SQLAlchemy), and optional Nacos service discovery.
Installation
python app.pyEnvironment Variables
- APP_NAME
- APP_DESCRIPTION
- APP_HOME
- APP_VERSION
- APP_HOST
- APP_PORT
- APP_MAX_REQUESTS
- APP_MAX_WORKERS
- DEPLOY_ENV
- DEFAULT_USER_AGENT
- IS_SSL
- SSL_CERTFILE
- SSL_KEYFILE
- DEBUG
- AUTH_ENABLED
- TRANSPORT_TYPE
- LOG_LEVEL
- LOG_FORMAT
- LOG_TZ
- LOG_FILE
- LOG_FILE_MAX_BYTES
- LOG_FILE_BACKUP_COUNT
- LOG_FILE_LEVEL
- DB_ENABLED
- DB_DRIVER
- DB_HOST
- DB_PORT
- DB_USERNAME
- DB_PASSWORD
- DB_DATABASE
- DB_CHARSET
- DB_EXTRAS
- POOL_SIZE
- REDIS_ENABLED
- REDIS_HOST
- REDIS_PORT
- REDIS_USERNAME
- REDIS_PASSWORD
- REDIS_DB
- REDIS_USE_SENTINEL
- REDIS_SENTINELS
- REDIS_SENTINEL_SERVICE_NAME
- REDIS_SENTINEL_USERNAME
- REDIS_SENTINEL_PASSWORD
- REDIS_SENTINEL_SOCKET_TIMEOUT
- REDIS_USE_CLUSTERS
- REDIS_CLUSTERS
- REDIS_CLUSTERS_PASSWORD
- REDIS_SERIALIZATION_PROTOCOL
- REDIS_ENABLE_CLIENT_SIDE_CACHE
- REMOTE_SETTINGS_SOURCE_NAME
- NACOS_SERVER_ADDR
- NACOS_NAMESPACE
- NACOS_GROUP
- NACOS_USERNAME
- NACOS_PASSWORD
- DISCOVERY_SERVICE_ENABLED
- DISCOVERY_SERVICE_TYPE
- BACKEND_CORS_ORIGINS
- SNOWFLAKE_WORKER_ID
- SNOWFLAKE_DATACENTER_ID
Security Notes
The server uses `bcrypt` for API key hashing and verification, which is a strong cryptographic practice. Configuration, including sensitive credentials for databases and Redis, is externalized via `pydantic-settings` (environment variables or remote config like Nacos), avoiding hardcoded secrets. Nacos integration introduces a dependency on the security of the Nacos server itself. No direct `eval` or other highly dangerous patterns were observed. Overall, it appears to follow good security practices for its components, but secure deployment relies heavily on proper environment configuration.
Similar Servers
template-mcp-server
Provides a CLI tool and template to quickly get started building a Model Context Protocol (MCP) server using FastMCP, supporting both stdio and HTTP transports.
mcp-python-starter
A feature-complete Model Context Protocol (MCP) server template in Python for developing AI applications and agents.
mcp-forge-python
A production-ready MCP (Model Context Protocol) server template for building AI-powered applications with OAuth 2.0 authentication and JWT validation.
generic_mcp_server
A generic Model Context Protocol (MCP) server that dynamically discovers and routes tool calls to external services based on metadata stored in Google Cloud Firestore.