Labsco
fctr-id logo

Okta MCP Server

β˜… 37

from fctr-id

Allows AI models to interact with your Okta environment to manage and analyze resources, designed for IAM engineers, security teams, and administrators.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup
<div align="center"> <a href="https://fctr.io"> <img src="https://fctr.io/images/logo.svg" alt="fctr.io" width="110" height="auto"> </a> </div> <div align="center"> <h2>Okta MCP Server (v0.1.1-BETA)</h2> </div> <div align="center"> <h3>πŸ”₯ ALERT!!! A brand new re-built MCP Server now available</h3> <p><strong>A complete rewrite built on Anthropic's new MCP architecture pattern with dual-mode operation, context-engineering, enhanced security sandbox, and production-ready Docker support.</strong></p> <p><a href="https://github.com/fctr-id/fctr-okta-mcp-server"><strong>β†’ Explore TAKO MCP Server</strong></a></p> </div> <div align="center"> The Okta MCP Server is a groundbreaking tool that enables AI models to interact directly with your Okta environment using the Model Context Protocol (MCP). Built specifically for IAM engineers, security teams, and Okta administrators, it implements the MCP specification to transform how AI assistants can help manage and analyze Okta resources. </div> <div align= "center" > <p ><a href="https://github.com/fctr-id/okta-mcp-server">View on GitHub</a> | <a href="https://modelcontextprotocol.io/introduction">Learn about MCP</a> | <a href="https://github.com/fctr-id/okta-ai-agent">Okta AI Agent</a></p> </div> <div align="center"> <h3>Quick Demo</h3> <p > <img src="images/mcp-server.gif" alt="Okta MCP Server Demo" width="1024px" height="auto"> </p> </div>

πŸŽ‰ What's New in v0.1.1-BETA - Enterprise-Grade Special Tools!

This release introduces powerful special tools that revolutionize daily Okta administration tasks:

πŸ”₯ NEW: Special Tools - Game Changers for Okta Admins

  • 🎯 Comprehensive Access Analysis: Helps answer the most frequent question okta admns face. Can user X access app Y?
  • πŸ›‘οΈ Advanced Login Risk Assessment: Behavioral analysis with VPN/Tor detection and geographic impossibility checks which can help with suspicious reporting emails.

πŸ’‘ Real-World Example - Access Analysis:

❓ Question: "Can user john@company.com access the application Salesforce?"

πŸ€– AI Response (30 seconds): "User John Smith can access Salesforce because: 
1) User is ACTIVE βœ…
2) User is assigned via group 'Sales Team' βœ…, 
3) Policy allows access with 2FA from corporate network or requires PUSH factor from external locations - user has PUSH enrolled βœ…"

⏱️ Manual Process: Navigate Users β†’ Find John β†’ Check Status β†’ Check App 
Assignments β†’ Check Group Memberships β†’ Check Salesforce Assignments β†’ 
Review Access Policies β†’ Check MFA Factors β†’ Correlate Network Rules (10-15 min)

πŸ’‘ Real-World Example - Login Risk Assessment:

❓ Question: "Is dan@company.com's recent login activity suspicious?"

πŸ€– AI Response (30 seconds): "LOW RISK - Dan exhibits excellent login 
security patterns: consistent geographic area, same residential ISP, 
stable device fingerprints, normal browser patterns, zero VPN/proxy 
usage, all Okta risk scores LOW βœ…"

⏱️ Manual Process: System Logs β†’ Filter User β†’ Check Locations β†’ Review 
IP Addresses β†’ Cross-reference Network Zones β†’ Analyze Device Patterns β†’ 
Check Geographic Impossibility β†’ Review Behavioral Flags (15+ min)

πŸ—οΈ Core Architecture

  • πŸš€ FastMCP 2.0: Migrated from legacy MCP package to FastMCP 2.0 for cutting-edge protocol features
  • 🧹 Cleaner Code: Removed tool_registry.py dependency for simpler, more maintainable codebase
  • ⚑ Better Performance: Modern async patterns and optimized request handling

