MCP Integration
LeanCore uses the Model Context Protocol (MCP) to connect specialists to external systems. MCP provides a standardized way for AI systems to access tools and data sources.
What is MCP?
MCP is an open protocol that defines how AI applications communicate with external tools and data sources. It provides:
- Standardized tool definitions -- every tool has a name, description, and input schema
- Transport agnostic -- works over HTTP, SSE, or stdio
- Authentication -- Basic auth for secure connections
- Health monitoring -- standard health check endpoints
How LeanCore Uses MCP
Each external system connector is implemented as an MCP server that:
- Exposes tools -- functions the specialist can call (e.g., "search_tickets", "get_report")
- Provides routing cards -- structured metadata that helps the system find the right tool for each query
- Declares requirements -- what configuration is needed at the org and specialist level
- Reports health -- whether the system is connected and operational
Transport Protocol
All MCP servers use Streamable HTTP transport (MCP spec version 2025-03-26):
| Endpoint | Purpose |
|---|---|
ALL /mcp | All MCP protocol communication (tool calls, listing) |
GET /health | Health status, tool count, protocol version |
GET /requirements/org | Organization-level configuration requirements |
GET /requirements/specialist | Specialist-level configuration requirements |
GET /routing-cards | Structured routing metadata for every tool |
Connector Categories
Core Connectors
- CLI tools and utilities
- Media generation
- Search and web access
Business Connectors
- Franchise operations
- Back-office systems
- Customer relationship management
- Sales and pipeline tools
- Business reporting
Communication Connectors
- Email processing
- WhatsApp messaging
- Print and document generation
Specialized Connectors
- Legal document search
- Social media management
- Analytics platforms
Tool Discovery
When a specialist is assigned to connected systems, the platform:
- Syncs all available tools from each MCP server
- Generates routing cards for each tool (structured metadata describing when to use it)
- Embeds tool descriptions in the vector store
- At query time, performs semantic search to find the most relevant tools
This means the specialist automatically knows which tools to use for each type of question.