Back to Home
chaorenex1 icon

aduib-mcp-server-template

Verified Safe

by 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

Run Command
python app.py

Environment 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

Stats

Interest Score0
Security Score8
Cost ClassMedium
Avg Tokens1200
Stars0
Forks0
Last Update2025-12-15

Tags

FastAPIMCPAI/MLAPI Key AuthRedisSQLAlchemyNacos