sf-architect-mcp
Scrapes, indexes, and serves Salesforce Architect documentation locally, enabling fast offline search and retrieval via RAG-powered keyword search with section and language filters.
Click on "Deploy 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., "@sf-architect-mcp search architect docs for 'data modeling'"
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.
SF Architect MCP
An MCP server that scrapes, indexes, and serves the Salesforce Architect documentation locally — enabling fast, offline, RAG-powered search and retrieval for AI coding assistants.
Built with Model Context Protocol, cheerio, SQLite, and Turndown.
What it does
Scrapes
architect.salesforce.comusing fetch + cheerio (the site is server-side rendered)Indexes content into a local SQLite database with section-aware chunking
Searches using multi-term keyword scoring with section and language filters
Supports 17 languages mirroring the site's locale structure
Exposes MCP tools, resources, and prompts so your AI assistant can navigate and query the docs naturally
Related MCP server: Unified Salesforce Documentation MCP Server
Prerequisites
Node.js ≥ 18
No browser binary required — scraping uses plain HTTP requests
Installation
git clone https://github.com/morettimarco/salesforce_architect_MCP.git
cd salesforce_architect_MCP
npm install
npm run buildThe compiled server will be at dist/index.js.
Setup in your coding agent
Replace /absolute/path/to/sf-architect-mcp with the actual path where you cloned this repo.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"sf-architect": {
"command": "node",
"args": ["/absolute/path/to/sf-architect-mcp/dist/index.js"]
}
}
}Claude Code (CLI)
claude mcp add sf-architect node /absolute/path/to/sf-architect-mcp/dist/index.jsOr edit ~/.claude/settings.json (global) or .claude/settings.json (project-level):
{
"mcpServers": {
"sf-architect": {
"command": "node",
"args": ["/absolute/path/to/sf-architect-mcp/dist/index.js"]
}
}
}Cursor
Edit .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global):
{
"mcpServers": {
"sf-architect": {
"command": "node",
"args": ["/absolute/path/to/sf-architect-mcp/dist/index.js"]
}
}
}Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sf-architect": {
"command": "node",
"args": ["/absolute/path/to/sf-architect-mcp/dist/index.js"]
}
}
}VS Code (GitHub Copilot)
Edit .vscode/mcp.json in your workspace:
{
"servers": {
"sf-architect": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/sf-architect-mcp/dist/index.js"]
}
}
}First-time setup
Once the server is running in your agent, use the scrape-docs prompt or call the tool directly:
scrape_full → language_filter: "en" (or your preferred language)This fetches the sitemap, scrapes all pages with Puppeteer, converts them to Markdown, and stores them in a local SQLite database at ~/.sf-architect-mcp/sf-architect.db.
A full English scrape takes roughly 2–3 minutes (≈ 115 pages, 3 concurrent requests).
Tools
Tool | Description |
| Wipe the database and re-scrape everything from scratch |
| Scrape only new, changed, or previously failed pages |
| Keyword search across indexed content with relevance scoring |
| Read a page's full Markdown content by URL (supports |
| Lightweight summary: title, headings, word count, 500-char preview |
| Page count, total words, and title list for a section |
| List all indexed sections with page counts |
| Export a full section to a single Markdown file on disk |
| Database stats: page counts, sections, last run, pending/failed URLs |
Resources
Attach these to your conversation context for orientation:
URI | Description |
| Recommended workflows and tool usage tips |
| All supported language codes with display names |
| Live section index with current page counts |
Prompts
Pre-built workflow templates:
Prompt | Arguments | What it does |
|
| Presents available languages, asks which to scrape, then runs the appropriate tool |
|
| Searches, summarizes relevant pages, and synthesizes findings with citations |
|
| Verifies the section exists, shows a summary, then exports to Markdown |
Supported languages
Code | Language |
| English (default) |
| German |
| French |
| Japanese |
| Chinese (Simplified) |
| Chinese (Traditional) |
| Danish |
| Spanish |
| Finnish |
| Italian |
| Korean |
| Dutch |
| Norwegian |
| Portuguese (Brazil) |
| Russian |
| Swedish |
| Spanish (Mexico) |
| All languages |
Note: Not all languages are available for all sections. The sitemap at scrape time determines what's actually published.
Configuration
The database is stored at ~/.sf-architect-mcp/sf-architect.db by default.
Override with an environment variable:
SF_ARCHITECT_DB_DIR=/custom/path node dist/index.jsExported markdown files go to ~/.sf-architect-mcp/exports/{section}-{language}.md unless you specify a custom path.
Architecture
src/
├── index.ts # MCP server — tools, resources, prompts
├── scraper.ts # fetch + cheerio scraper, concurrency pool
├── sitemap.ts # Sitemap fetching and URL filtering
├── types.ts # Shared TypeScript types
├── db/
│ ├── database.ts # sql.js SQLite, persistence, schema
│ ├── ingest.ts # Page upsert, chunk sync, scrape run tracking
│ └── queries.ts # Search, read, export, stats
└── utils/
├── chunker.ts # Section-aware text chunking (1500 chars, 200 overlap)
└── url-utils.ts # Language detection from URL path segmentsKey design decisions:
fetch + cheerio — the site is fully server-side rendered, no headless browser needed. ~10x faster and cross-platform with zero native dependencies
sql.js (WASM SQLite) — in-process, zero native dependencies, serialized to disk after every 10 pages
Section-aware chunking — detects both Markdown headings and bold-text markers (
**Definition:**) which the site uses instead of semantic HTML headingsLRU cache on search results (500 entries, 5-minute TTL)
Content hash comparison for incremental scraping — only re-indexes pages whose content has actually changed
License
MIT
Available Tools
9 toolsexport_architect_sectionA
Export all pages in a section as a single concatenated markdown file. Writes to disk with zero context window cost. When output_path is omitted, defaults to ~/.sf-architect-mcp/exports/{section}-{language}.md.
Inputs: section (required), language, output_path.
get_scrape_statusA
Get the current status of the indexed database: total pages, chunks, sections breakdown, last scrape run info, and pending/failed URL counts.
Inputs: no named parameters.
get_section_summaryA
Get a quick overview of a section: page count, total word count, and list of page titles. Useful for orientation before exporting or reading individual pages.
Inputs: section (required), language.
list_architect_sectionsB
List all indexed sections with page counts and titles. Optionally filter to a specific section.
Inputs: section, language.
read_architect_pageA
Read the markdown content of a specific indexed Salesforce Architect page by its URL. Use max_chars to limit output size. For a lightweight overview without full content, prefer read_architect_page_summary instead.
Inputs: url (required), max_chars.
read_architect_page_summaryA
Get a lightweight summary of an indexed page: title, section, word count, section headings, and a short preview (~500 chars). Use this to understand a page before deciding to read the full content.
Inputs: url (required).
scrape_fullA
Full refresh: wipe all indexed data, re-fetch the sitemap from architect.salesforce.com, and re-scrape and reindex every page. Use this for initial setup or when you want a clean slate.
Inputs: concurrency, language_filter.
scrape_incrementalA
Incremental scrape: fetch the sitemap, scrape any new pages not previously indexed, retry previously failed pages, and re-check existing pages for content changes. Only re-indexes pages whose content has actually changed.
Inputs: concurrency, language_filter.
search_architect_docsA
Search the locally indexed Salesforce Architect documentation. Returns ranked results with excerpts. The database must be populated first via scrape_full or scrape_incremental.
Inputs: query (required), section, max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools target distinct operations (scrape, search, read, export, status). The only real overlap is between get_section_summary and list_architect_sections, which both return section page counts and titles, and read_architect_page vs read_architect_page_summary, though the latter pair is clearly differentiated by the descriptions.
All nine tools follow a consistent snake_case verb_noun pattern (scrape_full, search_architect_docs, read_architect_page, export_architect_section, get_scrape_status). Resources and prefixes (architect, section, scrape) are used predictably.
Nine tools is well-scoped for a documentation indexing/retrieval server, covering ingestion (2 scrape modes), discovery (sections), retrieval (search, read, read summary), export, and status with no redundancy.
The surface covers the full lifecycle: full/incremental ingestion, status monitoring, section listing and summaries, search, page reading, and export. No obvious dead ends, and scrape_full handles the reset case that a delete tool would otherwise cover.
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Serves your design system and coding standards to coding agents, so they stop guessing.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Scrape, crawl, map & search the web. Open-source, self-hostable Rust crawler & search for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server that enables intent-based searching across over 350 official Salesforce developer documents and release notes. It allows users to retrieve API references, code examples, and technical documentation directly through natural language queries.22MIT
- AlicenseAqualityDmaintenanceEnables LLMs to scrape, index, and search modern and legacy Salesforce documentation by piercing complex Shadow DOM and iframe structures. It supports hierarchical spidering of entire guides and local RAG capabilities using a SQLite database for offline querying.531 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables Salesforce developers to create code and configuration using local documentation, with optional semantic search.9 npm1MIT
- AlicenseNot gradedqualityDmaintenanceProvides local technical documentation with hybrid search (semantic + BM25) for AI agents, ensuring access to up-to-date framework docs.MIT