Spaces:
Sleeping
Sleeping
MCP Tools Setup Guide for AI Code Analyzer Project
π― Configured MCP Tools
I've set up the following MCP tools in your ~/.cursor/mcp.json file:
Essential for ML/AI Projects:
π€ Hugging Face - Model management and dataset access
- API Key Location: https://huggingface.co/settings/tokens
- Required Scope:
read(minimum),write(if you want to upload models) - Replace:
YOUR_HUGGINGFACE_API_KEY_HERE
ποΈ DuckDB - Local analytics database (no API key needed)
- Perfect for: Analyzing your
analyst_dataset.jsonlfile - No setup required - ready to use!
- Perfect for: Analyzing your
Development & Deployment:
π GitHub - Version control and collaboration
- API Key Location: https://github.com/settings/tokens
- Required Scope:
repo,workflow,read:org - Replace:
YOUR_GITHUB_TOKEN_HERE
π Vercel - Deploy web interfaces
- API Key Location: https://vercel.com/account/tokens
- Replace:
YOUR_VERCEL_TOKEN_HERE
π Railway - Full-stack deployment
- API Key Location: https://railway.app/account/tokens
- Replace:
YOUR_RAILWAY_TOKEN_HERE
Data Storage:
- π MongoDB - Database for structured data
- Connection String: Get from MongoDB Atlas (https://cloud.mongodb.com/)
- Format:
mongodb+srv://username:password@cluster.mongodb.net/database - Replace:
YOUR_MONGODB_CONNECTION_STRING_HERE
Monitoring & Error Tracking:
- π¨ Sentry - Error tracking and performance monitoring
- Auth Token: https://sentry.io/settings/account/api/auth-tokens/
- Organization: Your Sentry org slug
- Project: Your project slug
- Replace:
YOUR_SENTRY_AUTH_TOKEN_HEREYOUR_SENTRY_ORG_HEREYOUR_SENTRY_PROJECT_HERE
Security & Code Quality:
π Snyk - Vulnerability scanning
- API Key Location: https://app.snyk.io/account
- Replace:
YOUR_SNYK_TOKEN_HERE
π Semgrep - Static analysis (no API key needed)
- Ready to use - no setup required!
ποΈ SonarQube - Code analysis
- Setup: You need a SonarQube instance (cloud or self-hosted)
- Token: Generate in your SonarQube instance
- Replace:
YOUR_SONARQUBE_URL_HERE(e.g.,https://your-org.sonarcloud.io)YOUR_SONARQUBE_TOKEN_HERE
π Quick Start (Recommended Order)
Phase 1: Essential Tools (Start Here)
- Hugging Face - Most important for your ML project
- DuckDB - Already ready, no API key needed
- GitHub - For version control
Phase 2: Development Tools
- Vercel or Railway - For deployment
- Sentry - For monitoring
Phase 3: Advanced Tools (Optional)
- MongoDB - If you need structured data storage
- Snyk - For security scanning
- Semgrep - For static analysis
- SonarQube - For comprehensive code analysis
π How to Add API Keys
- Open your MCP config:
c:\Users\arunk\.cursor\mcp.json - Find the placeholder (e.g.,
YOUR_HUGGINGFACE_API_KEY_HERE) - Replace with your actual API key/token
- Save the file
- Restart Cursor for changes to take effect
π§ Installation Commands
Run these commands to ensure all MCP servers are installed:
# Install all MCP servers
npm install -g @modelcontextprotocol/server-huggingface
npm install -g @modelcontextprotocol/server-github
npm install -g @modelcontextprotocol/server-duckdb
npm install -g @modelcontextprotocol/server-sentry
npm install -g @modelcontextprotocol/server-vercel
npm install -g @modelcontextprotocol/server-mongodb
npm install -g @modelcontextprotocol/server-railway
npm install -g @modelcontextprotocol/server-snyk
npm install -g @modelcontextprotocol/server-semgrep
npm install -g @modelcontextprotocol/server-sonarqube
β Testing Your Setup
After adding API keys, test each tool in Cursor Composer:
- Hugging Face: "Search for code analysis models on Hugging Face"
- DuckDB: "Analyze my training dataset using DuckDB"
- GitHub: "Show me my recent commits"
- Sentry: "Check for errors in my project"
π‘οΈ Security Notes
- Never commit API keys to version control
- Use environment variables for sensitive data
- Regularly rotate your API keys
- Use minimal required permissions for each service
π Troubleshooting
If a tool doesn't work:
- Check if the MCP server is installed:
npm list -g @modelcontextprotocol/server-* - Verify API keys are correct and have proper permissions
- Restart Cursor after making changes
- Check Cursor's MCP settings in
Settings > Features > MCP
π Useful Commands for Your Project
Once set up, you can use these commands in Cursor Composer:
- "Use Hugging Face to find the best code analysis models"
- "Analyze my analyst_dataset.jsonl with DuckDB"
- "Check my code for vulnerabilities with Snyk"
- "Deploy my analyzer to Vercel"
- "Monitor errors with Sentry"