Get the FREE Ultimate OpenClaw Setup Guide →

miaw

This is an MCP Server using Salesforce's MIAW/Enhanced Chat APIs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio skyrmionz-miaw-mcp-server node dist/index.js \
  --env MIAW_ORG_ID="<YOUR_ORG_ID>" \
  --env MCP_TRANSPORT="http" \
  --env MIAW_SCRT_URL="<YOUR_SCRT_URL>" \
  --env MIAW_ES_DEVELOPER_NAME="<YOUR_EMBEDDED_SERVICE_DEVELOPER_NAME>"

How to use

This MCP server (miaw) enables ChatGPT to connect with Salesforce Enhanced Chat (MIAW), allowing seamless handoffs between AI agents and live human agents. It handles session creation, real-time messaging, and transfers to a live agent, including displaying a live chat widget within ChatGPT when a human agent takes over. The server polls for agent responses in the background and filters out system messages so ChatGPT receives clean conversation data. To use it, deploy this server (locally or in the cloud), configure the required Salesforce credentials, and point ChatGPT connector settings to the server's /mcp endpoint. Once connected, you can initiate a session, create conversations, and manage message exchanges with Salesforce agents through the MCP interface.

Key capabilities include: initiating conversations with Salesforce agents, real-time message exchange, transferring chats to human agents with a live widget, end-of-chat handling, and automated detection of agent termination. The server also optimizes polling so ChatGPT doesn’t have to implement complex client-side polling logic.

How to install

Prerequisites:

  • Access to a Salesforce org with Enhanced Chat (MIAW) enabled and properly configured (Embedded Service Deployment, Custom Client deployment, and Live Agent/Messaging channels).
  • A Heroku account (or another hosting environment) to run the MCP server.
  • Node.js 18+ installed for local testing (optional).

Step-by-step install:

  1. Clone the repository git clone https://github.com/skyrmionz/miaw-mcp-server.git cd miaw-mcp-server

  2. Install dependencies npm install

  3. Prepare environment cp .env.example .env

    Edit .env with your Salesforce credentials and settings:

    MCP_TRANSPORT=http

    MIAW_SCRT_URL=https://your-org-url.my.salesforce-scrt.com

    MIAW_ES_DEVELOPER_NAME=Your_Embedded_Service_Deployment_Name

    MIAW_ORG_ID=YourOrgID

  4. Build and run locally (for testing) npm run build npm start

    Or run in HTTP mode directly

    MCP_TRANSPORT=http PORT=3000 node dist/index.js

  5. Deploy to Heroku (optional)

    • Create a Heroku app (e.g., chatgpt-miaw-mcp)
    • Push the repository, set config vars (MCP_TRANSPORT, MIAW_SCRT_URL, MIAW_ES_DEVELOPER_NAME, MIAW_ORG_ID)
    • Ensure the app exposes the /mcp endpoint
  6. Configure ChatGPT connector

    • In ChatGPT, create a new connector and set the MCP Server URL to your deployed app’s /mcp endpoint
    • Disable authentication if desired (as per guidance) and save

Prerequisites overview: Salesforce credentials (SCRT URL, Embedded Service Developer Name, Organization ID) are required and should be obtained from Setup > Embedded Service Deployments > Your Deployment > Install Code Snippet.

Additional notes

Tips and common considerations:

  • Ensure the MCP endpoint is reachable at /mcp on your hosting platform (Heroku cloud app URL /mcp).
  • Double-check Salesforce credentials: SCRT URL must be exact (no trailing slash), Embedded Service Developer Name must match exactly, and Org ID must be current.
  • If you encounter 400/401 errors, re-verify the Salesforce config and environment variable values.
  • When running locally, you can test using cURL against http://localhost:3000/mcp and verify initialize and tools calls.
  • For production, store secrets securely (e.g., Heroku Config Vars, AWS Secrets Manager) and avoid committing credentials in code.
  • The server uses MCP_TRANSPORT=http by default for HTTP-based communications; adjust if you deploy to a different transport.
  • The Node.js build outputs to dist/index.js; ensure the start script points to that file when running in production.

Related MCP Servers

Sponsor this space

Reach thousands of developers