Best practices
Best practices for the Okta Managed MCP Server.
Early Access release
Hosting model
- Don't connect the Okta Open Source MCP Server and Okta Managed MCP Server to the same LLM client at the same time. Overlapping tools from both servers can conflict and confuse the LLM about which tool to use.
User access control
- Enforce the principle of least privilege. Grant only the specific OAuth scopes your team requires for their operational duties.
- Regular validation reviews. Periodically review your app integration scopes in the Okta Admin Console to remove unnecessary permissions.
- Separate apps by role. Create distinct OIDC apps for different user types to maintain clear audit trails and enforce appropriate access levels.
Handle AI-generated output with care
- Review read operation results carefully. While hallucinations in read outputs are less likely when queries stay within the context window limits, always verify returned data before taking action.
- Use write operations with caution. Most use cases involve read operations. If your org requires write operations, ensure you have reviewed the results carefully before proceeding, as some actions may be irreversible.
- Understand the non-deterministic nature of AI. Results may not always be identical across sessions. This is expected behavior.
- Cross-check high-stakes results. For sensitive tasks (offboarding verification and security audits), spot-check a sample manually before trusting the result at scale.
Prompt design best practices
- Follow prompt best practices. Use clear, specific, and concise prompts to reduce ambiguity and improve the accuracy of results.
- Scope prompts narrowly. Target a specific group, app, date range, or user segment instead of asking for "everything" at once. Broad prompts force the model to pull large datasets across many tools, increasing token usage and slowing responses.
- State exact thresholds and criteria in your prompt. Include concrete rules (for example, "90+ days inactive," "cost center 1001-1050," "3-day SLA") so the agent evaluates against your standard instead of making assumptions.
- Batch related questions together. Combine everything you want to know about one entity (for example, a user's groups, app assignments, and login history) into a single well-structured prompt instead of sending multiple small follow-ups.
Managing write operations safely
- Treat write-actions as drafts for review. Read or audit prompts (find, flag, list) are low-risk; state-changing actions (deactivate, revoke, delete) should be reviewed before execution, especially early on as you build trust in the tool.
- Start with read-only prompts before authorizing bulk changes. Validate the agent's accuracy on audit tasks before letting it run bulk write actions (for example, bulk deactivation, bulk group changes, policy deletion).
- Confirm irreversible actions before proceeding. You can't undo some write operations (like deletions and deprovisioning).
Operational limits and performance
- Be aware of API rate limits. Exceeding them results in HTTP 429 responses and might impact performance.
- Watch for context window limits on large queries. Very large datasets pulled in a single query increase the risk of incomplete or degraded results.