Loading
Scalability
Use ApexGuru in Agentic IDEs with DX MCP

Use ApexGuru in Agentic IDEs with DX MCP

Resolve Apex performance issues directly in environments like VS Code, Agentforce Vibes, and Cursor without switching to the Salesforce UI.

In Salesforce DX MCP Server and Tools, ApexGuru analyzes your Apex classes within your preferred IDE to identify performance antipatterns and production run-time impact. It provides prioritized recommendations including the antipattern type, line number, code snippet, and fix.

  1. Review the GitHub README file for detailed setup instructions, commands, and code samples.
  2. Install Node.js (v18 or later).
  3. Authenticate your org: sf org login web.
  4. Set your default org: sf config set target-org <alias>.
  5. Configure the Scale Products toolset: Add the @salesforce/mcp server to your IDE’s MCP settings using the --toolsets scale-products argument.
  6. Ask your IDE agent to scan a class. For example: Scan OrderHandler.cls for performance antipatterns using scan_apex_class_for_antipatterns.
Key Tasks
Key Tasks
Task Description
Scan for Antipatterns Use scan_apex_class_for_antipatterns to detect issues like SOQL without WHERE clauses or expensive getGlobalDescribe() calls.
Get Run-time Insights Enable ApexGuru in your Production or Full Copy org. The tool uses production data to prioritize issues.
Use Best Practices Limit enabled toolsets to scale-products for better performance. Reference the tool name explicitly in prompts.
Troubleshoot Verify your org authentication. Configure the scale-products toolset in your IDE's MCP settings.
 
Загрузка
Salesforce Help | Article