Provides tools for scraping, searching, and extracting content from modern and legacy Salesforce documentation, including the ability to handle deeply nested Shadow DOMs and Lightning Web Components (LWC).
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., "@Unified Salesforce Documentation MCP Serversearch local docs for LWC component lifecycle hooks"
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.
Unified Salesforce Documentation MCP Server
A powerful Model Context Protocol (MCP) server that empowers LLMs to scrape, digest, and search through modern and legacy Salesforce documentation. It elegantly handles deeply nested Shadow DOMs, typical of Lightning Web Components (LWC), and legacy iframe-based documentation structures.
Features
Deep Shadow DOM Piercing: Bypasses 400KB+ of SPA boilerplate on
help.salesforce.comanddeveloper.salesforce.comto extract only the pure article Markdown.Hierarchical Spidering: Automatically queues and scrapes all related pages linked from a central guide using
mass_extract_guide.Offline RAG Capabilities: Chunks and indexes scraped Markdown into a local SQLite database (
docs.db) allowing for instantaneous local search usingsearch_local_docs.
Available Tools
scrape_single_page: Provide a Salesforce documentation URL. The server will use a headless browser (Puppeteer) to load the page, wait for dynamic content, pierce all shadow DOMs, and return clean Markdown.mass_extract_guide: Provide a "Table of Contents" or central guide URL. The server will extract the parent page, find all hierarchical child links, scrape them concurrently, chunk their content, and save them to a local SQLite database for offline querying.search_local_docs: Provide a natural language query (e.g.,LWC lifecycle hooks). The server queries the SQLite database using fuzzy SQL search to instantly return the best matching pre-scraped chunks of documentation.
Quick Start Installation
For anyone downloading this project for the first time:
Clone the Repository:
git clone https://github.com/ttrevisan-ilmn/unified-sf-docs-mcp.git cd unified-sf-docs-mcpInstall Dependencies:
npm installBuild the Project:
npm run build(Note: The server runs from the compiled (Note: To use the tools interactively, integrate this MCP server with an MCP client like Claude Desktop or Cursor.)
Testing
You can use the provided test scripts to verify the core functionality or the scraper against different Salesforce URL layouts:
Integrating with AI Assistants
MCP servers act as a bridge between an LLM and local tools. To actually use this server, you need to plug it into an AI coding assistant like Cursor or Claude Desktop.
1. Claude Desktop
Open the Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following entry to your
mcpServersobject, replacing/PATH/TOwith the absolute path to where you cloned this repository:
Restart Claude Desktop. The tools will now be available when talking to Claude!
2. Cursor
Open Cursor Settings -> Features -> MCP
Click + Add new MCP server
Configure the settings:
Type:
commandName:
unified-sf-docsCommand:
node /PATH/TO/unified-sf-docs-mcp/dist/index.js(Be sure to use the absolute path)
Click Save. Cursor will connect to the server and surface the 3 new tools to Cursor Agent.