
Salesforce Metadata Mcp
io.github.semwalajay83-sem由 GitHub 帳號 semwalajay83-sem 發布v3.2.0更新於 Nov 4, 2026
The only Salesforce MCP with Agentforce, OmniStudio & DevOps Center tools — 228 total.
概覽
本機 MCP 伺服器,為助理提供 228 個工具,用來在 Salesforce 組織中建立、設定與部署中繼資料、Apex、Flow、Agentforce 與 OmniStudio。
- 可以做什麼
- 建立與更新物件、欄位、記錄類型、頁面配置、驗證規則與共用規則
- 建立自動化:Flow、簽核流程、工作流程動作、指派規則與升級規則
- 撰寫並部署 Apex 類別、觸發程序與測試類別,執行測試、執行匿名 Apex、讀取偵錯記錄並做靜態分析
- 部署、擷取與刪除中繼資料,管理變更集並查看部署狀態
- 設定安全性與存取:權限集、角色、佇列、具名憑證,稽核欄位層級安全性
- 建立 Agentforce 代理、主題與動作,OmniStudio 元件、DevOps Center 流程、LWC、Experience 網站與外部整合
- 適用情境
- 適合在 Salesforce 組織上進行管理或開發、希望助理以自然語言建立中繼資料、部署程式碼、檢視結構或設定 Agentforce 與 OmniStudio 的情境,尤其在沙箱或 scratch 組織中。
- 執行需求
- 透過 npx 或全域 npm 安裝以 stdio 在本機執行(需要 Node.js),也可使用 Docker 映像。需要 SF_INSTANCE_URL,並擇一認證方式:SF_ACCESS_TOKEN、搭配 Salesforce CLI 的 SF_ALIAS,或 SF_CLIENT_ID、SF_CLIENT_SECRET、SF_REFRESH_TOKEN 等 OAuth/JWT 變數。需要連線到組織的網路。可選 SF_TOOLSETS 與 SF_PRODUCTION_GUARD。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Salesforce Metadata Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
salesforce-metadata-mcp
[npm version] [npm downloads] [License: MIT] [MCP Compatible]
The only Salesforce MCP server that builds Agentforce agents, OmniStudio components, and DevOps Center pipelines — alongside a complete daily developer loop (schema describe, Apex read, debug logs) and 228 tools total for building, configuring, and automating Salesforce orgs directly from Claude or any MCP client.
Quick Start
Or install globally:
Configuration (Claude Desktop / Claude Code)
Add to your MCP configuration (claude_desktop_config.json or .claude/settings.json):
See SETUP.md for all authentication methods and detailed setup instructions.
One-click install (Claude Desktop)
Download salesforce-metadata-mcp-<version>.mcpb from the latest release, then drag it into Claude Desktop → Settings → Extensions. It prompts for your org URL and credentials — no JSON editing.
The bundle resolves the server from npm at launch rather than embedding a copy, so it always runs the current published version and never needs re-downloading after an upgrade.
Docker
The image builds from source, runs as a non-root user, and ships production dependencies only. Because this server speaks MCP over stdio, -i is required — the container is driven by its client, not run as a background service. SF_ALIAS will not work in a container: the Salesforce CLI's login flow needs a browser, so use token, JWT, refresh-token, or client-credentials variables instead.
Toolsets — loading 228 tools without burning your context
All 228 tools are always available. Most are not loaded into the model's context until something asks for them.
Listing every tool up front costs roughly 98,000 tokens — about half a 200k context window, spent before you type anything, whether or not the session ever touches OmniStudio or DevOps Center. A 228-candidate tool list also makes the model measurably worse at picking the right tool. So the server starts with a small core loaded and pulls in the rest on demand:
The default covers what nearly every session needs: describe/list objects, SOQL query, deploy/retrieve/delete metadata, deploy status, and core schema creation (objects, fields, formula fields, picklist values, validation rules, approval processes).
Five tools are always present and make everything else reachable:
sf_find_tool— search all 228 tools by name and load whatever contains the matches, in one call. Ask for "create an omniscript" and it finds the tools, loadsomnistudio, and they are callable immediately. This is usually all you or the model needs.sf_load_toolset— load named toolsets explicitly.sf_list_toolsets— browse all toolsets, their tool counts, and what is loaded.sf_call_tool— invoke any tool by name, loaded or not, without it having to appear in the tool list first. Arguments are validated and the production guard applies exactly as on a direct call.sf_tool_schema— return any tool's input schema, sosf_call_toolcan be constructed for a tool the client cannot see.
In practice you don't manage this by hand: ask for what you want, and the model loads what it needs.
If loaded tools don't show up
Loading a toolset enables it on the server and emits notifications/tools/list_changed. A client is
supposed to re-fetch tools/list when it sees that. Some clients don't — and when that happens, the
load reports success, the tools really are enabled, and the model still cannot call any of them
because they never entered its tool list.
Two things handle this, so no client can lose access to a tool:
sf_load_toolsetchecks whether the client re-fetched and says so in its response, instead of reporting an unqualified success for tools that have become unreachable.sf_call_toolreaches every tool without needing a re-fetch at all. Combined withsf_tool_schema, the full 228-tool surface is usable from the handshake tool list alone — even underSF_TOOLSETS=none.
To restore the previous behaviour of loading everything at startup, set SF_TOOLSETS=all. To start
with only the five meta-tools, set SF_TOOLSETS=none. To pick your own core, pass a list:
Available toolsets: core, metadata, objects, data, flows, automation, security, apex,
lwc, ui, pages, actions, agentforce, omnistudio, omnichannel, devops, deployment,
integrations, identity, reports, experience, admin, monitoring, audit, einstein,
knowledge, cpq, sandbox, streaming, visualforce, aura, comms, mcp, i18n.
Flow tools live in their own flows toolset because sf_create_flow carries the full Flow element
schema — 15,266 bytes (~4,126 tokens) on its own, the largest tool definition in the server. Keeping
it out of the default means sessions that never build a Flow never pay for it, while sessions that do
still get the complete validated schema.
Tools — 228 total
Highlights below; see TOOLS.md for the complete reference with parameters and example prompts.
Objects & Fields
Automation
Security & Access
UI & Experience
Apex Development
LWC Development
Experience Cloud
Agentforce
External Integrations
Change Sets & Deployment
MCP Server Management
Example Prompts
Build a complete object:
"Create a custom object called Project__c with fields: Name (text), Status__c (picklist: Planning/Active/Complete), Budget__c (currency), then add a validation rule requiring Budget when Status is Active."
Deploy Apex:
"Create an Apex class called OpportunityService that queries all Opps with Amount > 100000. Then create a test class for it."
Create a flow:
"Create a record-triggered flow on Opportunity that fires after save when Stage = Closed Won. Send an email alert to the owner and create a follow-up Task due in 30 days."
Set up an LWC:
"Create a Lightning Web Component called accountSummary that displays account name, industry, and annual revenue. Make it available on Record Pages."
Agentforce setup:
"Create an Agentforce agent called SalesAssistant. Then create a GetOrders action linked to the Get_Account_Orders flow. Then create an OrderManagement topic with actions: [GetOrders]. Finally wire SalesAssistant to topic OrderManagement."
Environment Variables
Production write guard
This server hands an LLM a Salesforce credential, and the LLM decides what to do with it. Any text
the model reads on the way — a case comment, a field description, a retrieved .flow file, an
email body — can carry an instruction, and nothing downstream can tell it apart from one you typed.
So against a production org, nine tools are refused by default:
Metadata creation is not affected. All 137 sf_create_* tools, sf_deploy_metadata and
sf_retrieve_metadata work against production exactly as before — authoring metadata by natural
language is the point of this package, and a guard that taxed it would just get switched off.
Apex authoring (sf_create_apex_class, sf_create_apex_trigger) is also not blocked, even
though a trigger runs on every DML. The line drawn is auditability: created Apex is metadata — it
has a name, an author and a deploy record, and can be found and removed. sf_execute_anonymous_apex
leaves nothing to find, which is why that one is blocked.
An org counts as production only when it is not a sandbox, not a Developer Edition org, and not on a trial/scratch expiry. Sandboxes, dev orgs and scratch orgs are never gated.
The guard is a hard refusal, not a confirmation prompt: a prompt the calling agent can approve by itself is not a control, and this server is often run with client permissions bypassed. Only the environment variable lifts it.
Documentation
- SETUP.md — Prerequisites, authentication, Claude configuration
- TOOLS.md — All 228 tools with full parameter documentation
- AGENTFORCE.md — Agentforce agent creation guide
- APEX_LWC.md — Apex and LWC development guide
- CHANGELOG.md — Version history
Bugs & Feature Requests
Found a bug or want a new tool? Open an issue — there are templates for bug reports and feature requests. Please include the package version and the tool name, and remove any org URLs or credentials before posting.
License
MIT
來源:README.md,提交 f17af23
工具
0版本歷史
2- v3.2.0最新Sep 30, 2026
- v3.0.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分