Skip to main content
Glama

Salesforce MCP サーバー

Claude と Salesforce を統合する MCP(Model Context Protocol)サーバー実装により、Salesforce のデータとメタデータを自然言語で操作できるようになります。このサーバーにより、Claude は日常的な言語で Salesforce のオブジェクトとレコードをクエリ、変更、管理できます。

特徴

  • オブジェクトとフィールドの管理:自然言語を使用してカスタムオブジェクトとフィールドを作成および変更します

  • スマートオブジェクト検索: 部分的な名前一致を使用して Salesforce オブジェクトを検索します

  • 詳細なスキーマ情報: あらゆるオブジェクトの包括的なフィールドと関係の詳細を取得します

  • 柔軟なデータクエリ: リレーションシップサポートと複雑なフィルターを使用してレコードをクエリします

  • データ操作: レコードの挿入、更新、削除、アップサートが簡単に行えます

  • クロスオブジェクト検索: SOSL を使用して複数のオブジェクトを検索する

  • 直感的なエラー処理: Salesforce 固有のエラー詳細による明確なフィードバック

Related MCP server: Salesforce MCP Server

インストール

npm install -g @surajadsul02/mcp-server-salesforce

設定

Salesforce認証

次の 2 つの方法のいずれかを使用して Salesforce で認証できます。

1. ユーザー名/パスワード認証

  1. Salesforceの認証情報を設定する

  2. セキュリティトークンを取得する(Salesforce設定からリセット)

  3. 設定セクションに示されているように環境変数を設定します

2. コンシューマーキー/シークレットを使用したOAuth2認証

  1. Salesforceで接続アプリを設定する

  2. コンシューマーキーとコンシューマーシークレットを取得する

  3. 設定セクションに示されているように環境変数を設定します

IDE統合

カーソルIDEセットアップ

  1. パッケージをグローバルにインストールします。

npm install -g @surajadsul02/mcp-server-salesforce
  1. Cursor IDE .cursor/mcp.jsonで MCP サーバーを構成します。

envコマンドの使用
{
  "mcpServers": {
    "salesforce": {
      "command": "env",
      "args": [
        "SALESFORCE_USERNAME=your.actual.email@example.com",
        "SALESFORCE_PASSWORD=YourActualPassword123",
        "SALESFORCE_TOKEN=YourActualSecurityToken123",
        "SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
        "npx",
        "-y",
        "@surajadsul02/mcp-server-salesforce"
      ]
    }
  }
}
カーソルでのOAuth2認証
{
  "mcpServers": {
    "salesforce": {
      "command": "env",
      "args": [
        "SALESFORCE_USERNAME=your.actual.email@example.com",
        "SALESFORCE_PASSWORD=YourActualPassword123",
        "SALESFORCE_TOKEN=YourActualSecurityToken123",
        "SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
        "SALESFORCE_CONSUMER_KEY=YourConsumerKey",
        "SALESFORCE_CONSUMER_SECRET=YourConsumerSecret",
        "npx",
        "-y",
        "@surajadsul02/mcp-server-salesforce"
      ]
    }
  }
}

クロードデスクトップセットアップ

  1. パッケージをグローバルにインストールします (まだインストールされていない場合)。

npm install -g @surajadsul02/mcp-server-salesforce
  1. claude_desktop_config.jsonに追加します:

ユーザー名/パスワード認証の場合
{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@surajadsul02/mcp-server-salesforce"],
      "env": {
        "SALESFORCE_USERNAME": "your_username",
        "SALESFORCE_PASSWORD": "your_password",
        "SALESFORCE_TOKEN": "your_security_token",
        "SALESFORCE_INSTANCE_URL": "https://login.salesforce.com"
      }
    }
  }
}
OAuth2認証の場合
{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@surajadsul02/mcp-server-salesforce"],
      "env": {
        "SALESFORCE_USERNAME": "your_username",
        "SALESFORCE_PASSWORD": "your_password",
        "SALESFORCE_CONSUMER_KEY": "your_consumer_key",
        "SALESFORCE_CONSUMER_SECRET": "your_consumer_secret",
        "SALESFORCE_INSTANCE_URL": "https://login.salesforce.com"
      }
    }
  }
}
  1. 構成ファイルの場所:

    • macOS: ~/Library/Application Support/Claude Desktop/claude_desktop_config.json

    • Windows: %APPDATA%\Claude Desktop\claude_desktop_config.json

    • Linux: ~/.config/Claude Desktop/claude_desktop_config.json

