Connect Okta to AI Assistants With the CData Python MCP Server
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely access data from external sources. With MCP, you can give AI assistants like Claude direct access to your data sources, allowing them to answer questions and perform actions on live data.
The CData Python MCP Server extends this capability to over 350 data sources by leveraging CData Python Connectors. This means you can connect Claude directly to your Okta instance and interact with your data using natural language.
In this guide, we'll set up the CData Python MCP Server for Okta and configure it with Claude Desktop. You'll be able to ask Claude questions like "What are my top customers?" or "Update the status of ticket #123" and get responses based on your live Okta data.
Let's get started!
Prerequisites
- CData Python Connector for Okta: Request and download a free Community Edition License here. If you already have a license or are using a trial, you can download or update your CData Python Connector for Okta here.
- Claude Desktop: Download from claude.ai/download
- Python 3.12+ installed on your machine
- uv package manager: Install with pip install uv
- An active Okta account with appropriate API access
How It Works
The CData Python MCP Server acts as a bridge between AI assistants and your data sources:
- You ask Claude a question about your Okta data
- Claude uses MCP to send the request to the CData MCP Server
- The server connects to Okta using the CData Python Connector
- Live data is retrieved and returned to Claude
- Claude presents the answer in natural language
The server provides tools for querying data, viewing metadata, executing updates, and calling stored procedures — all through simple conversation with Claude.
Step 1: Set Up the MCP Server
1.1 Clone the Repository
First, clone the CData Python MCP Server repository:
git clone https://github.com/CDataSoftware/cdata-mcp-python.git cd cdata-mcp-python
1.2 Create Virtual Environment
Set up a Python virtual environment using uv:
uv venv uv pip install "mcp[cli]"
Note: With uv, you don't need to manually activate the virtual environment. The uv pip and uv run commands automatically use the .venv in the current directory.
Step 2: Install the CData Connector
2.1 Install the Connector Package
Install the CData Python Connector for Okta that you downloaded. Make sure you're in the project directory when running this command:
For Windows:
uv pip install "\PATH\TO\cdata_okta_connector-##.0.####-cp312-cp312-win_amd64.whl"
For macOS/Linux:
uv pip install ~/PATH/TO/cdata_okta_connector-##.0.####-py3-none-any.whl
2.2 Verify Installation
Confirm the connector is installed:
uv pip list | grep cdata # Should show: cdata-okta-connector
2.3 License Activation (If Needed)
Some connectors work without explicit license activation during initial testing. If you encounter license errors, activate your license:
License Activation StepsFind the License Installer:
import os
import cdata.okta
path = os.path.dirname(os.path.abspath(cdata.okta.__file__))
print(f"License installer location: {path}/installlic_okta/")
Run the Installer:
Windows:cd .venv\Lib\site-packages\cdata\installlic_okta .\install-license.exe YOUR-LICENSE-KEYmacOS/Linux:
cd .venv/lib/python3.12/site-packages/cdata/installlic_okta ./install-license.sh YOUR-LICENSE-KEY
Note: Omitting the License Key argument activates a trial license.
Step 3: Test Your Connection
Before configuring Claude, verify your connector works correctly.
3.1 Set Environment Variables
Export your connection details:
export CONNECTOR_MOD="cdata.okta" export CONNECTION_STRING=" Domain=dev-44876464.okta.com; InitiateOAuth=GETANDREFRESH;"
Windows users: Use set instead of export
3.2 Quick Connection Test
uv run python -c "from utils.get_connection import get_connection; print('✅ Connected!' if get_connection() else '❌ Failed')"
Step 4: Configure Claude Desktop
4.1 Edit Claude Configuration
Open the Claude Desktop configuration file:
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Linux: ~/.config/Claude/claude_desktop_config.json
Add your MCP server configuration:
{
"mcpServers": {
"okta_server": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/cdata-mcp-python",
"run",
"--active",
"main.py"
],
"env": {
"CONNECTOR_MOD": "cdata.okta",
"CONNECTION_STRING": "
Domain=dev-44876464.okta.com;
InitiateOAuth=GETANDREFRESH;"
}
}
}
}
Important: Replace /absolute/path/to/cdata-mcp-python with the actual path to your cloned repository.
4.2 Restart Claude Desktop
- Completely quit Claude (not just close the window)
- Reopen Claude Desktop
- Look for the MCP icon next to your server name
Step 5: Use Claude with Your Okta Data
Now you can interact with your Okta data through natural conversation!
Example Questions to Ask Claude:
- "What tables are available in my Okta instance?"
- "Show me the schema for the [primary_table] table"
- "List the first 10 records from [primary_table]"
- "How many [records] were created this month?"
- "Update the status of [record] ID 123"
- "What stored procedures are available?"
Available MCP Tools
Claude can use these tools automatically based on your questions:
| Tool | Purpose | Example Trigger |
|---|---|---|
| get_tables | Lists all available tables/objects | "What tables are available?" |
| get_columns | Shows fields for a specific table | "What fields are in the Customer table?" |
| run_query | Executes SELECT queries | "Show me all active customers" |
| run_nonquery | Executes INSERT/UPDATE/DELETE | "Update the email for customer 123" |
| get_procedures | Lists stored procedures | "What actions can I perform?" |
| call_procedure | Executes stored procedures | "Run the RefreshCache procedure" |
Advanced Configuration
Performance Optimization
For large datasets, optimize your queries:
- Use LIMIT clauses: SELECT * FROM Customers LIMIT 100
- Add WHERE filters: SELECT * FROM Orders WHERE OrderDate > '2024-01-01'
- Select specific columns: SELECT Id, Name, Email FROM Contacts
Troubleshooting
Server Not Appearing in Claude
- Ensure Claude is completely quit (check Task Manager/Activity Monitor)
- Verify your config file is valid JSON: python -m json.tool claude_desktop_config.json
- Check the absolute path to the repository is correct
- Look for syntax errors (missing commas, quotes)
Connection Errors
- Test your connection string using the test script
- Verify your Okta credentials are correct
- Check network access (firewall, VPN requirements)
- For OAuth: Ensure callback URLs are configured
License Issues
- Run the license activation steps
- Check if your trial has expired (30 days)
- Ensure you're using the correct Python version (3.12+)
Security Considerations
- Credentials: Store sensitive connection strings securely. Consider using environment variables or secure credential stores.
- Permissions: Use Okta accounts with appropriate read/write permissions based on your needs.
- Network: The MCP server runs locally on your machine and connects directly to Okta.
Conclusion
You've successfully connected Claude to your Okta data using the CData Python MCP Server! This powerful integration allows you to:
- Query live data using natural language
- Perform updates and modifications through conversation
- Analyze and understand your data with AI assistance
- Automate routine data tasks
The same setup process works for over 350 data sources supported by CData Python Connectors, from CRMs like Salesforce to databases like MongoDB to APIs like REST endpoints.
Start your free trial or get a Community License today and give your AI assistants direct access to your enterprise data.