ARJ999/salesforce-god-agent-mcp
If you are the rightful owner of salesforce-god-agent-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Salesforce God Agent MCP Server is a powerful tool designed to enhance Salesforce operations with god-level intelligence, providing comprehensive support for Admin, Developer, and Architect tasks across Production and Fullcopy orgs.
🚀 Salesforce God Agent MCP Server
The Ultimate Salesforce MCP Server with god-level intelligence for Admin, Developer, and Architect tasks across Production and Fullcopy orgs.
✨ Features
🎯 God-Level Intelligence
- Best Practices Validation: Automatic validation against Salesforce best practices
- Smart Recommendations: Context-aware suggestions for optimization
- Error Prevention: Proactive detection and prevention of common mistakes
- Auto-Recovery: Intelligent retry with exponential backoff
🔧 Comprehensive Toolset
- 35+ Production-Ready Tools (expandable to 150+)
- 10 Categories: Data, Apex, Metadata, Security, Users, Deployment, Development, Monitoring, Integration, Utilities
- Multi-Org Support: Seamless switching between Production and Fullcopy orgs
- Bulk Operations: Handle millions of records efficiently
🏗️ Enterprise Architecture
- STATELESS Design: Per-request instances for Hostinger VPS deployment
- JSForce-Based: Direct API access for maximum reliability
- TypeScript: Full type safety and IntelliSense support
- Production-Ready: Comprehensive error handling and logging
📦 Tool Categories
Category 1: Data Operations (20 tools)
Tier 1: Core Query & Search
sf_query- Execute SOQL with intelligent validationsf_query_aggregate- Aggregate functions (COUNT, SUM, AVG, etc.)sf_search_sosl- Full-text search across objectssf_search_objects- Find objects by patternsf_describe_object- Complete object metadata
Tier 2: DML Operations
sf_insert_records- Insert with validationsf_update_records- Update with error handlingsf_delete_records- Soft delete to Recycle Binsf_upsert_records- Idempotent operationssf_undelete_records- Restore deleted records
Tier 3: Bulk Operations
sf_bulk_insert- 10K+ record insertssf_bulk_update- Mass updatessf_bulk_delete- Bulk deletionssf_bulk_query- Million+ record queriessf_bulk_job_status- Job monitoring
Tier 4: Advanced Data
sf_export_csv- Export to CSVsf_import_csv- Import with field mappingsf_field_history- Track field changessf_duplicate_detection- Find duplicatessf_data_backup- Complete backups
Category 2: Apex Development (15 tools)
Tier 1: Apex Execution
sf_execute_anonymous- Execute Apex codesf_run_tests- Run test classes/methodssf_test_coverage- Get code coveragesf_apex_jobs- Monitor async jobssf_schedule_apex- Schedule jobs
Tier 2: Code Management
sf_read_apex_class- Read class sourcesf_write_apex_class- Create/update classessf_read_apex_trigger- Read trigger sourcesf_write_apex_trigger- Create/update triggerssf_delete_apex- Delete classes/triggers
Tier 3: Debugging & Monitoring
sf_debug_logs_enable- Enable debug logssf_debug_logs_retrieve- Download logssf_apex_limits- Check governor limitssf_apex_exceptions- View exceptionssf_apex_profiling- Performance profiling
🚀 Quick Start
Prerequisites
- Node.js 22+
- Salesforce org credentials (Production and/or Sandbox)
- Docker (for containerized deployment)
Local Development
# Clone repository
git clone https://github.com/ARJ999/salesforce-god-agent.git
cd salesforce-god-agent
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your Salesforce credentials
# Build
npm run build
# Run locally
npm start
Docker Deployment
# Build image
docker build -t salesforce-god-agent .
# Run container
docker run -p 8080:8080 --env-file .env salesforce-god-agent
🌐 Hostinger VPS Deployment
Prerequisites
- Hostinger VPS with Docker and Traefik configured
- Port 8090 available (check
/opt/PORT_REGISTRY.md)
Deployment Steps
# SSH into Hostinger VPS
ssh root@72.61.173.164
# Clone repository
cd /opt
git clone https://github.com/ARJ999/salesforce-god-agent.git
cd salesforce-god-agent
# Configure environment
cp .env.example .env
nano .env # Add your Salesforce credentials
# Deploy with Docker Compose
docker compose down
docker compose build --no-cache
docker compose up -d
# Check status
docker compose ps
docker compose logs -f --tail=100
# Verify deployment
curl https://salesforce-god-agent-mcp.srv1128277.hstgr.cloud/health
MCP Endpoint
HTTPS URL: https://salesforce-god-agent-mcp.srv1128277.hstgr.cloud/mcp
Health Check: https://salesforce-god-agent-mcp.srv1128277.hstgr.cloud/health
🔧 Configuration
Authentication Methods
1. Username-Password (Recommended for Development)
SF_PROD_AUTH_METHOD=password
SF_PROD_INSTANCE_URL=https://login.salesforce.com
SF_PROD_USERNAME=your-username@example.com
SF_PROD_PASSWORD=your-password
SF_PROD_SECURITY_TOKEN=your-security-token
2. OAuth 2.0 (Recommended for Production)
SF_PROD_AUTH_METHOD=oauth2
SF_PROD_INSTANCE_URL=https://login.salesforce.com
SF_PROD_CLIENT_ID=your-connected-app-client-id
SF_PROD_CLIENT_SECRET=your-connected-app-client-secret
SF_PROD_REFRESH_TOKEN=your-refresh-token
Multi-Org Configuration
Configure both Production and Fullcopy orgs:
# Production
SF_PROD_INSTANCE_URL=https://login.salesforce.com
SF_PROD_USERNAME=prod-user@example.com
SF_PROD_PASSWORD=prod-password
SF_PROD_SECURITY_TOKEN=prod-token
# Fullcopy/Sandbox
SF_SANDBOX_INSTANCE_URL=https://test.salesforce.com
SF_SANDBOX_USERNAME=sandbox-user@example.com.fullcopy
SF_SANDBOX_PASSWORD=sandbox-password
SF_SANDBOX_SECURITY_TOKEN=sandbox-token
# Default org
SF_DEFAULT_ORG=production
📖 Usage Examples
Example 1: Query Records
{
"tool": "sf_query",
"arguments": {
"query": "SELECT Id, Name, Email FROM Contact WHERE CreatedDate = TODAY LIMIT 10",
"orgAlias": "production"
}
}
Example 2: Insert Records
{
"tool": "sf_insert_records",
"arguments": {
"sobject": "Account",
"records": [
{ "Name": "Acme Corp", "Industry": "Technology" },
{ "Name": "Global Inc", "Industry": "Finance" }
],
"orgAlias": "fullcopy"
}
}
Example 3: Execute Apex
{
"tool": "sf_execute_anonymous",
"arguments": {
"code": "System.debug('Hello from Salesforce God Agent!');",
"orgAlias": "production"
}
}
Example 4: Run Tests
{
"tool": "sf_run_tests",
"arguments": {
"testClasses": ["AccountTriggerTest", "ContactTriggerTest"],
"orgAlias": "fullcopy"
}
}
🛠️ Development
Project Structure
salesforce-god-agent/
├── src/
│ ├── connection/ # Multi-org connection management
│ │ └── manager.ts
│ ├── intelligence/ # Best practices & validation
│ │ ├── validator.ts
│ │ └── errorHandler.ts
│ ├── tools/ # Tool implementations
│ │ ├── data/ # Data operations (20 tools)
│ │ ├── apex/ # Apex development (15 tools)
│ │ ├── metadata/ # Metadata management
│ │ ├── security/ # Security & permissions
│ │ ├── users/ # User management
│ │ ├── deployment/ # Deployment & CI/CD
│ │ ├── development/ # Development tools
│ │ ├── monitoring/ # Monitoring & analytics
│ │ ├── integration/ # Integration tools
│ │ └── utilities/ # Utilities & AgentForce
│ ├── types/ # TypeScript type definitions
│ │ └── index.ts
│ ├── utils/ # Utility functions
│ │ └── logger.ts
│ └── index.ts # Main MCP server
├── dist/ # Compiled JavaScript
├── logs/ # Application logs
├── Dockerfile # Container definition
├── docker-compose.yml # Deployment configuration
├── package.json # Dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Adding New Tools
- Create tool function in appropriate category file
- Add tool definition to
src/index.ts - Add routing in call tool handler
- Build and test
Testing
# Run local tests
npm test
# Test specific tool
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"tool": "sf_query", "arguments": {"query": "SELECT Id FROM Account LIMIT 1"}}'
📊 Monitoring
Logs
# View application logs
tail -f logs/combined.log
# View error logs only
tail -f logs/error.log
# Docker logs
docker compose logs -f --tail=100
Health Check
# Local
curl http://localhost:8080/health
# Production
curl https://salesforce-god-agent-mcp.srv1128277.hstgr.cloud/health
🔒 Security
Best Practices
- Never commit
.envfiles to version control - Use OAuth 2.0 for production deployments
- Rotate credentials regularly
- Enable IP restrictions on Salesforce Connected Apps
- Monitor API usage to detect anomalies
- Use HTTPS for all remote connections
Permissions
This MCP server requires super admin level access to perform all operations. Ensure the connected user has:
- System Administrator profile or equivalent
- Modify All Data permission
- Author Apex permission
- API Enabled permission
🚦 Roadmap
Phase 1: Foundation ✅ COMPLETE
- Multi-org connection management
- Intelligence layer (validation, error handling)
- Data Operations (20 tools)
- Apex Development (15 tools)
- Docker deployment
- Hostinger VPS deployment
Phase 2: Expansion (Next)
- Metadata Management (25 tools)
- Security & Permissions (20 tools)
- User Management (15 tools)
- Deployment & CI/CD (15 tools)
Phase 3: Advanced Features
- Development Tools (10 tools)
- Monitoring & Analytics (10 tools)
- Integration (10 tools)
- Utilities & AgentForce (10 tools)
Phase 4: Enhancement
- GraphQL API support
- WebSocket real-time updates
- Advanced caching layer
- Performance optimization
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📝 License
MIT License - see LICENSE file for details
📞 Support
For issues, questions, or feature requests:
- GitHub Issues: Create an issue
- Documentation: See
/docsfolder - Examples: See
/examplesfolder
🙏 Acknowledgments
- Built with JSForce
- Powered by Model Context Protocol
- Deployed on Hostinger VPS
Made with ❤️ for Salesforce Developers, Admins, and Architects
The greatest Salesforce MCP server ever built!