πŸ› οΈ Enhanced Tools

  • πŸ“ Complete Rewrite: All tools rewritten with better annotations and descriptions for AI understanding
  • πŸ›‘οΈ Improved Validation: Enhanced error handling and input validation across all operations

πŸ” Advanced Security

  • 🎫 Bearer Tokens: Full JWT bearer token support with jwks_uri validation
  • 🏒 Enterprise Auth: Support for enterprise authentication flows and scope-based access

πŸš€ Future-Ready

  • πŸ”Œ Middleware Ready: Extensible middleware system for custom processing
  • πŸ“‘ Protocol Evolution: Access to latest MCP features as they're developed and standardized

πŸ“ Note: CLI clients and AI sampling features have been moved to _Archived/ folder due to pydantic-ai dependency conflicts (security vulnerability ). See _Archived/README.md for details.

πŸ“‹ Table of Contents

Β 

πŸ” What is the Model Context Protocol?

<div align="left"> <p>The Model Context Protocol (MCP) is an open standard that enables AI models to interact with external tools and services in a structured, secure way. It provides a consistent interface for AI systems to discover and use capabilities exposed by servers, allowing AI assistants to extend their functionality beyond their training data.</p> <p>Think of MCP as the "USB-C of AI integration" - just as USB-C provides a universal standard that allows various devices to connect and communicate regardless of manufacturer, MCP creates a standardized way for AI models to discover and interact with different services without custom integration for each one. This "plug-and-play" approach means developers can build tools once and have them work across multiple AI assistants, while users benefit from seamless integration without worrying about compatibility issues.</p> <p><strong>Example:</strong> "Find all locked users in our Okta tenant, and create a spreadsheet in our IT Operations folder on Google Drive with their names, email addresses, and last login dates." <em>The AI uses Okta MCP Server to query locked users, then passes this data to Google Drive MCP Server to create the spreadsheet - all without custom coding.</em></p> <div align="left"> <a href="https://modelcontextprotocol.io/introduction"> <img src="images/MCP-Example.png" style="width:700px"> </a> </div> </div>

πŸ› οΈ Available Tools

The Okta MCP Server currently provides the following tools:

πŸ”₯ Special Tools - Enterprise Admin Accelerators

Access Analysis & Troubleshooting

  • analyze_user_app_access - Complete user application access evaluation with policy analysis (replaces 10-15 minutes of manual Okta Admin Console navigation)

Security & Risk Assessment

  • analyze_login_risk - Comprehensive login behavior analysis with VPN/Tor detection and geographic impossibility checks (answers "Is this user compromised?" instantly)

⚑ Why These Matter: The two most common questions Okta admins face daily are "Why can't user X access application Y?" and "Is this login activity suspicious?". These special tools instantly provide comprehensive answers that would otherwise require extensive manual investigation across multiple Okta admin screens, policy reviews, and log analysis - transforming 15+ minute investigations into 30-second AI-powered insights.

πŸ“Š Standard Tools

User Management

  • list_okta_users - Retrieve users with filtering, search, and pagination options
  • get_okta_user - Get detailed information about a specific user by ID or login
  • list_okta_user_groups - List all groups that a specific user belongs to
  • list_okta_user_applications - List all application links (assigned applications) for a specific user
  • list_okta_user_factors - List all authentication factors enrolled for a specific user

Group Operations

  • list_okta_groups - Retrieve groups with filtering, search, and pagination options
  • get_okta_group - Get detailed information about a specific group
  • list_okta_group_members - List all members of a specific group
  • list_okta_assigned_applications_for_group - List all applications assigned to a specific group

Application Management

  • list_okta_applications - Retrieve applications with filtering, search, and pagination options
  • list_okta_application_users - List all users assigned to a specific application
  • list_okta_application_group_assignments - List all groups assigned to a specific application

Policy & Network Management

  • list_okta_policy_rules - List all rules for a specific policy with detailed conditions and actions
  • get_okta_policy_rule - Get detailed information about a specific policy rule
  • list_okta_network_zones - List all network zones with IP ranges and configuration details

