ecomcp / docs /QUICK_START.md
vinhnx90's picture
Project liftoff
0f6d44d

A newer version of the Gradio SDK is available: 6.0.2

Upgrade

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

  1. Analyze Product - Market insights
  2. Analyze Reviews - Sentiment analysis
  3. Generate Listing - Product copy
  4. Price Recommendation - Pricing strategy

Add a New Tool

  1. Add tool definition in src/server/mcp_server.py
  2. Implement _my_tool() method in same file
  3. Add handler to ToolCallHandler in src/ui/components.py
  4. 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 structure
  • DEVELOPER_GUIDE.md - Full development guide
  • CLEANUP_SUMMARY.md - What was cleaned up
  • QUICK_START.md - This file

Next Steps

  1. Test python run_ui.py
  2. Delete files in archive/ after confirming new code works
  3. Add more tools as needed (see DEVELOPER_GUIDE.md)
  4. Extract src/core/database.py for DB logic
  5. Create test suite under tests/

Everything is modular, documented, and ready to extend!