Spaces:
Sleeping
Download SETUP_GUIDE.md from Recovery-Compass-79/README: direct link, hf CLI and curl.
- Browser
- Download file 6.15 kB
-
https://huggingface.co/spaces/Recovery-Compass-79/README/resolve/main/SETUP_GUIDE.md
- Command line
-
hf download hf://spaces/Recovery-Compass-79/README/SETUP_GUIDE.md
-
curl -L -o SETUP_GUIDE.md https://huggingface.co/spaces/Recovery-Compass-79/README/resolve/main/SETUP_GUIDE.md
Recovery Compass MCP Hub - Complete Setup Guide
π― Overview
This guide will help you set up the Recovery Compass MCP Hub with full Hugging Face integration, OAuth login, and MCP server capabilities.
π Prerequisites
- Python 3.9+
- Git
- Hugging Face account
- Hugging Face access token (with read/write permissions)
π Quick Setup
1. Clone the Repository
git clone https://huggingface.co/spaces/Recovery-Compass-79/README recovery-compass-space
cd recovery-compass-space
2. Run Setup Script
chmod +x setup.sh
./setup.sh
3. Configure Environment
Edit .env file with your credentials:
HF_TOKEN=your_token_here
OAUTH_CLIENT_SECRET=your_secret_here
4. Test Locally
uvicorn app:app --host 0.0.0.0 --port 7860
Visit: http://localhost:7860
5. Deploy to Hugging Face
git add .
git commit -m "Configure deployment"
git push
π MCP Integration Setup
Connect to Hugging Face MCP Server
OAuth Authentication
- Visit: https://huggingface.co/mcp?login
- Authorize the application
- Token will be stored automatically
Configure MCP Client
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"huggingface": {
"url": "https://huggingface.co/mcp",
"oauth": true
},
"recovery-compass": {
"url": "https://huggingface.co/spaces/Recovery-Compass-79/README",
"oauth": true
}
}
}
Available MCP Tools
Spaces Semantic Search
- Find AI Apps via natural language
- Example: "Find mental health support spaces"
Papers Semantic Search
- Search ML research papers
- Example: "Papers about recovery prediction models"
Model Search
- Find ML models with filters
- Example: "Find sentiment analysis models"
Dataset Search
- Search datasets
- Example: "Mental health conversation datasets"
Documentation Search
- Search HF documentation
- Example: "How to fine-tune a model"
Hub Repository Details
- Get info about repos
- Include README files
π Connect Valuable Apps
Recommended Spaces to Connect
- evalstate/flux1_schnell - Fast image generation
- Mental Health Support Spaces - Crisis counseling
- Wellness Tracking - Progress monitoring
- Mindfulness Tools - Meditation guidance
How to Connect Apps
- Visit: https://huggingface.co/settings/connected-applications
- Authorize each app
- Grant appropriate permissions:
- Public profile (always)
- View repo contents (for integration)
- Edit repo contents (if needed)
- List MCP tools (for MCP access)
Currently Connected Apps
Based on your setup:
- β Claude (MCP tools + repo access)
- β DeepSite (repo management)
π± API Endpoints
Health Check
curl https://Recovery-Compass-79-README.hf.space/health
Search Resources
curl "https://Recovery-Compass-79-README.hf.space/api/search?query=recovery"
List Models
curl "https://Recovery-Compass-79-README.hf.space/api/models?task=text-generation&limit=5"
List Datasets
curl "https://Recovery-Compass-79-README.hf.space/api/datasets?task=text-classification&limit=5"
AI Chat
curl -X POST https://Recovery-Compass-79-README.hf.space/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "I need support today"}'
List Recovery Spaces
curl https://Recovery-Compass-79-README.hf.space/api/spaces
π OAuth Configuration
Set Up OAuth App
- Go to: https://huggingface.co/settings/applications
- Create new OAuth application
- Set redirect URI:
https://huggingface.co/spaces/Recovery-Compass-79/README/callback - Get client ID and secret
- Add to
.envfile
Required Scopes
profile- User profile informationread- Read access to reposwrite- Write access for data storagemcp- MCP tools access
π οΈ Advanced Configuration
Enable All MCP Tools
Edit mcp-config.json to enable/disable tools:
{
"capabilities": {
"semantic_search": { "enabled": true },
"model_inference": { "enabled": true },
"dataset_access": { "enabled": true },
"space_integration": { "enabled": true },
"progress_tracking": { "enabled": true }
}
}
Add Custom Spaces
Add recommended spaces in mcp-config.json:
{
"integration": {
"recommended_spaces": [
"your-space-1",
"your-space-2"
]
}
}
π§ͺ Testing
Local Testing
# Test health endpoint
curl http://localhost:7860/health
# Test MCP info
curl http://localhost:7860/mcp
# Test search
curl "http://localhost:7860/api/search?query=test"
Production Testing
Replace localhost:7860 with Recovery-Compass-79-README.hf.space
π Monitoring
Check Space Status
Visit: https://huggingface.co/spaces/Recovery-Compass-79/README/logs
API Usage
Monitor requests through FastAPI docs: https://Recovery-Compass-79-README.hf.space/docs
π§ Troubleshooting
OAuth Issues
- Verify redirect URI matches exactly
- Check token permissions
- Ensure client secret is correct
MCP Connection Issues
- Confirm OAuth is completed
- Check MCP client configuration
- Verify Space is running
API Errors
- Check Space logs
- Verify HF token is valid
- Test endpoints locally first
π Resources
π€ Support
For issues or questions:
- GitHub Issues: [Create an issue]
- Hugging Face Discussions: [Community forum]
- Email: support@recoverycompass.example
π Next Steps
- β Complete OAuth setup
- β Connect recommended apps
- β Test all API endpoints
- β Configure MCP client
- β Start using with AI assistants!
Built with β€οΈ for the recovery community