Enterprise CRM with MCP
A B2B SaaS company built an internal AI assistant that connects to their customer data platform via MCP. The assistant handles 500+ customer queries per day from the sales and support teams.
Architecture
┌─────────────────────────────────────────────┐
│ INTERNAL CHAT APP (Custom MCP Host) │
├─────────────────────────────────────────────┤
│ MCP Gateway (central proxy) │
│ ├── CRM Server (Salesforce data) │
│ ├── Analytics Server (Mixpanel events) │
│ ├── Billing Server (Stripe data) │
│ ├── Support Server (Zendesk tickets) │
│ └── Knowledge Base Server (Confluence) │
├─────────────────────────────────────────────┤
│ Security Layer: │
│ • OAuth 2.1 per server │
│ • Role-based tool access │
│ • Full audit logging │
│ • PII redaction on responses │
└─────────────────────────────────────────────┘
Role-Based Access Control
| Role | CRM Tools | Billing Tools | Analytics | Support |
| Sales Rep | read_account, update_deal | view_subscription | get_usage | view_tickets |
| Support Agent | read_account | view_invoices, issue_credit | get_usage | all tools |
| Manager | all tools | all tools | all tools | all tools |
| Intern | read_account (redacted) | ❌ none | get_usage | view_tickets |
PII Redaction Pattern
// MCP Gateway middleware: redact PII before returning to LLM
function redactPII(response: ToolResult, userRole: string): ToolResult {
if (userRole === "intern" || userRole === "external") {
const text = response.content[0].text;
return {
content: [{
type: "text",
text: text
.replace(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi, "[EMAIL REDACTED]")
.replace(/\b\d{3}[-.]?\d{3}[-.]?\d{4}\b/g, "[PHONE REDACTED]")
.replace(/\b\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}\b/g, "[CARD REDACTED]")
}]
};
}
return response;
}
Key Results
| Metric | Impact |
| Average query resolution | Under 30 seconds (vs 5 min manual lookup) |
| Data accuracy | 99.1% (AI reads live data vs human memory) |
| Security incidents | Zero PII leaks in 6 months (redaction layer) |
| Tool utilization | CRM: 45%, Analytics: 30%, Billing: 15%, Support: 10% |
🔒 Security Lesson: The MCP Gateway pattern is essential for enterprise. It provides a single enforcement point for authentication, authorization, PII redaction, and audit logging — without modifying individual MCP servers.