| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- # 如果 auth 与 tools 在同一个域名,可只保留 FMS_API_BASE
- # FMS_API_BASE=http://chenjiacheng.base.dahuo.fudingri.com
- # 当前本地开发推荐:同一个 IP,不同域名由 hosts + Web 服务器 Host 分发到不同项目。
- # base 项目:负责 auth_code / mcp_token 授权换票
- FMS_AUTH_BASE=http://chenjiacheng.base.dahuo.fudingri.com
- # fmsoperate 项目:负责 query_order 等工具接口
- FMS_TOOLS_BASE=http://chenjiacheng.fmsoperate.dahuo.fudingri.com
- FMS_CLIENT_TYPE=workbuddy
- FMS_TIMEOUT_SECONDS=10
- FMS_MAX_IN_FLIGHT_PER_TOOL=5
- FMS_REFRESH_SKEW_SECONDS=120
- FMS_LOG_LEVEL=info
- # 推荐:共享 app.py 场景下使用 Redis 保存 token,不要把 token 文件放到 \192.168.1.241\mcp\ 共享目录。
- FMS_TOKEN_STORE=redis
- FMS_REDIS_HOST=192.168.1.241
- FMS_REDIS_PORT=6379
- FMS_REDIS_DB=20
- FMS_REDIS_PASSWORD=
- FMS_REDIS_PREFIX=fms:mcp:workbuddy:
- # 通常不要在共享 .env 里写死 FMS_SESSION_KEY。
- # Gateway 会自动用员工本机 COMPUTERNAME/USERNAME 生成隔离 key。
- # 只有在单机排障时才手动指定,例如:
- # FMS_SESSION_KEY=pc-name:windows-user
- # 如果临时退回文件存储,再改为:
- # FMS_TOKEN_STORE=file
- # FMS_TOKEN_STORE_PATH=C:/fms-mcp/.mcp_token.json
- # Workbuddy 启动脚本路径使用网络 UNC:\\192.168.1.241\mcp\app.py
- # 不要使用开发机映射盘路径 Y:\mcp\app.py。
- # ============================================================================
- # Public Gateway mode (for production deployment behind HTTPS)
- # ============================================================================
- # Keep Redis private and do not store real passwords in this example file.
- # Gateway mode: 'local' for single-user desktop, 'public' for multi-tenant server
- FMS_GATEWAY_MODE=public
- # Public gateway base URL (used for client configuration)
- FMS_GATEWAY_PUBLIC_BASE=https://mcp.example.com
- # Gateway session TTL in seconds (default: 2592000 = 30 days)
- FMS_GATEWAY_SESSION_TTL_SECONDS=2592000
- # Redis prefix for public mode (must differ from local mode to avoid conflicts)
- FMS_REDIS_PREFIX=fms:mcp:gateway:
- # tools/call rate limiting (default: 60 requests/minute per device session and tool)
- # initialize and tools/list are not rate limited
- # MCP diagnosis events are sent asynchronously to support. Keep disabled until
- # the support collector and matching HMAC key are deployed.
- MCP_DIAGNOSIS_ENABLED=false
- MCP_DIAGNOSIS_URL=https://support.example.com/internal/mcp-diagnostics/events
- MCP_DIAGNOSIS_KEY_ID=gateway-current
- MCP_DIAGNOSIS_SECRET=
- MCP_DIAGNOSIS_ALLOW_INSECURE_HTTP=false
- MCP_DIAGNOSIS_QUEUE_SIZE=1000
- MCP_DIAGNOSIS_BATCH_SIZE=100
- MCP_DIAGNOSIS_TIMEOUT_SECONDS=0.5
- MCP_DIAGNOSIS_INITIAL_BACKOFF_SECONDS=0.25
- MCP_DIAGNOSIS_MAX_BACKOFF_SECONDS=5.0
|