
codefriar/sf-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
codefriar/sf-mcp - кандидат на сервер MCP, импортированный из https://github.com/codefriar/sf-mcp.
Обзор
codefriar/sf-mcp - кандидат на сервер MCP, импортированный из https://github.com/codefriar/sf-mcp.
Обзор (машинный перевод)
Сервер Model Context Protocol (MCP) для обеспечения функциональности Salesforce CLI для инструментов LLM, таких как Claude Desktop.
Обзор
Этот MCP-сервер обертывает инструмент командной строки Salesforce CLI ([T0]) и раскрывает его команды как инструменты и ресурсы MCP, позволяя агентам с LLM:
Посмотреть справочную информацию о темах и командах Salesforce CLI Выполнять команды Salesforce CLI с соответствующими параметрами Использование возможностей Salesforce CLI в рабочих процессах ИИ
Требования
Node.js 18+ и npm
- Salesforce CLI ([T1]], установленный и сконфигурированный Ваши учетные данные Salesforce org, настроенные в CLI
##Установка
Использование
Запуск сервера
Сервер MCP использует транспорт, который может использоваться с клиентами MCP. Например, MCP Inspector или Claude Desktop.
Настройка в Claude Desktop
Для настройки этого MCP в конфигурации Claude Desktop .claude.json:
Использование пакета npm напрямую:
###Развитие
Доступные инструменты и ресурсы
Этот MCP-сервер предоставляет команды Salesforce CLI в качестве инструментов MCP. Он автоматически обнаруживает и регистрирует все доступные команды от Salesforce CLI, а также специально реализует наиболее часто используемые команды.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Salesforce CLI MCP Server
Model Context Protocol (MCP) server for providing Salesforce CLI functionality to LLM tools like Claude Desktop.
Overview
This MCP server wraps the Salesforce CLI (sf) command-line tool and exposes its commands as MCP tools and resources, allowing LLM-powered agents to:
- View help information about Salesforce CLI topics and commands
- Execute Salesforce CLI commands with appropriate parameters
- Leverage Salesforce CLI capabilities in AI workflows
Requirements
- Node.js 18+ and npm
- Salesforce CLI (
sf) installed and configured - Your Salesforce org credentials configured in the CLI
Installation
# Clone the repository
git clone
cd sfMcp
# Install dependencies
npm install
Usage
Starting the server
# Basic usage
npm start
# With project roots
npm start /path/to/project1 /path/to/project2
# or using the convenience script
npm run with-roots /path/to/project1 /path/to/project2
# As an npx package with roots
npx -y codefriar/sf-mcp /path/to/project1 /path/to/project2
The MCP server uses stdio transport, which can be used with MCP clients like the MCP Inspector or Claude Desktop.
Configuring in Claude Desktop
To configure this MCP in Claude Desktop’s .claude.json configuration:
{
"tools": {
"salesforce": {
"command": "/path/to/node",
"args": [
"/path/to/sf-mcp/build/index.js",
"/path/to/project1",
"/path/to/project2"
]
}
}
}
Using the npm package directly:
{
"tools": {
"salesforce": {
"command": "/path/to/npx",
"args": [
"-y",
"codefriar/sf-mcp",
"/path/to/project1",
"/path/to/project2"
]
}
}
}
Development
# Watch mode (recompiles on file changes)
npm run dev
# In another terminal
npm start [optional project roots...]
Available Tools and Resources
This MCP server provides Salesforce CLI commands as MCP tools. It automatically discovers and registers all available commands from the Salesforce CLI, and also specifically implements the most commonly used commands.
Core Tools
sf_version- Get the Salesforce CLI version informationsf_help- Get help information for Salesforce CLI commandssf_cache_clear- Clear the command discovery cachesf_cache_refresh- Refresh the command discovery cache
Project Directory Management (Roots)
For commands that require a Salesforce project context (like deployments), you must specify the project directory. The MCP supports multiple project directories (roots) similar to the filesystem MCP.
Configuration Methods
Method 1: Via Command Line Arguments
# Start the MCP with project roots
npm start /path/to/project1 /path/to/project2
# or
npx -y codefriar/sf-mcp /path/to/project1 /path/to/project2
Установка
npx -y codefriar/sf-mcp /path/to/project1 /path/to/project2