---
title: "MCP Server for Salesforce: Connecting CRM Context to AI Agents"
url: "https://atlan.com/know/ai-agent/mcp-server-for-salesforce/"
description: "Run an MCP server for Salesforce using hosted or self-hosted options. Compare setup options and discover where CRM-only context falls short."
author: "Ayswarrya G"
author_role: "Contributing Writer, Data Engineering & Metadata"
published: "2026-08-12"
updated: "2026-08-12T00:00:00.000Z"
---

---

An MCP server for Salesforce exposes CRM data and business logic as tools that MCP clients like Claude, ChatGPT, and Cursor can call. Salesforce's hosted MCP servers, generally available since April 2026, run inside Salesforce's security perimeter and let those external clients connect directly to CRM data and tools. Atlan's context layer picks up where that boundary ends, connecting Salesforce context to everything else your [AI agents](https://atlan.com/know/ai-agent/what-is-an-ai-agent/) need.

Teams that need custom code, language choice, or infrastructure control can self-host using open-source servers or API-to-MCP conversion tools.

MCP server for Salesforce deployment options:

1. **Hosted MCP servers:** Salesforce manages infrastructure, governance, and authentication. Tool access is via SObject operations, Apex, Flows, and prompt templates.
2. **Self-hosted servers:** You own infrastructure, code, and rate limits. Self-hosted paths include community servers, custom builds on Heroku AppLink, or Anypoint conversion.

| MCP Server for Salesforce: Quick Facts | |
| ----- | ----- |
| **Hosted GA date** | April 2026, fully Salesforce-managed infrastructure |
| **Hosted authentication** | OAuth 2.0 with PKCE; scoped to exposed tools, not the full REST API |
| **Hosted tool surface** | SObject operations, Apex, Flows, and Einstein Trust Layer prompt templates |
| **Self-hosted paths** | Community open-source servers, Heroku AppLink, Anypoint API-to-MCP conversion |
| **Edition requirement** | Enterprise Edition and above for hosted servers; none for self-hosted |
| **Context boundary** | Stops at Salesforce; agents still need warehouse, BI, and pipeline context |

