Skip to main content
Glama
ASXRND

MCP Weather & Accruals Server

by ASXRND
GETTING_STARTED.md6.73 kB
# 🚀 GETTING STARTED - v0.2.0 Welcome! This guide will get you up and running in 5 minutes. --- ## 📋 Prerequisites - [ ] Python 3.8+ installed - [ ] SSH access to remote server (192.168.0.137) - [ ] API keys: OpenWeatherMap + Deepseek - [ ] PostgreSQL accessible at 192.168.0.134:5432 --- ## ⚡ 5-Minute Quick Start ### Step 1: Clone/Setup Local Project ```bash cd /Users/aleksandrhohon/Downloads/OpenWeatherMap_MCP-main # Create virtual environment python3 -m venv venv source venv/bin/activate # Install dependencies pip3 install -r requirements.txt ``` ### Step 2: Configure .env ```bash # Create .env file with: OPENWEATHER_API_KEY=your_key_here DEEPSEEK_API_KEY=your_key_here DATABASE_URL=postgresql://asx:asxAdmin1@192.168.0.134:5432/mydb ACCRUALS_API_URL=http://192.168.0.137:8000 ALLOWED_BASE_DIR=/path/to/allowed/dir ``` ### Step 3: Run Deepseek Client ```bash python3 deepseek_client.py ``` ``` 👤 You: What's the weather in Moscow? 🤖 Deepseek: [Fetches real weather data] 👤 You: Show me accrual statistics 🤖 Deepseek: [Queries remote API] 👤 You: exit ``` --- ## 🌐 Deploying Remote FastAPI (Optional) If remote FastAPI on 192.168.0.137 needs to be updated: ```bash # From your local machine: rsync -avz --delete \ ./fastapi_udalennii/ \ 192.168.0.137:/opt/fastapi_udalennii/ # SSH to remote server ssh 192.168.0.137 cd /opt/fastapi_udalennii source venv/bin/activate # Run migrations alembic upgrade head # Restart service supervisorctl restart fastapi_app # or sudo systemctl restart fastapi_app # Verify curl http://192.168.0.137:8000/health ``` --- ## ✅ Testing Endpoints After deployment, test the new accrual endpoints: ```bash # Health check curl http://192.168.0.137:8000/health # List accruals curl http://192.168.0.137:8000/accruals/ # Get statistics curl http://192.168.0.137:8000/stats/summary # Create accrual curl -X POST http://192.168.0.137:8000/accruals/ \ -H "Content-Type: application/json" \ -d '{ "id_accrual": "TEST_001", "accrual_date": "2025-12-08", "service_group": "Доставка", "accrual_type": "Комиссия", "sales_platform": "Ozon", "total_amount_rub": 1000.00 }' ``` Or use the automated test: ```bash python3 test_accruals_api.py ``` --- ## 📖 Full Documentation | Document | Purpose | | -------------------------------------------------------- | --------------------------- | | [README.md](README.md) | Project overview & features | | [DEPLOYMENT_INSTRUCTIONS.md](DEPLOYMENT_INSTRUCTIONS.md) | Detailed deployment guide | | [QUICK_DEPLOYMENT.md](QUICK_DEPLOYMENT.md) | One-liner deployment | | [DOCUMENTATION_INDEX.md](DOCUMENTATION_INDEX.md) | All docs organized | | [CHANGES.md](CHANGES.md) | What's new in v0.2.0 | --- ## 🎯 What You Can Do Now ### With Local Deepseek Client ✅ Ask about weather anywhere ✅ Read/write/create files locally ✅ Query accrual statistics from remote API ✅ Create new accrual records ✅ Get filtered statistics by platform/service group ### With MCP Server ✅ Integrate with Claude Desktop ✅ Expose weather tools to other MCP clients ✅ Build custom AI workflows --- ## 🔧 Common Commands ```bash # Activate local environment source venv/bin/activate # Run the Deepseek chat client python3 deepseek_client.py # Test remote API python3 test_accruals_api.py # Check API docs open http://192.168.0.137:8000/docs # Connect to database psql postgresql://asx:asxAdmin1@192.168.0.134:5432/mydb # View database records SELECT * FROM accruals LIMIT 10; ``` --- ## ⚠️ Troubleshooting ### "Connection refused" error - Check that FastAPI is running: `curl http://192.168.0.137:8000/health` - Check firewall rules - Verify IP address: 192.168.0.137 ### "OPENWEATHER_API_KEY not found" - Create `.env` file in project root - Add your OpenWeatherMap API key - Restart the script ### "Database unavailable" - Check PostgreSQL is running on 192.168.0.134:5432 - Verify credentials: asx / asxAdmin1 - Check network connectivity: `ping 192.168.0.134` ### Deepseek errors - Check your API key is correct - Verify account has credits - Check internet connection --- ## 📚 Architecture (30-second version) ``` Your Computer Remote Server (192.168.0.137) ┌─────────────────┐ ┌──────────────────────┐ │ deepseek_client │ ◄──────────►│ FastAPI (port 8000) │ │ (Python) │ HTTP │ ├─ Users endpoints │ └────────┬────────┘ │ ├─ Accruals (NEW) │ │ │ └─ Stats (NEW) │ │ │ ▲ │ │ │ │ │ ├─ Weather ────────────►│ OpenWeatherMap │ │ │ │ └─ Files ──────────────►│ Local filesystem │ └──────────────────────┘ │ Database (192.168.0.134) PostgreSQL (port 5432) ``` --- ## 🎓 Next Steps 1. **Now:** Try the Deepseek client: `python3 deepseek_client.py` 2. **Deploy:** Follow [QUICK_DEPLOYMENT.md](QUICK_DEPLOYMENT.md) if needed 3. **Test:** Run `python3 test_accruals_api.py` 4. **Integrate:** Use with Claude Desktop or other MCP clients 5. **Customize:** Add new endpoints/features as needed --- ## 🆘 Need Help? 1. **Is deployment confusing?** → Read [DEPLOYMENT_INSTRUCTIONS.md](DEPLOYMENT_INSTRUCTIONS.md) 2. **Want to understand architecture?** → Read [REFACTORING_SUMMARY.md](REFACTORING_SUMMARY.md) 3. **Want to see all changes?** → Read [CHANGES.md](CHANGES.md) 4. **Missing something?** → Check [DOCUMENTATION_INDEX.md](DOCUMENTATION_INDEX.md) --- ## ✨ What's New in v0.2.0? - ✅ **Remote Accrual API** - Full CRUD for accrual records - ✅ **Statistics Endpoints** - Summary and filtered aggregations - ✅ **Database Migrations** - Alembic for schema management - ✅ **Complete Documentation** - Everything you need to deploy - ✅ **Test Suite** - Automated testing script --- **Ready to start? Run:** ```bash python3 deepseek_client.py ``` **Happy coding! 🎉**

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ASXRND/MCP_deepseek'

If you have feedback or need assistance with the MCP directory API, please join our Discord server