Agentforce stdio server for Agentforce Agent integration
npm install @mohitharsh/agentforcemcpusername
password
securityToken
agentName
mcp.json:
json
{
"servers": {
"AgentforceStdio": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mohitharsh/agentforcemcp",
"--username",
"",
"--password",
"",
"--securityToken",
"",
"--agentName",
""
]
}
},
"inputs": []
}
`
---
$3
Add the following entry to your mcp.json (usually located in the Claude app data directory):
`json
{
"mcpServers": {
"AgentforceStdio": {
"description": "Connect to Agentforce Agent",
"command": "npx",
"args": [
"-y",
"@mohitharsh/agentforcemcp",
"--username",
"",
"--password",
"",
"--securityToken",
"",
"--agentName",
""
]
}
}
}
`
---
π§ Command-Line Arguments
| Argument | Description | Required | Example |
| ----------------- | ---------------------------------------------- | -------- | --------------------------- |
| --username | Salesforce username for authentication | β
| --username john@doe.com |
| --password | Salesforce password for authentication | β
| --password myPass123 |
| --securityToken | Salesforce security token for authentication | β
| --securityToken aBc123XyZ |
| --agentName | Agentforce Agent API Name | β
| --agentName Salesforce_Copilot |
> β οΈ Note: The Agentforce Agent must be activated and accessible in your Salesforce org.
---
π‘ Practical Example (Claude Desktop)
Below is a real example of the Agentforce MCP server working inside Claude Desktop, showing how Claude communicates with a Salesforce Agent via the MCP server:
> User: "get account targets of Genepoint"
The MCP server then sends this query to Salesforce, and the Agentforce Agent responds with structured insights:
> Claude:
`
The Copilot_for_Salesforce agent provided the following information about GenePointβs account targets:
Account Targets for GenePoint:
1. Reduce delivery time by 30% through route optimization
β’ Recommended action: Analyze current delivery routes and implement advanced routing software using real-time data.
2. Launch a new AI product line by the third quarter
β’ Recommended action: Establish a clear timeline and allocate resources for timely development and launch.
These strategies focus on enhancing operational efficiency and market competitiveness for GenePoint.
``