Skip to main content

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 criteria
  • get_customer_details - Retrieve customer information
  • update_order_status - Change an order's status

Why MCP?

Without MCP

To let AI interact with your systems, you'd need to:

  1. Fine-tune the model on your APIs
  2. Build custom integrations for each AI provider
  3. Handle authentication, rate limiting, error handling...
  4. Rebuild everything when switching AI providers

With MCP

  1. Build one MCP server that wraps your APIs
  2. Works with any MCP-compatible AI (Claude, GPT-4, etc.)
  3. Standard protocol handles the communication
  4. Switch AI providers without changing integrations

How MCP Works in Diosc

MCP in Diosc vs Standard MCP

Diosc extends standard MCP with enterprise features:

FeatureStandard MCPDiosc MCP
Tool discoveryYesYes
Tool executionYesYes
Authentication forwardingNoYes (BYOA)
Connection poolingNoYes
Health monitoringNoYes
Role-based tool filteringNoYes
Approval workflowsNoYes

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:

  1. User opens assistant
  2. Diosc fetches available tools from all connected MCP servers
  3. Tools filtered by user's role (if role-based filtering configured)
  4. AI receives list of available tools
  5. 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