MCP: Model Context Protocol
MCP (Model Context Protocol) is the standard way AI assistants communicate with external systems. In Diosc, MCP servers expose your existing APIs as "tools" that the AI can use to help users.
What is MCP?
MCP is an open protocol that defines how AI models interact with external systems. Think of it as a universal adapter between AI and your APIs.
Tools are functions the AI can call. For example:
search_orders- Find orders matching criteriaget_customer_details- Retrieve customer informationupdate_order_status- Change an order's status
Why MCP?
Without MCP
To let AI interact with your systems, you'd need to:
- Fine-tune the model on your APIs
- Build custom integrations for each AI provider
- Handle authentication, rate limiting, error handling...
- Rebuild everything when switching AI providers
With MCP
- Build one MCP server that wraps your APIs
- Works with any MCP-compatible AI (Claude, GPT-4, etc.)
- Standard protocol handles the communication
- Switch AI providers without changing integrations
How MCP Works in Diosc
MCP in Diosc vs Standard MCP
Diosc extends standard MCP with enterprise features:
| Feature | Standard MCP | Diosc MCP |
|---|---|---|
| Tool discovery | Yes | Yes |
| Tool execution | Yes | Yes |
| Authentication forwarding | No | Yes (BYOA) |
| Connection pooling | No | Yes |
| Health monitoring | No | Yes |
| Role-based tool filtering | No | Yes |
| Approval workflows | No | Yes |
Key Concepts
Tools
Tools are functions your MCP server exposes. Each tool has:
- Name: Identifier like
search_orders - Description: What the tool does (helps AI decide when to use it)
- Parameters: Input schema (JSON Schema format)
- Returns: Output schema
Example tool definition:
{
name: "search_orders",
description: "Search for orders by customer name, status, or date range",
parameters: {
type: "object",
properties: {
customer: { type: "string", description: "Customer name to search" },
status: { type: "string", enum: ["pending", "shipped", "delivered"] },
fromDate: { type: "string", format: "date" },
toDate: { type: "string", format: "date" }
}
}
}
Resources (Optional)
Resources are read-only data the AI can access:
- Configuration files
- Documentation
- Static data
Most integrations only need tools.
Authentication Flow
Diosc automatically forwards user authentication:
The same token is forwarded throughout the entire chain.
Your API validates the token as usual - no changes needed.
MCP Server Types
Global MCP Servers
Shared across all assistants:
- Connected once, available everywhere
- Good for: company-wide systems (CRM, ERP)
- Configured in Admin Portal → MCP Servers
Assistant-Specific MCP Servers
Only for specific assistants:
- Configured per assistant
- Good for: specialized tools, tenant-specific systems
Tool Availability
Tools are loaded when a session starts:
- User opens assistant
- Diosc fetches available tools from all connected MCP servers
- Tools filtered by user's role (if role-based filtering configured)
- AI receives list of available tools
- AI can now use these tools during the conversation
Approval Workflows
For dangerous operations, require user approval:
// Tool call triggers approval
AI: "I'll update the order status to 'cancelled'. This requires your approval."
[Approve] [Reject]
// User clicks Approve
AI: "Order #123 has been cancelled successfully."
Configured via Approval Policies.
Error Handling
When tool calls fail, the AI receives the error and can:
- Explain the error to the user
- Suggest alternatives
- Retry with different parameters
User: "Show me the order"
AI: [calls get_order]
MCP: { error: "Order not found" }
AI: "I couldn't find that order. Could you provide the order number?"
Next Steps
- Building MCP Servers - Create your own MCP server
- Admin Portal: MCP Servers - Configure MCP connections
- Roles - Control tool access by role