XS

xlengelle-sf/agentforce-mcp-xlengelle

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 8 forks 质量 55 趋势 8

This MCP server provides tools to interact with the Salesforce Agentforce API. It allows authentication, session creation, and message exchange with Agentforce agents.

概览

This MCP server provides tools to interact with the Salesforce Agentforce API. It allows authentication, session creation, and message exchange with Agentforce agents. If you've just cloned this repository, you can use the interactive setup script to quickly configure and run the server: The setup script will: 1. Check your Python version 2. Install required dependencies 3. Guide you through entering your Salesforce credentials 4. Test your connection to Salesforce 5. Offer to start the server 6. Provide instructions for configuring Claude Desktop Alternatively, you can follow these manual steps: 3. : - : Your 18-character Salesforce Org ID - : The 18-character Agent ID from your Agentforce agent - : The Consumer Key from your Connected App - : The Consumer Secret from your Connected App - : Your Salesforce My Domain URL without https:// prefix 4. with the collected credentials: (Note: These are fictional example values. Replace with your actual credentials.

README

以下为原文 README 节选,完整内容请查看原文。

Agentforce MCP Server

This MCP server provides tools to interact with the Salesforce Agentforce API. It allows authentication, session creation, and message exchange with Agentforce agents.

Getting Started After Cloning

If you’ve just cloned this repository, you can use the interactive setup script to quickly configure and run the server:

chmod +x setup.sh
./setup.sh

The setup script will:

  1. Check your Python version
  2. Install required dependencies
  3. Guide you through entering your Salesforce credentials
  4. Test your connection to Salesforce
  5. Offer to start the server
  6. Provide instructions for configuring Claude Desktop

Alternatively, you can follow these manual steps:

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Set up your environment variables:

    cp .env.example .env
    
  3. Collect your Salesforce credentials:

    • SALESFORCE_ORG_ID: Your 18-character Salesforce Org ID
    • SALESFORCE_AGENT_ID: The 18-character Agent ID from your Agentforce agent
    • SALESFORCE_CLIENT_ID: The Consumer Key from your Connected App
    • SALESFORCE_CLIENT_SECRET: The Consumer Secret from your Connected App
    • SALESFORCE_SERVER_URL: Your Salesforce My Domain URL without https:// prefix
  4. Edit your .env file with the collected credentials:

    SALESFORCE_ORG_ID="00D5f000000J2PKEA0"
    SALESFORCE_AGENT_ID="0XxHn000000x9F1KAI"
    SALESFORCE_CLIENT_ID="3MVG9OGq41FnYVsFgnaG0AzJDWnoy37Bb18e0R.GgDJu2qB9sqppVl7ehWmJhGvPSLrrA0cBNhDJdsbZXnv52"
    SALESFORCE_CLIENT_SECRET="210117AC36E9E4C8AFCA02FF062B8A677BACBFFB71D2BB1162D60D316382FADE"
    SALESFORCE_SERVER_URL="example.my.salesforce.com"
    

    (Note: These are fictional example values. Replace with your actual credentials.)

  5. Make the server script executable:

    chmod +x agentforce_mcp_server.py
    
  6. Run the server:

    python agentforce_mcp_server.py
    

For detailed instructions on finding your Salesforce credentials, see the Setting Up Salesforce section below.

Setup

  1. Ensure you have Python 3.10 or higher installed.

  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Make the server script executable:

    chmod +x agentforce_mcp_server.py
    

Configuration

The server uses environment variables for configuration. These are loaded from the .env file.

  1. Copy the example environment file to create your own:

    cp .env.example .env
    
  2. Edit the .env file and fill in your values:

    SALESFORCE_ORG_ID="your_org_id_here"
    SALESFORCE_AGENT_ID="your_agent_id_here"  # The 18-character Agent ID you found in Salesforce
    SALESFORCE_CLIENT_ID="your_client_id_here"  # The Consumer Key from your Connected App
    SALESFORCE_CLIENT_SECRET="your_client_secret_here"  # The Consumer Secret from your Connected App
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "agentforce": { "command": "python", "args": [ "/path/to/your/agentforce_mcp_server.py" ] } } }