mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
refactor: remove unnecessary MCP service port configuration
MCP services are completely internal to the container and accessed only via localhost. They should not be configurable or exposed. Changes: - Remove MATH_HTTP_PORT, SEARCH_HTTP_PORT, TRADE_HTTP_PORT, GETPRICE_HTTP_PORT from docker-compose.yml environment - Remove MCP service port mappings from docker-compose.yml - Remove MCP port configuration from .env.example - Update README.md to remove MCP port configuration - Update CLAUDE.md to clarify MCP services use fixed internal ports - Update CHANGELOG.md with these simplifications Technical details: - MCP services hardcode to ports 8000-8003 via os.getenv() defaults - Services only accessed via localhost URLs within container: - http://localhost:8000/mcp (math) - http://localhost:8001/mcp (search) - http://localhost:8002/mcp (trade) - http://localhost:8003/mcp (price) - No external access needed or desired for these services - Only API (8080) and web dashboard (8888) should be exposed Benefits: - Simpler configuration (4 fewer environment variables) - Reduced attack surface (4 fewer exposed ports) - Clearer architecture (internal vs external services) - Prevents accidental misconfiguration of internal services
This commit is contained in:
@@ -18,21 +18,10 @@ services:
|
||||
- ALPHAADVANTAGE_API_KEY=${ALPHAADVANTAGE_API_KEY}
|
||||
- JINA_API_KEY=${JINA_API_KEY}
|
||||
|
||||
# MCP Service Ports (fixed internally)
|
||||
- MATH_HTTP_PORT=8000
|
||||
- SEARCH_HTTP_PORT=8001
|
||||
- TRADE_HTTP_PORT=8002
|
||||
- GETPRICE_HTTP_PORT=8003
|
||||
|
||||
# Agent Configuration
|
||||
- AGENT_MAX_STEP=${AGENT_MAX_STEP:-30}
|
||||
ports:
|
||||
# MCP service ports (internal)
|
||||
- "${MATH_HTTP_PORT:-8000}:8000"
|
||||
- "${SEARCH_HTTP_PORT:-8001}:8001"
|
||||
- "${TRADE_HTTP_PORT:-8002}:8002"
|
||||
- "${GETPRICE_HTTP_PORT:-8003}:8003"
|
||||
# API server port (primary interface)
|
||||
# API server port (primary interface for external access)
|
||||
- "${API_PORT:-8080}:8080"
|
||||
# Web dashboard
|
||||
- "${WEB_HTTP_PORT:-8888}:8888"
|
||||
|
||||
Reference in New Issue
Block a user