Enterprises evaluating either path are usually also evaluating [how enterprises use AI agents](https://atlan.com/know/ai-agent/how-enterprises-use-ai-agents/) more broadly, since Salesforce is one of several systems of record an [AI agent architecture](https://atlan.com/know/ai-agent/ai-agent-architecture-explained/) has to reach for governed context, not the only one.

---

## How can you run an MCP server for Salesforce?

You can run an MCP server for Salesforce two ways: through the servers Salesforce hosts itself, or by self-hosting one. [Agentforce](https://www.salesforce.com/agentforce/mcp-support/) facilitates Salesforce's own agentic workflows and their [tool use](https://atlan.com/know/ai-agent/ai-agent-tool-use/), and Salesforce's hosted MCP servers, which expose CRM data and logic, went [GA in April 2026](https://developer.salesforce.com/blogs/2026/04/salesforce-hosted-mcp-servers-are-now-generally-available). The two paths:

1. **Use an MCP server hosted by Salesforce**, where Salesforce fully manages the infrastructure, governance, and authentication.

2. **Host an MCP server yourself**, or use a custom MCP server hosting service, where you build and host the server and are responsible for the infrastructure.

Both options come with real tradeoffs, and neither one, on its own, gives an agent the full picture.

### Using Salesforce's hosted MCP servers

The easiest way to set up MCP servers to communicate with external tools is to use Salesforce's [Hosted MCP Servers](https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide). These are fully managed endpoints that run within Salesforce's security perimeter. Salesforce manages the infrastructure along with OAuth 2.0 with PKCE-based authentication. The MCP OAuth only allows access to tools that the server explicitly exposes. Access to REST APIs is not part of the OAuth scope, and that same scoped-access model is the baseline for [AI agent governance](https://atlan.com/know/ai-agent-governance/) on any hosted MCP surface, not just Salesforce's.

Once you set this server up, you can connect to it via any MCP client, such as Claude, Cursor, ChatGPT, or any other third-party or custom client. This MCP server can facilitate access to SObject operations, [@AuraEnabled methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_AuraEnabled.htm), [Named Queries](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_named_query.htm), [custom tools](https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/api-catalog.html) for Apex and Agentforce, and access to the [Einstein Trust Layer](https://help.salesforce.com/s/articleView?id=ai.generative_ai_trust_arch.htm&language=en_US&type=5) via prompt templates. All of these are tools that the MCP server exposes, and getting that scope wrong is one of the more common [AI agent risks and guardrails](https://atlan.com/know/ai-agent-risks-guardrails/) gaps teams run into.

If you need custom tools with non-Salesforce code, you need a self-hosted MCP server.

### Using self-hosted Salesforce MCP servers

Deploying a managed MCP server in Salesforce is easy, but it's not best suited for many use cases where you need flexibility in the infrastructure, authentication, security, rate limits, or choice of programming language.

Even with the self-hosted version, there are open-source servers like the [Salesforce DX MCP Server](https://github.com/salesforcecli/mcp) that you can deploy on your own, or you can [build your own from scratch](https://atlan.com/know/mcp-server-implementation-guide/) and deploy it on [Heroku AppLink](https://devcenter.heroku.com/articles/heroku-applink), which carries forward Salesforce user permissions to the MCP server, the same permission-preserving pattern covered in [how to give AI agents access to enterprise data](https://atlan.com/know/ai-agent/how-to-give-ai-agents-access-to-enterprise-data/). Two self-hosted paths stand out:

Community-maintained servers implemented in Python or Node that cover Apex REST, basic CRUD operations, SOQL, and SOSL on Salesforce. Quality varies across these servers, so choose one carefully before deploying it to production.

API-to-MCP conversion tools like [Anypoint](https://www.salesforce.com/mulesoft/anypoint-platform/), which can turn existing APIs or Mule applications into functional MCP servers.

Both of these options stop at Salesforce's boundary, and so does the context they can serve.

---

  Build your AI context stack
  Get the blueprint for implementing context graphs across your enterprise, from metadata foundation to agent orchestration, with practical steps for 2026.
  Get the Stack Guide

---

## Why do Salesforce-only MCP servers run out of context?

Many large enterprises use Salesforce extensively, but even for them, context isn't fully contained within Salesforce. Business logic, definitions, metrics, documentation, and other organizational knowledge live across databases, warehouses, pipelines, business intelligence tools, and ML tools.

Because it has access to limited context, a Salesforce MCP server will return partial context, which can produce incorrect results. This is the same gap that shows up in any [agent context layer vs. RAG](https://atlan.com/know/ai-agent/agent-context-layer-vs-rag/) comparison: [retrieval-augmented generation](https://atlan.com/know/what-is-rag/) and [agent memory](https://atlan.com/know/what-is-agent-memory/) retrieve what's already indexed inside one platform, while a context layer governs what's true across all of them. The following things further limit this context:

* Lack of prioritization of context that spans objects, workflows, and automations, among other things.

* Partial context triggers incorrect context updates back to the system, poisoning org-wide context.

* Context gaps can snowball after silent propagation from one step to another down the chain, the same failure mode behind [why AI agents forget](https://atlan.com/know/why-ai-agents-forget/) things a human colleague would still remember, and it only compounds once an organization moves into [multi-agent coordination patterns](https://atlan.com/know/multi-agent-coordination-patterns/) where one agent's gap becomes every downstream agent's gap.

Going beyond the Salesforce perimeter is possible with REST APIs, JDBC connections, and MCP servers, but outside of MCP servers, other solutions aren't designed to transport context. You can use existing or create new custom tools to manage context across your organization.

Essentially, what you need is an [enterprise context layer](https://atlan.com/know/what-is-the-enterprise-context-layer/), which is something [Atlan](https://atlan.com/) offers out of the box.

### Salesforce MCP alone vs. Salesforce MCP with Atlan's context layer

| Aspect | Salesforce MCP Alone | Salesforce MCP + Atlan Context Layer |
| ----- | ----- | ----- |
| Context scope | Limited to Salesforce objects, workflows, and automations | Cross-estate: warehouses, BI tools, pipelines, and Salesforce |
| Governance | Enforces Salesforce's own permissions model only | Lineage, quality, and policy rules carried as context |
| Consistency | Partial context can trigger incorrect updates back to the org | One governed context served through the [Atlan MCP server](https://atlan.com/know/what-is-atlan-mcp/) |
| Comparable to | A single-platform view, the same gap in [data catalog vs. context layer](https://atlan.com/know/data-catalog-vs-context-layer/) | An enterprise context layer that spans every system of record |

---

  See what a context gap costs you
  Run the Context Gap Calculator against your own stack to see how much context your agents are missing once they step outside a single system of record like Salesforce.
  Run the Context Gap Calculator

---

## What Atlan adds beyond Salesforce's MCP servers

Atlan is the enterprise context layer for AI. At its core lies the [Context Lakehouse](https://atlan.com/context-lakehouse/), which, in turn, is an accumulation and organization of all the context in your business, including that from Salesforce. Atlan connects to Salesforce via the [Salesforce connector](https://docs.atlan.com/apps/connectors/crm/salesforce) and crawls objects, fields, reports, and dashboards.

Atlan's primary capabilities include (but aren't limited to):

* **Enterprise Data Graph**: The [Enterprise Data Graph](https://atlan.com/know/enterprise-data-graph/) is an always up-to-date graph connecting the context behind every object, workflow, and relationship in your business, the same connective layer that separates a genuine [agent context graph](https://atlan.com/know/ai-agent/agent-context-graph/) from a database that only stores relationships.

* **Context Agents**: [Context Agents](https://atlan.com/context-agents/) are agents architected to curate and enrich context for other agents to consume, the practical, running version of [context engineering](https://atlan.com/know/context-engineering-vs-prompt-engineering/) rather than prompt engineering alone.

* **Context Engineering Studio**: [Context Engineering Studio](https://atlan.com/context-engineering-studio/) allows you to build [context repos](https://atlan.com/know/ai-agent/context-repository-for-ai-agents/), run evals, and deploy packaged context to agents for ready use.

* **Context Lakehouse**: Context Lakehouse is the storage and organization layer that sits behind it all; this is the powerhouse behind every agentic interaction within Atlan.

* **Atlan MCP server**: All context reaches your agents through the [Atlan MCP server](https://atlan.com/know/what-is-atlan-mcp/), which MCP clients can use alongside Salesforce's own servers, and it works over [Open Semantic Interchange](https://atlan.com/know/agent-interoperability-protocols/) and standards like [A2A](https://atlan.com/know/google-a2a-protocol/) so context stays portable across agent frameworks.

Underneath these capabilities, Atlan organizes glossary terms, domains, and relationships through an [Active Ontology](https://atlan.com/know/what-is-active-ontology/), the same [semantic layer](https://atlan.com/know/semantic-layer/) foundation that separates a [context graph from a knowledge graph](https://atlan.com/know/context-graph-vs-knowledge-graph/) in practice: a knowledge graph captures entities and relationships, while a context graph adds the freshness, ownership, and policy metadata that make those relationships usable by an agent making a real decision.

Salesforce co-leads the global effort to standardize context interchange with [Open Semantic Interchange](https://atlan.com/know/agent-interoperability-protocols/), of which Atlan is a [launch partner](https://atlan.com/snowflake-open-semantic-interchange-launch-partner/).

---

  Watch the context layer in action
  See a live walkthrough of Atlan's context layer connecting CRM data to the rest of the enterprise stack, and how agents query it through MCP.
  Watch the Live Demo

---

## Moving forward with MCP server for Salesforce

Salesforce offers two ways to connect your AI agents to the CRM.

The first option is to use Salesforce's hosted MCP servers, which Salesforce itself fully manages. This is ideal if you want to access platform assets such as Flows, Apex, and prompt templates.

The second option is to host your own MCP server with full ownership and control of infrastructure, application code, and authentication. Both options work quite well with Salesforce, but enterprise context goes well beyond Salesforce boundaries, which is why [AI agents need an enterprise context layer](https://atlan.com/know/why-ai-agents-need-an-enterprise-context-layer/) in the first place, and why teams that [implement one](https://atlan.com/know/how-to-implement-enterprise-context-layer-for-ai/) treat Salesforce as one connected system among many rather than the whole picture. Since both Atlan and Salesforce back the Open Semantic Interchange, the two are built to work together by design. Teams weighing this decision against other platforms can use the same [context layer evaluation criteria](https://atlan.com/know/ai-agent/context-layer/context-layer-evaluation-criteria/) regardless of which CRM or data platform they start from.

  Book a Demo

---

## FAQs about MCP server for Salesforce

### 1. How do the Salesforce MCP servers work?

Salesforce MCP servers expose your organization's data and logic as tools to external MCP clients, such as Claude, ChatGPT, and Cursor. The integration works based on OAuth and an MCP handshake. Once connected, the Salesforce MCP servers enforce the same permissions and privileges on the exposed tools, so you govern data using a uniform permissions model.

### 2. Which Salesforce editions support hosted MCP servers?

You need Salesforce Enterprise Edition and above to use the Hosted MCP servers. You can then request your Salesforce admin to enable the MCP Service. Self-hosted servers don't have any such Edition requirements, as they run on their own infrastructure and authentication, though the org still needs API access.

### 3. What's the difference between the Agentforce MCP client and Salesforce's MCP servers?

Agentforce MCP is the client. It lets Agentforce agents make tool calls to external MCP servers, such as the Atlan MCP server. Salesforce MCP servers expose CRM data and logic to external MCP clients.

### 4. What's the difference between Salesforce's hosted and custom MCP servers?

Salesforce's hosted servers run on Salesforce-managed infrastructure with managed authentication and come with out-of-the-box tool integrations, such as SObject operations, Apex, and Flows. Custom MCP servers are needed when you want flexibility in what you can host on your server, whether that is writing custom code, using a language of your choice, or choosing to manage rate-limiting constraints on your own infrastructure.

### 5. How does the Salesforce MCP server work with the Atlan MCP server?

The Salesforce MCP server can operate independently or alongside the Atlan MCP server. When working alone, the Salesforce MCP server often cannot provide complete context as it cannot access other systems. Atlan's MCP server has access to the Context Lakehouse, which provides context across the organization, including Salesforce. That way, MCP clients go through a single context layer to get to the right context for any given task.

---

## Sources

1. Agentforce MCP Support, Salesforce. https://www.salesforce.com/agentforce/mcp-support/
2. Salesforce Hosted MCP Servers Are Now Generally Available, Salesforce, April 2026. https://developer.salesforce.com/blogs/2026/04/salesforce-hosted-mcp-servers-are-now-generally-available
3. Salesforce Hosted MCP Servers, Salesforce Developers. https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide
4. AuraEnabled Annotation, Apex Developer Guide, Salesforce Developers. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_AuraEnabled.htm
5. Named Query API, REST API Developer Guide, Salesforce Developers. https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_named_query.htm
6. APIs from API Catalog, Salesforce Developers. https://developer.salesforce.com/docs/platform/hosted-mcp-servers/guide/api-catalog.html
7. Einstein Trust Layer: Designed for Trust, Agentforce and Einstein Generative AI, Salesforce. https://help.salesforce.com/s/articleView?id=ai.generative_ai_trust_arch.htm&type=5
8. MCP Server for Interacting with Salesforce Instances, GitHub. https://github.com/salesforcecli/mcp
9. Heroku AppLink, Heroku by Salesforce, June 2026. https://devcenter.heroku.com/articles/heroku-applink