必要な環境変数

ユーザー名/パスワード認証の場合:

  • SALESFORCE_USERNAME : Salesforceのユーザー名/メールアドレス

  • SALESFORCE_PASSWORD : Salesforceのパスワード

  • SALESFORCE_TOKEN : Salesforce セキュリティトークン

  • SALESFORCE_INSTANCE_URL : Salesforce インスタンスの URL (オプション、デフォルト: https://login.salesforce.com )

OAuth2認証の場合:

  • SALESFORCE_USERNAME : Salesforceのユーザー名/メールアドレス

  • SALESFORCE_PASSWORD : Salesforceのパスワード

  • SALESFORCE_CONSUMER_KEY : 接続されたアプリケーションのコンシューマーキー

  • SALESFORCE_CONSUMER_SECRET : 接続アプリケーションのコンシューマーシークレット

  • SALESFORCE_INSTANCE_URL : Salesforce インスタンスの URL (オプション、デフォルト: https://login.salesforce.com )

使用例

オブジェクトの検索

"Find all objects related to Accounts"
"Show me objects that handle customer service"
"What objects are available for order management?"

スキーマ情報の取得

"What fields are available in the Account object?"
"Show me the picklist values for Case Status"
"Describe the relationship fields in Opportunity"

レコードのクエリ

"Get all Accounts created this month"
"Show me high-priority Cases with their related Contacts"
"Find all Opportunities over $100k"

カスタムオブジェクトの管理

"Create a Customer Feedback object"
"Add a Rating field to the Feedback object"
"Update sharing settings for the Service Request object"

オブジェクト間の検索

"Search for 'cloud' in Accounts and Opportunities"
"Find mentions of 'network issue' in Cases and Knowledge Articles"
"Search for customer name across all relevant objects"

発達

ソースからのビルド

# Clone the repository
git clone https://github.com/surajadsul02/mcp-server-salesforce.git

# Navigate to directory
cd mcp-server-salesforce

# Install dependencies
npm install

# Build the project
npm run build

トラブルシューティング

  1. 認証エラー

    • 資格情報が正しいことを確認してください

    • ユーザー名/パスワード認証の場合: セキュリティトークンが正しいことを確認してください

    • OAuth2の場合: コンシューマーキーとシークレットを検証する

  2. 接続の問題

    • SalesforceインスタンスURLを確認する

    • ネットワーク接続を確認する

    • 適切なAPIアクセス権限を確保する

  3. カーソルIDE統合

    • 設定変更後にカーソルIDEを再起動します

    • 開発者ツール(ヘルプ > 開発者ツールの切り替え)でエラーメッセージを確認してください。

    • パッケージがグローバルにインストールされていることを確認する

  4. クロードデスクトップ統合

    • 構成ファイルの場所を確認する

    • ファイルの権限を確認する

    • 設定変更後にClaude Desktopを再起動します

    • 環境変数が適切に設定されていることを確認する

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

問題とサポート

問題が発生した場合やサポートが必要な場合は、GitHub リポジトリで問題を報告してください。

Available Tools

7 tools
salesforce_describe_objectA

Get detailed schema metadata including all fields, relationships, and field properties of any Salesforce object. Examples: 'Account' shows all Account fields including custom fields; 'Case' shows all Case fields including relationships to Account, Contact etc.

Inputs: objectName (required).

salesforce_dml_recordsA

Perform data manipulation operations on Salesforce records:

  • insert: Create new records

  • update: Modify existing records (requires Id)

  • delete: Remove records (requires Id)

  • upsert: Insert or update based on external ID field Examples: Insert new Accounts, Update Case status, Delete old records, Upsert based on custom external ID

Inputs: operation (required), objectName (required), records (required), externalIdField.

salesforce_manage_fieldA

Create new custom fields or modify existing fields on any Salesforce object:

  • Field Types: Text, Number, Date, Lookup, Master-Detail, Picklist etc.

  • Properties: Required, Unique, External ID, Length, Scale etc.

  • Relationships: Create lookups and master-detail relationships Examples: Add Rating__c picklist to Account, Create Account lookup on Custom Object Note: Changes affect metadata and require proper permissions

Inputs: operation (required), objectName (required), fieldName (required), label, +13 more.

salesforce_manage_objectA

Create new custom objects or modify existing ones in Salesforce:

  • Create: New custom objects with fields, relationships, and settings

  • Update: Modify existing object settings, labels, sharing model Examples: Create Customer_Feedback__c object, Update object sharing settings Note: Changes affect metadata and require proper permissions

Inputs: operation (required), objectName (required), label, pluralLabel, +5 more.

salesforce_query_recordsA

Query records from any Salesforce object using SOQL, including relationship queries.

Examples:

  1. Parent-to-child query (e.g., Account with Contacts):

    • objectName: "Account"

    • fields: ["Name", "(SELECT Id, FirstName, LastName FROM Contacts)"]

  2. Child-to-parent query (e.g., Contact with Account details):

    • objectName: "Contact"

    • fields: ["FirstName", "LastName", "Account.Name", "Account.Industry"]

  3. Multiple level query (e.g., Contact -> Account -> Owner):

    • objectName: "Contact"

    • fields: ["Name", "Account.Name", "Account.Owner.Name"]

  4. Related object filtering:

    • objectName: "Contact"

    • fields: ["Name", "Account.Name"]

    • whereClause: "Account.Industry = 'Technology'"

Note: When using relationship fields:

  • Use dot notation for parent relationships (e.g., "Account.Name")

  • Use subqueries in parentheses for child relationships (e.g., "(SELECT Id FROM Contacts)")

  • Custom relationship fields end in "__r" (e.g., "CustomObject__r.Name")

Inputs: objectName (required), fields (required), whereClause, orderBy, +1 more.

salesforce_search_allA

Search across multiple Salesforce objects using SOSL (Salesforce Object Search Language).

Examples:

  1. Basic search across all objects: { "searchTerm": "John", "objects": [ { "name": "Account", "fields": ["Name"], "limit": 10 }, { "name": "Contact", "fields": ["FirstName", "LastName", "Email"] } ] }

  2. Advanced search with filters: { "searchTerm": "Cloud*", "searchIn": "NAME FIELDS", "objects": [ { "name": "Account", "fields": ["Name", "Industry"], "orderBy": "Name DESC", "where": "Industry = 'Technology'" } ], "withClauses": [ { "type": "NETWORK", "value": "ALL NETWORKS" }, { "type": "SNIPPET", "fields": ["Description"] } ] }

Notes:

  • Use * and ? for wildcards in search terms

  • Each object can have its own WHERE, ORDER BY, and LIMIT clauses

  • Support for WITH clauses: DATA CATEGORY, DIVISION, METADATA, NETWORK, PRICEBOOKID, SNIPPET, SECURITY_ENFORCED

  • "updateable" and "viewable" options control record access filtering

Inputs: searchTerm (required), objects (required), searchIn, withClauses, +2 more.

salesforce_search_objectsA

Search for Salesforce standard and custom objects by name pattern. Examples: 'Account' will find Account, AccountHistory; 'Order' will find WorkOrder, ServiceOrder__c etc.

Inputs: searchPattern (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: describe_object for metadata, dml_records for data operations, manage_field/object for schema changes, query_records for SOQL, search_all for SOSL, and search_objects for object discovery. The descriptions explicitly differentiate their scopes, eliminating any confusion.

    Naming Consistency5/5

    All tools follow a consistent 'salesforce_verb_noun' pattern with snake_case, such as salesforce_describe_object, salesforce_dml_records, and salesforce_query_records. This uniformity makes the toolset predictable and easy to navigate for an agent.

    Tool Count5/5

    With 7 tools, the server is well-scoped for Salesforce operations, covering metadata, data manipulation, schema management, querying, and searching. Each tool serves a unique and essential function without redundancy, making the count ideal for the domain.

    Completeness5/5

    The toolset provides comprehensive coverage of Salesforce operations: metadata inspection (describe_object), full CRUD for data (dml_records), schema management (manage_field/object), querying (query_records), and searching (search_all/objects). There are no obvious gaps, supporting complete agent workflows from data to metadata.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      An MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.
      15
      5,358 npm
      165
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server implementation that integrates Claude/VS Code with Salesforce, enabling natural language interactions with your Salesforce data and metadata.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides comprehensive access to Salesforce Tooling API for metadata management, SOQL queries, code analysis, and debugging through Claude and other AI assistants.
      48 npm
      5
      MIT