System Log Events

  • get_okta_event_logs - Retrieve Okta system log events with time-based filtering and search options

Date & Time Utilities

  • get_current_time - Get current UTC time in ISO 8601 format
  • parse_relative_time - Convert natural language time expressions to ISO 8601 format

Additional tools for applications, factors, policies, and more advanced operations are on the roadmap and will be added in future releases.

🧠 Supported AI Providers

The Okta MCP Server supports multiple AI providers through its flexible configuration system. This allows you to connect to various large language models based on your specific needs and existing access.

Currently Supported Providers:

ProviderEnvironment VariableDescription
OpenAIAI_PROVIDER=openaiConnect to OpenAI API with models like GPT-4o. Requires an OpenAI API key.
Azure OpenAIAI_PROVIDER=azure_openaiUse Azure-hosted OpenAI models with enhanced security and compliance features.
AnthropicAI_PROVIDER=anthropicConnect to Anthropic's Claude models (primarily tested with Claude 3.7 Sonnet).
Google Vertex AIAI_PROVIDER=vertex_aiUse Google's Gemini models via Vertex AI. Requires Google Cloud service account.
OpenAI CompatibleAI_PROVIDER=openai_compatibleConnect to any OpenAI API-compatible endpoint, such as Fireworks.ai, Ollama, or other providers that implement the OpenAI API specification.

Installation

# Clone the repository
git clone https://github.com/fctr-id/okta-mcp-server.git
cd okta-mcp-server

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

⚠️ NOTICE: If you clone this repository anew or pull updates, always make sure to re-run pip install -r requirements.txt to ensure all dependencies are up-to-date.

Configuration & Usage

Create a config file with your Okta settings:

πŸ“ Note: Standalone CLI clients have been archived. For MCP host integration (Claude Desktop, VS Code, etc.), use the server directly with the JSON configuration below.

Supported Transports and Launching

The Okta MCP Server supports multiple transport protocols:

1. Standard I/O (STDIO) - Recommended

  • Security: βœ… Direct communication through standard input/output streams
  • Use case: Ideal for desktop AI assistants like Claude Desktop
  • Performance: βœ… Lightweight and efficient
  • Configuration: For Claude Desktop, add to claude_desktop_config.json:
    {
      "mcpServers": {
        "okta-mcp-server": {
          "command": "DIR/okta-mcp-server/venv/Scripts/python",
          "args": [
            "DIR/okta-mcp-server/main.py"
          ],
          "env": {
            "OKTA_CLIENT_ORGURL": "https://dev-1606.okta.com",
            "OKTA_API_TOKEN": "OKTA_API_TOKEN"
          }
        }
      }
    }
    Replace DIR with your absolute directory path and OKTA_API_TOKEN with your actual token

2. Streamable HTTP Transport - Modern & Current Standard

Current Standard - Modern HTTP-based transport with advanced features:

  • Features: βœ… Real-time event streaming, session management, resumability support
  • Performance: βœ… Better scalability and connection handling
  • Use case: Modern web applications and clients supporting HTTP streaming
  • Security: ⚠️ Local HTTP server - secure in controlled environments

Starting the Streamable HTTP Server:

# Start server with explicit risk acknowledgment
python main.py --http --iunderstandtherisks

# Server will start on http://localhost:3000/mcp
# Connect using streamable HTTP compatible clients

Features:

  • βœ… Real-time streaming - Live progress updates during operations
  • βœ… Session management - Maintains connection state
  • βœ… Event streaming - Server-Sent Events for real-time notifications
  • βœ… Better error handling - Detailed error responses
  • βœ… Modern protocol - Based on latest MCP specifications

3. Remote HTTP Access - High Risk Advanced Use Only

⚠️ EXTREMELY DANGEROUS - READ CAREFULLY

For MCP clients that don't natively support remote connections, you can use mcp-remote via NPX:

Prerequisites:

  • Node.js and NPM installed
  • Okta MCP Server running in HTTP mode

Setup:

# 1. Install mcp-remote globally
npm install -g @anthropic/mcp-remote

