MCP tool descriptions help the model choose a tool. They do not authorize anything. Authorization, identity binding, data minimization, and audit controls must live in Kommander server code and connector configuration.
Security Boundary
The model can suggest a tool name and arguments. Kommander controls whether that tool was available, which identity is trusted, whether limits allow execution, which server owns the tool, and what result can be returned.
Required Controls
| Risk | Control |
|---|---|
| Tool spoofing | Check the request allow-list before execution. |
| Identity spoofing | Remove model-supplied identity arguments and inject verified identity server-side. |
| Cross-user data leak | Require ownership markers on user-owned results and verify them against verifiedUser. |
| Secret exposure | Keep credentials in server config or encrypted stores, never in tool descriptions or arguments. |
| Audit PII leakage | Use default audit redaction and connector-specific sensitiveFields. |
| Tool loops or cost runaway | Enforce per-turn and per-conversation tool budgets. |
| Connector abuse | Apply customer-data rate limits, timeouts, response-size limits, and circuit breakers. |
| SSRF | Validate outbound URLs for OpenAPI connectors and disable redirects. |
| Prompt injection | Treat external content and user text as untrusted input. Tool code must enforce policy. |
Identity Rules
Customer-data tools require verified end-user context. Do not expose customer-data tools for anonymous widget sessions unless the tool only returns public data.
Identity fields such as id, email, userHash, signature fields, and nested identity objects are removed from model arguments before execution. Use identity injection rules to bind upstream parameters.
Ownership Verification
User-owned tool results should include at least one supported ownership marker. The marker must match the verified identity.
If Kommander observes a mismatch, the user-facing tool result becomes empty and the audit log records ownership_check_failure. This is a security event, not a normal empty upstream response.
Tool Schema Hygiene
Tool schemas are visible to the model, so write them as public interface contracts.
Avoid:
- Secrets, tokens, endpoint credentials, or internal hostnames in descriptions.
- Instructions that try to override the system prompt.
- Parameters for identity values that Kommander already knows.
- Broad free-form object parameters when a narrow enum or string is enough.
Redaction
Audit logs redact common sensitive field names and fragments by default. Add connector-specific fields when an upstream API uses domain-specific names.
Redaction applies to persisted audit arguments and results. It is not a substitute for minimizing tool output before returning it to the model.
Outbound Requests
OpenAPI connector requests should use short timeouts, bounded response size, no redirects, and outbound URL validation.
Only disable outbound validation for controlled tests. Production connectors should not access link-local, private, metadata, or file URLs.
Side Effects
Read-only tools are the default safe path. For actions that mutate data:
- Require explicit server-side authorization for the current user and organization.
- Make the operation idempotent or include an idempotency key.
- Add a human confirmation step before execution.
- Return a compact receipt with the actor, target ID, status, and timestamp.
- Audit both attempted and completed actions.
Review Checklist
- The tool is exposed only to the intended users, organizations, and channels.
- The model cannot supply trusted identity, organization, connector, or credential values.
- Every external request has timeout and response-size limits.
- User-owned results contain ownership markers.
- Audit logs contain enough context to investigate failures without storing unnecessary PII.
- Error messages are useful but do not reveal secrets, credentials, internal URLs, or stack traces.