What is MCP?
MCP (Model Context Protocol) standardizes how AI assistants like Slackbot, Claude, or Cursor connect to external tools and data sources. It enables AI assistants to access fresh information from websites, databases, and services in real time.
What is Trailhead MCP?
Trailhead MCP is a free, open MCP server that connects your AI assistant to all of Trailhead's learning material. When you ask your AI agent questions about Salesforce topics — like "Tell me about Agentforce's architecture" or "What does Flow help with?" — it can find and show you the actual Trailhead content, right where you're already working. No need to open new browser tabs, copy and paste information, or worry about hallucinations.
Who is this for?
Trailhead MCP is designed for :
- Enablement teams who are building learning experiences powered by Trailhead content
- Trailblazers who want on-demand learning content surfaced in their AI tools
- Salesforce Developers & Admins who use Claude, Cursor, or VS Code in their daily workflow
- AI Agent builders whose teams are building agents that need to ground responses in trusted Trailhead content
What can it do?
Trailhead MCP gives you two simple tools to access its content directly in your AI assistant:
- fetch_content — Retrieves full badge or trail content by name, returned in Markdown format optimized for LLMs.
- content_search — Search for learning materials by topic across all of Trailhead's public content. This finds Badges, Trails, Trailhead Journeys, and Superbadges. You can filter by role (e.g. Administrator, Developer, Architect) and skill level (Foundational, Intermediate, or Advanced). This saves you time browsing through hundreds of badges and trails to find what's relevant.
Trailhead MCP Constraints
It's important to note that Trailhead MCP isn't meant to replace the full, interactive Trailhead experience you get on trailhead.com with its structured learning paths and gamification features. You won't be able to earn badges or track your learning progress through the MCP, nor does it access any of your private learner data or account information in its current form.
Supported clients
- Slackbot
- Agentforce
- Claude / Claude Code
- Cursor
- Any MCP-compatible client using Streamable HTTP
Server endpoint
https://mcp.trailhead.salesforce.com/mcp
The server is always running — there is nothing to host or deploy.
Authentication & access
No authentication required to access public Trailhead content (current state)
Content scope
The Trailhead MCP provides access to publicly available badges and trails, with Trailhead Journeys and Superbadges coming soon. Content refreshes daily to ensure you have the most up-to-date learning materials.
Get started: Slackbot
Before you begin
You'll need access to a Slack workspace where Trailhead MCP is available. The Trailhead MCP app must be enabled for your workspace by your Slack admin.
Add Trailhead MCP to Slack Workspace
- Visit https://api.slack.com/apps , and if you have enough power within your workspace you should see a Create New App button.
- Click Create New App and select From a Manifest
- Pick your workspace then click Next
- On the Create app from Manifest modal, enter the following manifest JSON:
manifest.json
{
"display_information": {
"name": "Trailhead MCP App",
"description": "Interact with Trailhead via MCP",
"background_color": "#1d7c00"
},
"features": {
"bot_user": {
"display_name": "Trailhead MCP App",
"always_online": false
}
},
"oauth_config": {
"scopes": {
"bot": [
"mcp:connect",
"commands"
]
},
"pkce_enabled": false
},
"settings": {
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false,
"is_mcp_enabled": true
},
"mcp_servers": {
"Trailhead MCP": {
"url": "https://mcp.trailhead.salesforce.com",
"auth_type": "no_auth"
}
}
}
- On the
Review summary & create your appmodal, review all the settings, then click Create Enable Trailhead MCP in Slackbot - Open any conversation with Slackbot (or start a new DM)
- Click the App integrations icon in the message composer — refresh Slack first if you don't see it (
Cmd+Shift+Ron Mac,Ctrl+Shift+Ron Windows/Linux) - Find Trailhead MCP and click to add it
- For best results: go to Manage Apps → Trailhead MCP → set all tools to "Always allow"
Verify it's working
In your Slackbot DM, try:
- "Use Trailhead MCP to find beginner content on Salesforce Flow."
Tips for best results
- Setting tools to "Always allow" prevents Slackbot from asking for permission on every request
- Being explicit — "Use Trailhead MCP to..." — ensures Slackbot routes to the right tool
Get Started: Agentforce
Overview
Trailhead MCP can be used to ground Agentforce agents in trusted Trailhead content — enabling agents to answer learning questions with cited, up-to-date material.
Add Trailhead MCP
- In Setup for your org, in the Quick Find box, search for
MCPand click Registered MCP Servers - On the Agentforce Registry page, click New + and in the dropdown click Register MCP Server
- On the Create Connection modal
- Set the MCP Server Name and Description to provide details about what this connection will be used for.
- Set the Server URL to be
https://mcp.trailhead.salesforce.com/mcp - Set Authentication Method to be
No Authentication - Click Create and Continue
- On the next section, Tools, click the Add Tool button to any of the tools you will the use
- Click Allow and Continue
- On the next section, Select policies (Optional), select any applicable policies for your use case.
- Click Save
Recommended use cases
- Help desk agents grounded in Trailhead best practices content
- Onboarding agents that guide new employees to the right Trailhead content
- Enablement agents that answer product questions by citing official Trailhead modules
Get Started: Claude & Claude Code
Before you begin
You'll need Claude Desktop, Claude Code, or the Claude CLI installed.
Add Trailhead MCP
Claude Code / Claude CLI — run this in your terminal:
claude mcp add trailhead --transport http https://mcp.trailhead.salesforce.com/mcp --scope user
The --scope user flag makes the server available across all your Claude Code projects.
Claude Desktop:
- Open Claude Desktop → Settings → Developer → Edit Config
- Add the following to your
claude_desktop_config.json:
claude_desktop_config.json
{
"mcpServers": {
"trailhead": {
"type": "http",
"url": "https://mcp.trailhead.salesforce.com/mcp"
}
}
}
- Save and restart Claude Desktop
Verify it's working
Try one of these prompts:
- "What does Trailhead say about Apex bulkification best practices?"
- "Find me Trailhead content on Agentforce for beginners."
- "Pull the Einstein Trust Layer badge content and summarize it."
You should see Trailhead content cited in the response. If the AI answers from general knowledge without citing Trailhead, see the Get Help section.
Tips for best results
- Be explicit: "Use Trailhead MCP to find..." helps Claude route to the right tool
- See the Prompting Guide section for more
Get Started: Cursor
Before you begin
You'll need Cursor installed. Download Cursor.
Add Trailhead MCP
- Click this link to have cursor automagically add the MCP
Verify it's working
Open a new Composer window (⌘+I) and try:
- "Search Trailhead for content on Flow best practices for admins."
Tips for best results
- See the Prompting Guide section for more
- Trailhead MCP works best in Agent mode in Cursor Composer
- Specify role and level for more targeted results (e.g., "Trailhead content on LWC for developers, intermediate level")
Prompting Guide: Get the Most Out of Trailhead MCP
Trailhead MCP is a search and retrieval tool — the quality of what you get back depends a lot on how you ask.
The two tools and when to use them
content_search— Use for discovery. Great when you know the topic but not the exact badge or trail name. Example: "Find Trailhead content on Apex testing best practices."fetch_content— Use when you know exactly what you want. Pulls the full module content. Example: "Fetch the 'Apex Triggers' Trailhead badge content."
If your AI keeps using content_search when you want full content, be explicit: "Use fetch_content to retrieve..."
Filter by role and level
Both tools support filtering — and using them meaningfully improves results.
- Roles: Administrator, Developer, Architect, Marketer, Business Analyst, Consultant
- Levels: Foundational, Intermediate, Advanced
Example: "Find Trailhead content on data modeling for Architects at the Advanced level."
Sample prompts by persona
Developer
- "What does Trailhead say about Apex bulkification best practices?"
- "Find all Trailhead content related to LWC and explain the key concepts."
- "Pull the SOQL and SOSL Trailhead content and summarize the differences."
Admin
- "What Trailhead badges should a new Salesforce Admin start with?"
- "Find Trailhead content on Salesforce Flow for beginners."
- "Search Trailhead for content on Reports and Dashboards."
Architect
- "Search Trailhead for content on Salesforce data architecture at the Advanced level."
- "Pull the Einstein Trust Layer badge and give me a technical breakdown."
- "Find all Trailhead content on integration patterns and APIs."
Agent builder
- "Find all Trailhead content related to Agentforce and AI."
- "What does Trailhead say about prompt engineering for Salesforce?"
- "Fetch the 'Get Started with Agentforce' content and summarize the key concepts for a developer audience."
What to do when results seem off
- No results: Try alternate keywords — "Flow" vs. "Salesforce Flow" vs. "process automation" may return different results
- Outdated results: Content refreshes daily. Try again the next day, or use
fetch_contentwith the exact name - AI answers from general knowledge: Add "Use Trailhead MCP to..." at the start of your prompt
Using Trailhead MCP in agent configurations
If you're building an agent and want it to always use Trailhead MCP for Salesforce learning questions, add this to your system prompt or copilot-instructions.md:
When answering questions about Salesforce products, features, or best practices, always use the Trailhead MCP content_search or fetch_content tools to retrieve up-to-date, trusted Trailhead content. Cite the badge or trail name in your response.
Privacy & Data Handling
What content is served
All content returned by Trailhead MCP is publicly available Trailhead content — the same content any visitor can access on trailhead.com without logging in. No private learner data, account information, or personalized content is included.
Authentication
No authentication is required
Our Data Commitments
- Trailhead MCP will not sell or share your data with third parties
- Trailhead MCP will not store, collect, or retain your queries or prompts
- Trailhead MCP will not use your interactions to train AI models
- Trailhead MCP will not access, read, or modify your Trailhead account, badges, or points
FAQ
Yes — free to use with no account required to access public content.
No. All available Trailhead content is accessible without authentication.
You can't earn badges or track your progress through the MCP. Log in to Trailhead.com to access our gamification and personalized content.
- Content refresh: The knowledge service refreshes daily. Very recently published content may not appear yet.
- Alternate phrasings: The search is keyword-based. Synonyms matter — try "Flow" vs. "Salesforce Flow".
- Use
fetch_contentdirectly: If you know the exact badge or trail name, ask your AI to retrieve it by name.
Once per day.
All Trailhead content is in scope including badges (modules/units), trails, Trailhead Journeys, and Superbadges.
No. Trailhead MCP is read-only. It does not store queries, prompts, or any user data. See the Privacy & Data Handling section for details.
Any MCP-compatible client using Streamable HTTP should work including: Slackbot, Agentforce, Claude / Claude Code, Cursor, and VS Code (with GitHub Copilot).
Make sure your Cursor client is up to date and the MCP server URL is entered correctly in Settings → MCP.
See the Get Help section below.
Get Help
Self-service troubleshooting
Check the FAQ above first — it covers the most common issues including content not found, 405 errors, and client-specific setup problems.
Per-client troubleshooting
- Claude Code: Verify your command includes --transport http and --scope user
- Cursor: Confirm the URL is entered correctly in Settings → MCP
- VS Code: Confirm your MCP settings JSON is valid and VS Code has been reloaded
- Slackbot: Try refreshing Slack (Cmd+Shift+R / Ctrl+Shift+R) if the MCP connector icon isn't visible
Report an issue or give feedback
- Navigate to https://help.salesforce.com/s/cases
- Select Ask Agentforce
- Submit your case details via Agentforce
Important: Always state up front that your issue relates to Trailhead MCP. This support path covers all Trailhead product and content offerings, so calling out "Trailhead MCP" immediately helps the team route and triage your case correctly.
For the fastest resolution, structure your case using this format:
Product: Trailhead MCP Client: [e.g. Claude Desktop v1.2.3, Cursor 0.45, Slackbot]
Prompt used: [the exact prompt or query you ran]
Expected behavior: [what you expected to happen]
Actual behavior: [the error message or unexpected result you saw]
Reproducibility: [Always / Intermittent / One-time]
Additional notes: [anything else relevant, e.g. recent setup changes]