{"id":26937619,"url":"https://github.com/lciesielski/mcp-salesforce-example","last_synced_at":"2025-04-02T13:15:45.802Z","repository":{"id":285165036,"uuid":"957204688","full_name":"lciesielski/mcp-salesforce-example","owner":"lciesielski","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-29T23:33:37.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T00:24:06.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lciesielski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-29T19:55:47.000Z","updated_at":"2025-03-29T23:33:40.000Z","dependencies_parsed_at":"2025-03-30T00:34:14.969Z","dependency_job_id":null,"html_url":"https://github.com/lciesielski/mcp-salesforce-example","commit_stats":null,"previous_names":["lciesielski/mcp-salesforce-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lciesielski%2Fmcp-salesforce-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lciesielski%2Fmcp-salesforce-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lciesielski%2Fmcp-salesforce-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lciesielski%2Fmcp-salesforce-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lciesielski","download_url":"https://codeload.github.com/lciesielski/mcp-salesforce-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246819780,"owners_count":20839095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-02T13:15:24.359Z","updated_at":"2025-04-02T13:15:45.797Z","avatar_url":"https://github.com/lciesielski.png","language":"JavaScript","funding_links":[],"categories":["Community Servers","MCP 服务器精选列表","🏗️ Infrastructure as Code","🌐 Web Development","Table of Contents"],"sub_categories":["🛠️ 效率工具与集成 (Office, Project Management, Notes, etc.)","Workflow Automation"],"readme":"# Salesforce MCP Sample Integration\n\nThis project provides a basic example of integrating with Salesforce using the Model Context Protocol (MCP). It allows interaction with Salesforce features like sending emails and deploying Apex code through MCP tools.\n\n## Prerequisites\n\n*   Node.js and npm (or yarn) installed.\n*   A Salesforce org where you can create a Connected App.\n\n## Setup\n\n1.  **Install Dependencies:**\n    ```bash\n    npm install\n    # or\n    yarn install\n    ```\n\n2.  **Configure Salesforce Credentials:**\n    *   You MUST create a `credentials.js` file inside a `utils` folder (`./utils/credentials.js`).\n    *   This file needs to export a function `getSalesforceCredentials()` which returns your Salesforce connection details necessary for JWT Bearer Flow authentication.\n    *   **Important:** Ensure you have a [Connected App configured in Salesforce](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_api_integration.htm\u0026type=5) for JWT authentication, allowing the appropriate scopes and pre-authorizing the relevant user profile.\n\n    **`utils/credentials.js` Example:**\n\n    ```javascript\n    import fs from 'fs';\n    import path from 'path';\n    // You might load these from environment variables, a config file, etc.\n\n    export function getSalesforceCredentials() {\n        // --- IMPLEMENT YOUR LOGIC HERE to securely load credentials ---\n        const loginUrl = \"YOUR_SALESFORCE_LOGIN_URL\"; // e.g., https://login.salesforce.com or https://yourdomain.my.salesforce.com\n        const username = \"YOUR_SALESFORCE_USERNAME\";\n        const clientId = \"YOUR_CONNECTED_APP_CONSUMER_KEY\";\n        // Load your private key used to sign the JWT assertion\n        // Ensure the key is formatted correctly, including BEGIN/END lines.\n        const privateKey = fs.readFileSync(path.resolve(__dirname, 'path/to/your/server.key'), 'utf8'); \n        // Example: const privateKey = process.env.SF_PRIVATE_KEY;\n\n        if (!loginUrl || !username || !clientId || !privateKey) {\n             throw new Error(\"Missing required Salesforce credentials in utils/credentials.js\");\n        }\n\n        return {\n            loginUrl,\n            username,\n            clientId,\n            privateKey\n        };\n    }\n    ```\n\n3.  **Configuration File:**\n    *   The repository includes a sample `claude_desktop_config.json` file that can be used as a template for configuring your MCP server.\n    *   Update the paths and credentials in this file according to your environment setup.\n\n## Running the Server\n\n```bash\nnode server.js\n```\n\n## Demo\n\nhttps://github.com/user-attachments/assets/08c8015a-bc57-4c5e-9f3d-4a9d9d310f4c\n\n[Video in higher quality](https://www.youtube.com/watch?v=T883nXqatZ4).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flciesielski%2Fmcp-salesforce-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flciesielski%2Fmcp-salesforce-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flciesielski%2Fmcp-salesforce-example/lists"}