J

okta-mcp-server

...
Created 2/14/2025bykapilduraphe

Language:

JavaScript

Stars:

8

Forks:

3

Okta MCP Server

This MCP server enables Claude to interact with Okta's user management system, currently providing user information retrieval capabilities.

Prerequisites

  • Node.js (v16 or higher)
  • Claude Desktop App
  • Okta Developer Account
  • Admin API Token from Okta

Setup Instructions

1. Create an Okta Developer Account

  • Go to the Okta Developer Console
  • Create a new account or sign in to an existing one
  • Note your Okta domain (e.g., dev-123456.okta.com)

2. Create an API Token

  • In the Okta Developer Console, go to Security > API > Tokens
  • Click "Create Token"
  • Give your token a meaningful name (e.g., "MCP Server Token")
  • Copy the token value (you won't be able to see it again)

3. Initial Project Setup

Install dependencies:

npm install

4. Configure Environment Variables

Create a .env file for local development (don't commit this file):

OKTA_ORG_URL=https://your-domain.okta.com
OKTA_API_TOKEN=your-api-token

5. Configure Claude Desktop

Open your Claude Desktop configuration file:

For MacOS:

code ~/Library/Application\ Support/Claude/claude_desktop_config.json

For Windows:

code %AppData%\Claude\claude_desktop_config.json

Add or update the configuration:

{
    "mcpServers": {
        "okta": {
            "command": "node",
            "args": [
                "/ABSOLUTE/PATH/TO/YOUR/build/index.js"
            ],
            "env": {
                "OKTA_ORG_URL": "https://your-domain.okta.com",
                "OKTA_API_TOKEN": "your-api-token"
            }
        }
    }
}

Save the file and restart Claude Desktop.

Available Tools

The server currently provides the following tool:

get_user

Retrieves detailed user information from Okta, including:

  • User Details (ID, Status)

  • Account Dates (Created, Activated, Last Login, etc.)

  • Personal Information (Name, Email)

  • Employment Details

  • Contact Information

              - Address
    
  • Preferences

Example Usage in Claude

After setup, you can use commands like:

Error Handling

The server includes robust error handling for:

  • User not found (404 errors)
  • API authentication issues
  • Missing or invalid user profiles
  • General API errors

Troubleshooting

Common Issues

Tools not appearing in Claude:

  • Check Claude Desktop logs: tail -f ~/Library/Logs/Claude/mcp*.log
  • Verify all environment variables are set correctly
  • Ensure the path to index.js is absolute and correct

Authentication Errors:

  • Verify your API token is valid
  • Check if OKTA_ORG_URL includes the full URL with https://
  • Ensure your Okta domain is correct

Server Connection Issues:

  • Check if the server built successfully
  • Verify file permissions on build/index.js (should be 755)
  • Try running the server directly: node /path/to/build/index.js

Viewing Logs

To view server logs:

For MacOS/Linux:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

For Windows:

Get-Content -Path "$env:AppData\Claude\Logs\mcp*.log" -Wait -Tail 20

Environment Variables

If you're getting environment variable errors, verify:

Security Considerations

  • Keep your API token secure
  • Don't commit credentials to version control
  • Use environment variables for sensitive data
  • Regularly rotate API tokens
  • Monitor API usage in Okta Admin Console
  • Implement rate limiting for API calls
  • Use minimum required permissions for API token

Types

The server includes TypeScript interfaces for Okta user data:

interface OktaUserProfile {
  login: string;
  email: string;
  secondEmail?: string;
  firstName: string;
  lastName: string;

            
        
            
                  displayName: string;
  nickName?: string;
  organization: string;
  title: string;
  division: string;
  department: string;
  employeeNumber: string;
  userType: string;
  costCenter: string;
  mobilePhone?: string;
  primaryPhone?: string;
  streetAddress: string;
  city: string;
  state: string;
  zipCode: string;
  countryCode: string;
  preferredLanguage: string;
  profileUrl?: string;
}

interface OktaUser {
  id: string;
  status: string;
  created: string;
  activated: string;
  lastLogin: string;
  lastUpdated: string;
  statusChanged: string;
  passwordChanged: string;
  profile: OktaUserProfile;
}

License

MIT License - See LICENSE file for details.

Support

If you encounter any issues:

  • Check the troubleshooting section above
  • Review Claude Desktop logs
  • Examine the server's error output
  • Check Okta's developer documentation

Note: PRs welcome!

Last updated: 3/20/2025

Publisher info

kapilduraphe's avatar

Kapil Duraphe

Natoma Labs: https://www.natoma.id/
6
followers
10
following
11
repos

More MCP servers built with JavaScript

mcp-server-semgrep

MCP Server Semgrep is a [Model Context Protocol](https://modelcontextprotocol.io) compliant server that integrates the powerful Semgrep static analysis tool with AI assistants like Anthropic Claude. It enables advanced code analysis, security vulnerability detection, and code quality improvements directly through a conversational interface.

By Szowesgad9
protonmail-mcp

This MCP server provides email sending functionality using Protonmail's SMTP service. It allows both Claude Desktop and Cline VSCode extension to send emails on your behalf using your Protonmail credentials.

By amotivv6
agentql-mcp

Model Context Protocol server that integrates AgentQL's data extraction capabilities.

By tinyfish-io45