# 2. Start your Okta MCP Server in HTTP mode
python main.py --http --iunderstandtherisks

# 3. Configure your MCP client (e.g., Claude Desktop)

Claude Desktop Configuration:

{
  "mcpServers": {
    "okta-mcp-server": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:3000/mcp"
      ],
      "env": {
        "OKTA_CLIENT_ORGURL": "https://dev-1606.okta.com",
        "OKTA_API_TOKEN": "your_actual_api_token"
      }
    }
  }
}

🚨 CRITICAL SECURITY WARNINGS:

  • NEVER use in production environments
  • NEVER expose the HTTP port (3000) to public networks
  • ANYONE with network access can control your Okta tenant
  • No authentication or authorization protection
  • All Okta operations are exposed without restrictions
  • Use only in isolated, secure development environments
  • Consider this approach only if STDIO transport is absolutely not feasible

When might you need this approach:

  • Testing MCP integrations that require HTTP transport
  • Specific client applications that can't use STDIO
  • Development scenarios requiring HTTP debugging
  • NEVER for production or shared environments

4. Server-Sent Events (SSE) - Deprecated

⚠️ DEPRECATED: SSE transport is deprecated and not recommended for new implementations.

# Run in SSE mode (requires explicit risk acknowledgment)
python main.py --sse --iunderstandtherisks
  • Use case: Legacy MCP clients that specifically require SSE (not recommended)
  • Security: ⚠️ Same HTTP security risks as Streamable HTTP
  • Recommendation: Use Streamable HTTP transport instead for all new implementations

⚠️ Good to Know

Beta Release πŸ§ͺ

  • Completely rewritten architecture with FastMCP 2.0
  • Enhanced stability and performance compared to previous alpha releases
  • Comprehensive tool system with improved AI integration
  • More suitable for development and testing environments
  • Production readiness being evaluated with enhanced security features

Security First πŸ›‘οΈ

  • Designed for least-privilege operation
  • Default read-only access to Okta resources
  • Future write operations will require explicit approval flows

Current Limitations πŸ”

  • Starting with a limited set of read-only tools for users and groups
  • Planning to expand API coverage rapidly in upcoming releases
  • Some complex Okta relationships not yet exposed
  • Performance with very large Okta instances not yet optimized
  • Requires direct network access to Okta API endpoints

πŸ—ΊοΈ Roadmap

v0.1.0-BETA - Current (MAJOR ARCHITECTURAL OVERHAUL!)

  • Complete migration to FastMCP 2.0 architecture
  • Comprehensive rewrite of all tools with enhanced annotations
  • New unified CLI client supporting multiple transports
  • Eliminated tool_registry.py dependency for cleaner codebase
  • Advanced bearer token support with jwks_uri validation
  • Significantly enhanced error handling and validation
  • Performance optimizations and modern async patterns

v0.3.0 - Previous

  • Streamable HTTP transport support
  • Real-time event streaming
  • Session management and resumability
  • Enhanced client applications

Future plans include:

  • Complete user lifecycle operations
  • Application assignment management
  • Group membership operations
  • Factor enrollment and verification
  • Policy and rule management
  • Approval workflows for sensitive operations
  • Multi-channel approval options (web, email, Slack)
  • Audit logging and compliance reporting
  • System log integration
  • Security insights generation
  • Multi-tenant support
  • Role-based access control

πŸ†˜ Need Help?

Before raising an issue, check:

  1. πŸ“ Server configuration
  2. πŸ”‘ Okta API permissions
  3. πŸ”Œ MCP client compatibility
  4. πŸ“Š Server logs

Still having problems? Open an issue on GitHub or email support@fctr.io (response times may vary)

πŸ’‘ Feature Requests & Ideas

Have an idea or suggestion? Open a feature request on GitHub!

πŸ‘₯ Contributors

Interested in contributing? We'd love to have you! Contact info@fctr.io for collaboration opportunities.

βš–οΈ Legal Stuff

Check out License.md for the fine print.


🌟 © 2025 Fctr Identity. All rights reserved. Made with ❀️ for the Okta and AI communities.