Spaces:
Running
Running
A newer version of the Gradio SDK is available:
6.0.2
EcoMCP Quick Start
Launch Application
# Start with UI (one command)
python run_ui.py
# Then open browser
# http://localhost:7860
New Structure at a Glance
src/
ui/ β Gradio app & components
server/ β MCP server (JSON-RPC)
clients/ β Server communication
core/ β Shared logic (future)
run_ui.py β Launch everything
run_server.py β Standalone server
Key Files
| File | Purpose |
|---|---|
src/ui/app.py |
Main Gradio interface |
src/ui/components.py |
Reusable UI components |
src/server/mcp_server.py |
MCP protocol server |
src/clients/mcp_client.py |
JSON-RPC client |
The 4 Tools
- Analyze Product - Market insights
- Analyze Reviews - Sentiment analysis
- Generate Listing - Product copy
- Price Recommendation - Pricing strategy
Add a New Tool
- Add tool definition in
src/server/mcp_server.py - Implement
_my_tool()method in same file - Add handler to
ToolCallHandlerinsrc/ui/components.py - Add UI tab in
src/ui/app.py
See DEVELOPER_GUIDE.md for detailed steps.
Cleanup Done
11 old app files moved to archive/
Created clean src/ structure
Created entry point scripts
Added comprehensive documentation
Old files preserved but should be deleted after validation.
Common Commands
# Run UI
python run_ui.py
# Run server standalone
python run_server.py
# View structure
find src -type f -name "*.py"
# Check old files
ls archive/
# View documentation
cat STRUCTURE.md
cat DEVELOPER_GUIDE.md
cat CLEANUP_SUMMARY.md
Documentation Files
STRUCTURE.md- Detailed project structureDEVELOPER_GUIDE.md- Full development guideCLEANUP_SUMMARY.md- What was cleaned upQUICK_START.md- This file
Next Steps
- Test
python run_ui.py - Delete files in
archive/after confirming new code works - Add more tools as needed (see DEVELOPER_GUIDE.md)
- Extract
src/core/database.pyfor DB logic - Create test suite under
tests/
Everything is modular, documented, and ready to extend!