MCP tools let a Kommander assistant ask trusted server-side code for live context during a conversation. The model does not call external systems directly. It receives a list of tools that Kommander has made available for the current user, organization, channel, and identity context, then Kommander executes approved calls through the MCP registry.

Execution Path

The important boundary is between the LLM and Kommander. The LLM may select a tool and propose arguments, but Kommander decides whether the tool was offered, which identity is trusted, which connector owns the tool, and what result is safe to return.

Core Concepts

ConceptMeaning
MCP serverA Kommander server adapter that exposes one or more tools, such as the calendar server.
Tool definitionA JSON-schema-shaped function definition with name, description, and parameters.
Tool implementationTypeScript code that receives validated arguments and returns a structured result.
Customer-data connectorAn OpenAPI-backed tool source for account, order, ticket, subscription, or CRM data.
Verified identityServer-verified end-user context used for customer-data access and result ownership checks.
Audit logA persisted record of tool name, arguments, result, status, duration, connector IDs, and correlation IDs.

Request Lifecycle

  1. Kommander initializes enabled MCP server configs for the current user and organization.
  2. Server tools and enabled customer-data connector tools are converted into OpenAI function definitions.
  3. The LLM streams a response and may emit one or more tool calls.
  4. Kommander strips caller-controlled identity arguments before execution.
  5. Kommander verifies the tool was in the request allow-list.
  6. Tool budgets, customer-data rate limits, verified identity, and circuit-breaker state are checked.
  7. The registry routes the call to the owning MCP server or customer-data connector executor.
  8. Results are ownership-checked before they are appended to the message history.
  9. Audit entries are written for success, failure, limit, timeout, circuit-open, and ownership-check outcomes.

Security Model

Customer-data tools are identity-bound. A signed widget identity with a non-empty ownership key is required before Kommander exposes customer-specific connector tools. Model-supplied identity fields such as id, email, userHash, signature fields, and nested identity objects are removed from tool arguments before execution.

Tool results that include ownership markers must match the verified identity. When a mismatch is detected, Kommander returns an empty successful result to the model and writes an ownership failure audit event. The ownership marker rules are maintained in docs/mcp-tool-ownership.md.

Section Map

PageUse it for
Built-In ToolsCalendar tools and customer-data connector tool inventory with example invocations.
Usage and ConfigurationEnvironment variables, settings-backed server configs, OpenAI function shape, and connector setup examples.
Authoring a Custom ToolTypeScript schemas, server contracts, registration, and result ownership guidance.
Integration PatternsHow MCP tools connect to chat streaming, customer-data connectors, widgets, admin UI, and external systems.
Security ConsiderationsIdentity, authorization, redaction, outbound request policy, and prompt-injection controls.
Tool Audit LogsLog storage, filters, export paths, retained fields, and redaction behavior.
Concurrent Tool-Call BehaviorCurrent sequential per-conversation behavior, load-test thresholds, and bottlenecks.
TroubleshootingCommon setup, execution, connector, identity, audit, and performance failures.