---
schema_version: "1"
id: 9a20853b43671c50bd29c06cfedf5b6fcd92faf6650712775c2ef6b658385076
title: Use ApexGuru in Agentic IDEs with DX MCP
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/apexguru_salesforce_dx_mcp.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.apexguru_salesforce_dx_mcp.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d6e9ca6ffe9fcafe0a4b94d35881da3f65c80a244e12e1edee9d0db1f9a92c7d
description: Resolve Apex performance issues directly in environments like VS Code, Agentforce Vibes, and Cursor without switching to the Salesforce UI.
products:
  - Cross Cloud
release: "264"
---
# 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](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_mcp.htm), 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.

If your org is onboarded to ApexGuru (Production or Full Copy Sandbox), findings include real production runtime metrics. Otherwise, the tool returns static analysis only.

1. Review the [GitHub README](https://github.com/salesforcecli/mcp/blob/main/packages/mcp-provider-scale-products/README.md) 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-scalability-264-0-0-production-enus/18f3af65-f4ea-4406-9c30-319b9afa03cd/images/icon_example.png)

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. |