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:
2025-10-31 14:41:07 -04:00
parent c929080960
commit d587a5f213
5 changed files with 9 additions and 35 deletions

View File

@@ -20,7 +20,6 @@ cp .env.example .env
# Edit .env and set:
# - OPENAI_API_BASE, OPENAI_API_KEY
# - ALPHAADVANTAGE_API_KEY, JINA_API_KEY
# - MCP service ports (default: 8000-8003)
# - AGENT_MAX_STEP (default: 30)
```
@@ -40,11 +39,8 @@ cd agent_tools
python start_mcp_services.py
cd ..
# Services run on ports defined in .env:
# - MATH_HTTP_PORT (default: 8000)
# - SEARCH_HTTP_PORT (default: 8001)
# - TRADE_HTTP_PORT (default: 8002)
# - GETPRICE_HTTP_PORT (default: 8003)
# MCP services use fixed internal ports (8000-8003)
# These are not exposed to the host and should not be changed
```
### Docker Deployment