Apex Log MCP Server
OfficialThis server gives AI assistants tools to analyze Salesforce Apex debug logs, surfacing performance bottlenecks, slow methods, and governor limit usage.
Analyze Apex Log Performance (
analyze_apex_log_performance): Rank methods in an Apex debug log by self-execution time, returning method names, durations (in ms), SOQL/DML counts, and optimization recommendations. Supports filtering by namespace, minimum duration, and limiting results.Get Apex Log Summary (
get_apex_log_summary): Retrieve a high-level overview of an Apex debug log, including total execution time, method count, SOQL/DML totals, governor limits, and active namespaces — ideal for a quick assessment before deeper analysis.Find Performance Bottlenecks (
find_performance_bottlenecks): Check whether a transaction is approaching Salesforce governor limits (flags usage above 80%), analyzing CPU time, SOQL/DML limits, query rows, and method execution patterns by namespace. Supports focused analysis types:cpu,database,methods, orall.Execute Anonymous Apex (
execute_anonymous): Execute Apex code against an authenticated Salesforce org, save the debug log, and provide a summary for subsequent detailed analysis with other tools. (Described in the README but may not be present in the current server schema.)
Provides tools to analyze Salesforce Apex debug logs for performance bottlenecks, slow methods, and governor limit usage, and allows executing anonymous Apex against Salesforce orgs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Apex Log MCP ServerFind the top 5 slowest methods in this debug log and their durations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apex Log MCP Server
A Model Context Protocol (MCP) server that gives AI assistants tools to analyze Salesforce Apex debug logs — surfacing performance bottlenecks, slow methods, and governor limit usage.
Give your AI assistant — Claude, Copilot, or any MCP-compatible client — the ability to parse Apex debug logs and surface the performance insights that matter. Instead of scrolling through thousands of log lines, ask your assistant to find what's slow and why.
Powered by the same powerful log parser as the Apex Log Analyzer VS Code extension used by thousands of Salesforce developers.
Quick Start | What You Can Do | Tools Reference | Configuration | How It Works | Documentation | Contributing | Contributors | License
Quick Start
Requirements: Node.js 22 or later.
The execute_anonymous tool additionally needs an org authenticated with the Salesforce CLI.
Add to your MCP client configuration (claude_desktop_config.json, VS Code mcp.json, etc.):
{
"mcpServers": {
"apex-log-mcp": {
"command": "npx",
"args": ["-y", "@certinia/apex-log-mcp"]
}
}
}That's it. Open a conversation and ask your AI assistant to analyze an Apex debug log.
Related MCP server: Log Reader MCP
What You Can Do
Ask your AI assistant to work with Apex debug logs using natural language:
"Give me a summary of this debug log"
"Show me the 5 slowest methods in the default namespace"
"Are we approaching any governor limits in this transaction?"
"Run this Apex against my scratch org and analyze the performance"
Tools Reference
analyze_apex_log_performance
Rank methods in an Apex debug log by self-execution time. Returns method names, durations (in ms), SOQL/DML counts, and optimization recommendations. Best for finding which specific methods to optimize.
Parameter | Type | Required | Description |
| string | Yes | Absolute path to the Apex debug log file (.log) |
| number | No | Number of slowest methods to return (default: 10) |
| number | No | Minimum duration in milliseconds to include a method (default: 0) |
| string | No | Filter methods by namespace |
get_apex_log_summary
Get a high-level summary of an Apex debug log including total execution time (in ms), method count, SOQL/DML totals, governor limits, and active namespaces. Best for a quick overview before deeper analysis.
Parameter | Type | Required | Description |
| string | Yes | Absolute path to the Apex debug log file (.log) |
find_performance_bottlenecks
Check whether an Apex log transaction is approaching governor limits (flags usage above 80%). Analyzes CPU time, SOQL/DML limits, query rows, and method execution patterns by namespace. Best for checking if a transaction is at risk of hitting governor limits.
Parameter | Type | Required | Description |
| string | Yes | Absolute path to the Apex debug log file (.log) |
| string | No | Type of analysis (default: |
analysisType values:
Value | Description |
| Checks CPU time governor limit |
| Checks SOQL query, DML statement, and query row limits |
| Groups methods by namespace with duration totals |
| Runs all three analysis types (default) |
execute_anonymous
Executes anonymous Apex code against any authenticated Salesforce org. Saves the resulting debug log to a local file and returns a summary with the file path. Use the file path with get_apex_log_summary, analyze_apex_log_performance, or find_performance_bottlenecks for deeper analysis.
Parameter | Type | Required | Description |
| string | Yes | The anonymous Apex to be executed |
| string | No | Alias or username of the target Salesforce org. Uses the project default if not specified. |
| string | No | Directory to save the debug log file. Defaults to |
| string | object | No | Trace-flag log levels — see the options below. Omit to keep the current config. |
debugLevel options — omit to keep the current config, or pass one of:
"default"— reset every category to its default.a log level (e.g.
"FINEST") — set every category to that level.an object — override specific categories only; the rest keep their defaults:
{ "database": "FINEST", "apexCode": "FINE" }
Valid levels: NONE, ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST.
Category | Default Level |
| FINE |
| FINE |
| DEBUG |
| FINEST |
| INFO |
| DEBUG |
| DEBUG |
| FINE |
| INFO |
| FINE |
Example prompts:
"Execute this Apex and show me the log:
System.debug('Hello');""Run a query for all Accounts and analyze the performance"
"Execute this Apex with all debug levels set to FINEST"
"Run this Apex against my QA org with database logging set to FINEST"
Note: Requires
--allowed-orgsto be configured. Uses the project's default org unlesstargetOrgis specified. The debug log is saved to a local file (default:.apex-log-mcp/) and the response includes the file path, org username (and alias, if set), and execution summary. Add.apex-log-mcp/to your.gitignoreto avoid committing debug logs.
Configuration
The Quick Start configuration is all you need for log analysis tools. The sections below cover enabling execute_anonymous.
Enabling execute_anonymous
The execute_anonymous tool is disabled by default. To enable it, pass --allowed-orgs with a comma-separated list of allowed orgs:
{
"mcpServers": {
"apex-log-mcp": {
"command": "npx",
"args": [
"-y",
"@certinia/apex-log-mcp",
"--allowed-orgs",
"ALLOW_ALL_ORGS"
]
}
}
}Allowed org tokens
Token | Description |
| Permits execution against any authenticated org |
| Resolves the project/global default |
| Resolves the project/global default |
You can also pass org usernames or aliases directly:
"args": ["-y", "@certinia/apex-log-mcp", "--allowed-orgs", "dev@example.com,my-scratch-org"]How It Works
This server implements the Model Context Protocol (MCP) to expose Apex log analysis as tools that any MCP-compatible AI client can call.
Runs as a local process — your AI client spawns the server and communicates locally. No network requests, no API keys.
Uses the same parser as the Apex Log Analyzer VS Code extension — battle-tested parsing of the Apex debug log format.
Returns structured data — all durations in milliseconds, governor limits as used/limit pairs, methods with SOQL/DML counts — so your AI assistant can reason about the results.
Documentation
Related Projects
Apex Log Analyzer VS Code Extension — Full-featured Apex log analyzer for VS Code
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Developing — Set up your development environment
Code of Conduct — Community guidelines
Contributors
Thanks to our amazing contributors!
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server for AI-powered log analysis that enables parsing, searching, and debugging across nine log formats directly within Claude. It features automated error extraction, sensitive data scanning, and streaming support for large log files.Last updated145MIT
- Alicense-qualityCmaintenanceAn MCP server that provides AI assistants with direct access to application logs for on-demand searching, filtering, and analysis. It enables tools like Cursor to summarize log entries and identify errors within the development environment to streamline debugging.Last updated307MIT
- Alicense-qualityDmaintenanceMCP server that analyzes AI agent session logs to find token waste and optimization opportunities.Last updated29MIT

flyto-indexerofficial
Alicense-qualityAmaintenanceMCP server that gives AI assistants impact analysis, cross-project reference tracking, and code health scoring.Last updated4Apache 2.0
Related MCP Connectors
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/certinia/debug-log-analyzer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server