❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️
❄️

MCP - Functions in Semantic Kernel

MCP - Functions in Semantic Kernel

πŸ”Œ MCP functions

Microsoft Copilot Protocol (MCP) standardizes how tools and services expose capabilities to Copilots. In SK, MCP functions bridge your agent and external Copilot‑enabled services.

What MCP gives you

  • Standard discovery of tools/functions and schemas.
  • Interop with enterprise connectors (e.g., Microsoft 365, Fabric) that speak MCP.
  • Governance: capability boundaries and consent can be managed centrally.

Pros and cons

  • Pros: Standardized, enterprise‑ready, discoverable, reduces custom glue.
  • Cons: Requires MCP endpoints and proper app registration/permissions; evolving tooling.

Registration concept (C#)

Note: APIs are evolving; treat this as a conceptual shape.

var builder = Kernel.CreateBuilder();
// Example placeholder β€” consult latest SDK docs for actual registration
builder.AddMcpServer("fabric", new Uri("https://fabric.microsoft.com/mcp"));
var kernel = builder.Build();

Security & governance

  • Least privilege: expose only the functions needed; constrain inputs.
  • Consent & audit: rely on MCP platform logging and admin controls where available.
  • PII & data boundaries: classify data; redact where required; log access with correlation IDs.

Testing MCP integrations

  • Create test environments/tenants for connectors.
  • Simulate permission errors and throttling; assert correct fallbacks.
  • Monitor SLAs and latencies; add timeouts and user feedback for slow tools.